Description Usage Arguments Value Author(s) Examples
Returns a vector containing the mean, the variance and the coefficients needed to combine the model's parameters to obtain the required mean and variance.
1 | MeanAndVariance(MeanLabel, Mmatrix, myModel)
|
MeanLabel |
String identifying a level of a factor or a combination of levels of interacting factors. The factors involved had to be declared in the model formula. Let Suppose that the model formula is Y~FactorA+FactorB+FactorA:FactorB+CovariableX, if FactorA has three levels A1,A2 and A3, FactorB has two level B1 and B2, examples of admissible calls are: MeanAndVariance("FactorAA1", Mmatrix, myModel) MeanAndVariance("FactorBB1", Mmatrix, myModel) MeanAndVariance("FactorAA1:FactorBB1", Mmatrix, myModel) |
Mmatrix |
A matrix returned by CalculateMmatrix(myModel,myData) |
myModel |
An object of class lm, gls, mle, glm, mer, lmerMod or glmerMod |
A vector containing the mean, the variance and a the coefficients needed to combine the model's parameters to obtain the required mean and variance
Julio A. Di Rienzo <email: dirienzo@agro.unc.edu.ar>
1 2 3 4 5 6 7 8 9 | library(nlme)
library(lme4)
library(lsmeans)
Oats[,"nitro"]=as.factor(Oats[,"nitro"])
myModel<-lme(yield~1+Variety+nitro+Variety:nitro,random =~1|Block/Variety,,method="REML",data=Oats)
Mmatrix=CalculateMmatrix(myModel,Oats)
MeanAndVariance("VarietyVictory", Mmatrix,myModel)
MeanAndVariance("VarietyVictory:nitro0.6", Mmatrix,myModel)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.