Damon Knight has started a discussion on Genie about Farnham's Freehold with an eye to trying to determine exactly how autobiographical the book is. I didn't read it, but what's been posted so far is that both Farnham and Heinlein were authoritarian (some say facist); both were ex-navy; the story was set in Colorado and written while Heinlein was living there (Colorado Springs, in the book "Mountain Springs"); both considered women the lesser half of the human race; both built bomb shelters. Farnham gets the girl and is shown to deserve her, while the older woman and the younger man in the story end up not looking so good.

One big difference, though: Farnham had children but Heinlein didn't. That seems to be significant, as many of Farnham's strong opinions have to do with the best way to bring up children. (Heinlein's last books kept hammering at the point that nothing was more important than the family, so long as a dominant male was at its head.)