Description Usage Arguments Details Value GAMM LMEM Examples
View source: R/stroop_simulate.R
Uses bam
to fit two Generalized Additive
Mixed-Effects Models (GAMM) and a Linear Mixed-Effects Model (LMEM)
to simulated Stroop data.
1 | fit_stroop(dat)
|
dat |
A data.frame with simulated stroop data, the result of
|
The models fit to the data are:
A named 27-element vector with the following statistical results:
Gp.e.B0
Estimated fixed intercept of the penalized GAMM model.
Gp.e.B1
Estimated fixed effect of within-subject factor of the penalized GAMM model.
Gp.e.B2
Estimated fixed effect of between-subject factor of the penalized GAMM model.
Gp.se.B0
Standard error for the intercept of the penalized GAMM model.
Gp.se.B1
Standard error for within-effect of the penalized GAMM model.
Gp.se.B2
Standard error for between-effect of the penalized GAMM model.
Gp.p.B0
P-value for the intercept of the penalized GAMM model.
Gp.p.B1
P-value for within-effect of the penalized GAMM model.
Gp.p.B2
P-value for between-effect of the penalized GAMM model.
Gu.e.B0
Estimated fixed intercept of the unpenalized GAMM model.
Gu.e.B1
Estimated fixed effect of within-subject factor of the unpenalized GAMM model.
Gu.e.B2
Estimated fixed effect of between-subject factor of the unpenalized GAMM model.
Gu.se.B0
Standard error for the intercept of the unpenalized GAMM model.
Gu.se.B1
Standard error for within-effect of the unpenalized GAMM model.
Gu.se.B2
Standard error for between-effect of the unpenalized GAMM model.
Gu.p.B0
P-value for the intercept of the unpenalized GAMM model.
Gu.p.B1
P-value for within-effect of the unpenalized GAMM model.
Gu.p.B2
P-value for between-effect of the unpenalized GAMM model.
Lm.e.B0
Estimated fixed intercept of the LMEM model.
Lm.e.B1
Estimated fixed effect of within-subject factor of the LMEM model.
Lm.e.B2
Estimated fixed effect of between-subject factor of the LMEM model.
Lm.se.B0
Standard error for the intercept of the LMEM model.
Lm.se.B1
Standard error for within-effect of the LMEM model.
Lm.se.B2
Standard error for between-effect of the LMEM model.
Lm.p.B0
P-value for the intercept of the LMEM model.
Lm.p.B1
P-value for within-effect of the LMEM model.
Lm.p.B2
P-value for between-effect of the LMEM model.
with penalized factor smooths:
bam(Y_ij ~ W_ij + B_i +
s(trial, bs = "tp") + # common smooth
s(session_id, trial, bs = "fs", m = 1) + # factor smooth
s(W_ij, session_id, bs = "re"), # random slope
data = dat)
and unpenalized factor smooths:
bam(Y_ij ~ W_ij + B_i +
s(trial, bs = "tp") + # common smooth
s(session_id, trial, bs = "fs") # factor smooth
s(W_ij, session_id, bs = "re"), # random slope
data = dat)
bam(Y_ij ~ W_ij + B_i +
s(session_id, bs = "re") + # random intercept
s(W_ij, session_id, bs = "re"), # random slope
data = dat)
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.