[R] how to get "lsmeans"?

John Fox jfox at mcmaster.ca
Thu Mar 22 15:19:27 CET 2007


Dear Frank,

The object is to focus on a high-order term of the model, holding other
terms "constant" at typical values; in the case of a factor, a "typical
value" is ambiguous, so an average is taken over the levels of the factor.
If the factor is, e.g., gender, one could produce an estimate of the average
fitted value for a population composed equally of men and women, or of a
population composed of men and women in proportion to their distribution in
the data. Otherwise, one would have to produce separate sets of fitted
values for men and women, with the number of such sets increasing as the
number of levels of the factors held constant increase. On the scale of the
linear predictor, these sets would differ only by constants.

Regards,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
-------------------------------- 

> -----Original Message-----
> From: Frank E Harrell Jr [mailto:f.harrell at vanderbilt.edu] 
> Sent: Thursday, March 22, 2007 8:41 AM
> To: John Fox
> Cc: 'Prof Brian Ripley'; 'r-help'; 'Chuck Cleland'; 'Liaw, Andy'
> Subject: Re: [R] how to get "lsmeans"?
> 
> John Fox wrote:
> > Dear Brian et al.,
> > 
> > My apologies for chiming in late: It's been a busy day.
> > 
> > First some general comments on "least-squares means" and 
> "effect displays."
> ... much good stuff deleted ...
> 
> John - the one thing I didn't get from your post is a 
> motivation to do all that as opposed to easy-to-explain 
> predicted values.  I would appreciate your thoughts.
> 
> Thanks
> Frank
> 
> -- 
> Frank E Harrell Jr   Professor and Chair           School of Medicine
>                       Department of Biostatistics   
> Vanderbilt University



More information about the R-help mailing list