This vignette analyzes data from a two-factor mixed design.
Factor <- c(1,1,1,1,2,2,2,2)
Outcome1 <- c(0,0,3,5,1,3,6,6)
Outcome2 <- c(4,7,4,9,3,1,6,6)
Outcome3 <- c(4,9,6,9,3,3,6,8)
Factor <- factor(Factor,levels=c(1,2),labels=c("Level1","Level2"))
MixedData <- data.frame(Factor,Outcome1,Outcome2,Outcome3)
MixedData
## Factor Outcome1 Outcome2 Outcome3
## 1 Level1 0 4 4
## 2 Level1 0 7 9
## 3 Level1 3 4 6
## 4 Level1 5 9 9
## 5 Level2 1 3 3
## 6 Level2 3 1 3
## 7 Level2 6 6 6
## 8 Level2 6 6 8
descMeansBy(cbind(Outcome1,Outcome2,Outcome3),by=Factor)
## $`Descriptive Statistics for the Data: Level1`
## N M SD
## Outcome1 4.000 2.000 2.449
## Outcome2 4.000 6.000 2.449
## Outcome3 4.000 7.000 2.449
##
## $`Descriptive Statistics for the Data: Level2`
## N M SD
## Outcome1 4.000 4.000 2.449
## Outcome2 4.000 4.000 2.449
## Outcome3 4.000 5.000 2.449
ciMeansBy(cbind(Outcome1,Outcome2,Outcome3),by=Factor)
## $`Confidence Intervals for the Means: Level1`
## M SE df LL UL
## Outcome1 2.000 1.225 9.000 -0.771 4.771
## Outcome2 6.000 1.225 9.000 3.229 8.771
## Outcome3 7.000 1.225 9.000 4.229 9.771
##
## $`Confidence Intervals for the Means: Level2`
## M SE df LL UL
## Outcome1 4.000 1.225 9.000 1.229 6.771
## Outcome2 4.000 1.225 9.000 1.229 6.771
## Outcome3 5.000 1.225 9.000 2.229 7.771
ciMeansBy(cbind(Outcome1,Outcome2,Outcome3),by=Factor,conf.level=.99)
## $`Confidence Intervals for the Means: Level1`
## M SE df LL UL
## Outcome1 2.000 1.225 9.000 -1.980 5.980
## Outcome2 6.000 1.225 9.000 2.020 9.980
## Outcome3 7.000 1.225 9.000 3.020 10.980
##
## $`Confidence Intervals for the Means: Level2`
## M SE df LL UL
## Outcome1 4.000 1.225 9.000 0.020 7.980
## Outcome2 4.000 1.225 9.000 0.020 7.980
## Outcome3 5.000 1.225 9.000 1.020 8.980
nhstMeansBy(cbind(Outcome1,Outcome2,Outcome3),by=Factor)
## $`Hypothesis Tests for the Means: Level1`
## Diff SE t df p
## Outcome1 2.000 1.225 1.633 9.000 0.137
## Outcome2 6.000 1.225 4.899 9.000 0.001
## Outcome3 7.000 1.225 5.715 9.000 0.000
##
## $`Hypothesis Tests for the Means: Level2`
## Diff SE t df p
## Outcome1 4.000 1.225 3.266 9.000 0.010
## Outcome2 4.000 1.225 3.266 9.000 0.010
## Outcome3 5.000 1.225 4.082 9.000 0.003
nhstMeansBy(cbind(Outcome1,Outcome2,Outcome3),by=Factor,mu=5)
## $`Hypothesis Tests for the Means: Level1`
## Diff SE t df p
## Outcome1 -3.000 1.225 -2.449 9.000 0.037
## Outcome2 1.000 1.225 0.816 9.000 0.435
## Outcome3 2.000 1.225 1.633 9.000 0.137
##
## $`Hypothesis Tests for the Means: Level2`
## Diff SE t df p
## Outcome1 -1.000 1.225 -0.816 9.000 0.435
## Outcome2 -1.000 1.225 -0.816 9.000 0.435
## Outcome3 0.000 1.225 0.000 9.000 1.000
descMultifactor(cbind(Outcome1,Outcome2,Outcome3),by=Factor)
## $`Source Table for the Effects: Between Subjects`
## SS df MS
## Factor 2.667 1.000 2.667
## Residuals 88.000 6.000 14.667
##
## $`Source Table for the Effects: Within Subjects`
## SS df MS
## Measures 37.333 2.000 18.667
## Measures:Factor 21.333 2.000 10.667
## Residuals 20.000 12.000 1.667
nhstMultifactor(cbind(Outcome1,Outcome2,Outcome3),by=Factor)
## $`Hypothesis Tests for the Effects: Between Subjects`
## F df p
## Factor 0.182 1.000 0.685
## Residuals NA 6.000 NA
##
## $`Hypothesis Tests for the Effects: Within Subjects`
## F df p
## Measures 11.200 2.000 0.002
## Measures:Factor 6.400 2.000 0.013
## Residuals NA 12.000 NA
pvaMultifactor(cbind(Outcome1,Outcome2,Outcome3),by=Factor)
## $`Proportion of Variance Accounted for by the Effects: Between Subjects`
## EtaSq ParEtaSq
## Factor 0.029 0.029
## Residuals 0.971 NA
##
## $`Proportion of Variance Accounted for by the Effects: Within Subjects`
## EtaSq ParEtaSq
## Measures 0.475 0.651
## Measures:Factor 0.271 0.516
## Residuals 0.254 NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.