[R] SE estimates for treatment groups from nlme
Katherine A Grieve
grieve at u.washington.edu
Wed Apr 12 01:50:30 CEST 2006
Thanks for the numerous responses. I was asked to post the solution so that
others could see it.
The solution is to use the estimable function from the gregmisc or gmodels package. First you create a matrix (the cm matrix) of the particular linear combinations of parameters you are concerned with. In my case with the 18 groups I created an 18 row matrix corresponding to the linear combinations of
coefficients which made up each of my treatment groups. (the columns correspond
to each of the coefficients in the summary tTable).
cm<-rbind('Benicia Curved Base' = c(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
'PR39G83 Curved Base' = c(1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
'Benicia Normal Base' = c(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
'Benicia Upright Base' = c(1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
'Benicia Curved Mid'= c(1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0),
'Benicia Curved Tip'= c(1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0),
'PR39G83 Normal Base'= c(1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0),
'PR39G83 Upright Base'= c(1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0),
'PR39G83 Curved Mid'= c(1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0),
'PR39G83 Curved Tip'= c(1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0),
'Benicia Normal Mid'= c(1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0),
'Benicia Upright Mid'= c(1,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0),
'Benicia Normal Tip'= c(1,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0),
'Benicia Upright Tip'= c(1,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0),
'PR39G83 Normal Mid'= c(1,1,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0),
'PR39G83 Upright Mid'= c(1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0),
'PR39G83 Normal Tip'= c(1,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,0),
'PR39G83 Upright Tip'= c(1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1),
)
Then I called estimable(my.nlme, cm) which yielded the parameter estimates and
the SE for each of the groups I was interested in.
More information about the R-help
mailing list