runMultiGen: Runs a mixed effects ANOVA

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/runMultiGen.R

Description

This function runs a mixed effect ANOVA.

Usage

1
2
3
runMultiGen(Data, TreatVar = "", ResponVar = "", 
RepVar = "Not Used", TimeVar = "Not Used", 
Path, TestDirection = "Descending",alpha=0.05)

Arguments

Data

A data set.

TreatVar

Name (as a string) of the treatment variable.

ResponVar

Name (as a string) of the response variable.

RepVar

Name (as a string) of the replicate variable.

TimeVar

Name (as a string) of the time variable.

Path

Path indicates the type of mixed effects analysis performed. Use Path = 2 for Time (Repeated Measures) and Path = 3 Group - Replicate (Mixed Effects).

TestDirection

Indicates the test direction. This can be c('Both', 'Descending', 'Ascending').

alpha

Alpha level used in calculating confidence intervals.

Details

This is mostly a wrapper function for nlme from the nlme package and glht from the multcomp package.

Value

Returns a list with the following items:

Anova.Table

An ANOVA table see Anova.

MainEffects

A table of main effect, see oneWayDunnettTest for more details.

FreqTable

A table of frequencies of occurrences for every sub group in the data set.

Lmm

A nlme class data structure from <nlme> from the nlme package.

ShapiroTest

The results from a Shapiro-Wilks test. See wilksTest for more information.

Author(s)

Joe Swintek

References

Pinheiro, J.C., and Bates, D.M. (2000) Mixed-Effects Models in S and S-PLUS, Springer

See Also

nlme, glht

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	#Data 
		data(lengthWeightData)
	#Subset the data
		SubData<-lengthWeightData[lengthWeightData$Age=='8 week', ] 
		SubData<-SubData[SubData$Generation=='F1', ]
		SubData<-SubData[SubData$SEX=='M', ]
	#Run 
		
	runMultiGen(Data=SubData, TreatVar = "Treatment", 
		ResponVar = "WEIGHT", RepVar = 'Replicate', TimeVar = "Not Used", 
		Path=3, TestDirection = "Descending")

StatCharrms documentation built on Nov. 14, 2020, 5:09 p.m.