Description Details Author(s) See Also Examples
Calculates the lsmeans and their variances for lm, gls, mle, glm, mer, lmerMod or glmerMod models It also contains a function to test contrasts and to test linear combinations. The present version only works with default parametrization.
Package: | lsmeans |
Type: | Package |
Version: | 2.0 |
Date: | 2012-10-06 |
License: | GPL |
LazyLoad: | yes |
The package contains the following main functions: CalculateMmatrix, CalculateMatrixofMeansAndStandardErrors, MeanAndVariance, MeansComparison and RSquare.
Julio A. Di Rienzo <email: dirienzo@agro.unc.edu.ar> and Maria del Carmen Romero <email: mariadelc.romero@gmail.com>
Maintainer: Julio A. Di Rienzo <email: dirienzo@agro.unc.edu.ar> and Maria del Carmen Romero <email: mariadelc.romero@gmail.com>
CalculateMmatrix
,
CalculateMatrixofMeansAndStandardErrors
,
MeanAndVariance
,
contrastLC
,
Test_Contrast
,
RSquare
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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)
anova(myModel)
Mmatrix=CalculateMmatrix(myModel,Oats)
CalculateMatrixofMeansAndStandardErrors(myModel,Oats,"Variety",Mmatrix,MissingCells=FALSE)
CalculateMatrixofMeansAndStandardErrors(myModel,Oats,"nitro",Mmatrix,MissingCells=FALSE)
CalculateMatrixofMeansAndStandardErrors(myModel,Oats,"Variety:nitro",Mmatrix,MissingCells=FALSE)
MeanAndVariance("VarietyVictory", Mmatrix,myModel)
MeanAndVariance("VarietyVictory:nitro0.6", Mmatrix,myModel)
# Test_Contrast(myModel,myData,"Variety",Mmatrix,c(1,-1,0),10)
# contrastLC(myModel,c(0,0,0,1,-1,0,0,0,0,0,0,0))
RSquare(myModel)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.