Displaying 2 results from an estimated 2 matches for "mstreat".
Did you mean:
mstream
2007 Jan 23
1
How to evaluate an lm() object for generating warning statement in a function
...;s argument an object which holds the
results of an lm call. e.g.,
object1<-lm(y~x)
The function is as follows (some comments included):
comp.var.estimates<-function(object.lm)
{
anovmod<-anova(object.lm) #get the anova table for the lm
MStreat<-anovmod[1,3]; MSErr<-anovmod[2,3] #extract Mean
Squares
dataframe<- as.data.frame(object.lm[13]) #gets the data
that went into the lm
ni <- tapply(dataframe[,1], dataframe[,2], length) #number
of cases per treatment level
nisq<-n...
2007 Jan 22
0
Advice on an appropriate condition for warning in a function
...if
there are). The function takes as it's argument an object which holds the
results of an lm call. e.g.,
object1<_lm(y~x)
The function is as follows (some comments included):
comp.var.estimates<-function(object.lm)
{
anovmod<-anova(object.lm) #get the anova table for the lm
MStreat<-anovmod[1,3]; MSErr<-anovmod[2,3] #extract Mean Squares
dataframe<- as.data.frame(object.lm[13])
ni <- tapply(dataframe[,1], dataframe[,2], length)
nisq<-ni^2
no<-(1/(length(ni)-1))*(sum(ni)-(sum(nisq)/sum(ni)))
s2a<-((MSTreat-MSErr)/no)
stot<-s2a + MSErr...