contrastLC: contrastLC

Description Usage Arguments Details Value Author(s) Examples

View source: R/lsmeans.r

Description

This function tests a single or a set of linear combinations.

Usage

1
contrastLC(myModel, mycombination)

Arguments

myModel

An object of class lm, gls, mle, glm, mer, lmerMod or glmerMod

mycombination

A vector of length p (p=the number of parameters of the fixed part of the fitted model) containing a set of coefficients. These coefficients define a linear combination of the parameters which expected value under the null hypothesis is zero. It also admits a k*p matrix of coefficients, each row representing a linear combination.

Details

Let myParameters be the vector of model parameters. Then the null hypothesis is mycombination

Value

An objetc of class named-list containing the parts p: p-value for the null hypotesis, Fobs: Observed F-estatistics, numDF: 1 or the number of independent rows of mycombination.

Author(s)

Julio A. Di Rienzo <email: dirienzo@agro.unc.edu.ar>

Examples

1
2
3
4
5
6
7
8
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)
#mycombination<-as.vector(c(0,1,-1,0,0,0))
#contrastLC(myModel, mycombination)

lsmeans documentation built on May 2, 2019, 6:15 p.m.