See this past post where I noted that James Madison was not a Christian, but a theistic rationalist. While very reticent to give the personal details of his creed, his most explicit discussion on the matter comes from his letter TO FREDERICK BEASLEY, November 20, 1825. Madison noted that in order to fully do justice to a theological work he'd have to "resort to the celebrated work of Dr. Clarke," which he "read fifty years ago...." Madison's philosophical argument for God is as follows:
The finiteness of the human understanding betrays itself on all subjects, but more especially when it contemplates such as involve infinity. What may safely be said seems to be, that the infinity of time & space forces itself on our conception, a limitation of either being inconceivable; that the mind prefers at once the idea of a self-existing cause to that of an infinite series of cause & effect, which augments, instead of avoiding the difficulty; and that it finds more facility in assenting to the self-existence of an invisible cause possessing infinite power, wisdom & goodness, than to the self-existence of the universe, visibly destitute of those attributes, and which may be the effect of them. In this comparative facility of conception & belief, all philosophical Reasoning on the subject must perhaps terminate.
Even at an old age, his mind is still very lucid. Though he read it 50 years prior, he still follows Clarke's argument quite closely. From Stanford's Encyclopedia of Philosophy:
The main lines of Clarke's argument are as follows. Since something exists now, something has always existed, otherwise nothing would exist now because nothing comes from nothing. What has existed from eternity can only be either an independent being, that is, one having in itself the reason of its existence, or an infinite series of dependent beings. However, such a series cannot be the being that has existed from eternity because by hypothesis it can have no external cause, and no internal cause (no dependent being in it) can cause the whole series. Hence, an independent being exists.
Clarke was an Anglican Divine, an Arian heretic, and a philosophical rationalist. Here is the Encyclopedia on his Arian heresy:
In 1712, apparently against the advice of some of Queen Anne's ministers, Clarke published The Scripture Doctrine of the Trinity, which was accused of Arianism, the view that Christ is divine but created. The ensuing controversy culminated two years later in his humiliating promise to the Upper House of Convocation not to preach or write on the topic any longer. However, this act of submission did not silence the correct rumors that he, like Newton himself, was still an Arian. How much these suspicions of heterodoxy damaged his ecclesiastical career is unclear. However, Voltaire reports that Bishop Gibson effectively prevented Clarke's elevation to the see of Canterbury by pointing out that Clarke was indeed the most learned and honest man in the kingdom, but had one defect: he was not a Christian.
I should note too that John Witherspoon, though a Calvinist/orthodox Christian, actually introduced Madison and his other students to Samuel Clarke's work at Princeton. Witherspoon was greatly influenced by Locke and the religious rationalists of the Enlightenment who were disproportionately non-Trinitarians. Witherspoon was not, contrary to misperceptions, teaching his students to be good orthodox Trinitarian Christians at Princeton, though that is what he preached from the pulpit. On matters of government, Witherspoon, first and foremost, taught his students to be good Whig-republicans.