fit_stroop: Fit GAMM and LMEM Models to Simulated Stroop Data

Description Usage Arguments Details Value GAMM LMEM Examples

View source: R/stroop_simulate.R

Description

Uses bam to fit two Generalized Additive Mixed-Effects Models (GAMM) and a Linear Mixed-Effects Model (LMEM) to simulated Stroop data.

Usage

1

Arguments

dat

A data.frame with simulated stroop data, the result of simulate_stroop.

Details

The models fit to the data are:

Value

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.

GAMM

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)

LMEM

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)

Examples

1

dalejbarr/autocorr documentation built on March 27, 2021, 3:03 a.m.