Just came across your message I also have a William Boag b 9 Jul 1798 in Uphall West lothian(father was James mother was Catherine) Married an Elizabeth Robertson on 9 Jun 1821 in Ecclesmachan, Midlothian had James, John, Mary b 1828 Married Robert Anderson in 1848, William and Catherine. I am thinking there might be a connection.