simfit_practice_all: Simulate Practice-Effect Data and Fit All Models

Description Usage Arguments Details Value See Also

View source: R/practice_effects.R

Description

Simulate data using sim_practice and then fit three models: a non-linear mixed-effects model (NLME), a linear mixed-effects model (LMEM) and a generalized additive mixed-effects model (GAMM).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
simfit_practice_all(
  n_subj = 48,
  n_trials = 48,
  within_eff = 10,
  between_eff = 24,
  asymptote = 400,
  sweep = 400,
  learning_rate = -2,
  rslope_sd = 20,
  rasym_sd = 40,
  rsweep_sd = 40,
  rlrate_sd = 0,
  err_sd = 20,
  verbose = FALSE
)

Arguments

n_subj

Number of subjects.

n_trials

Number of trials per subject.

within_eff

Mean effect of within-subject factor, coded by xi.

between_eff

Mean effect of between-subject factor, coded by xj.

asymptote

Asymptotic value.

sweep

The 'sweep' of the decline; i.e., the distance from the asymptote to the starting value.

learning_rate

Speed of the decay.

rslope_sd

By-subject standard deviation for the random slope.

rasym_sd

By-subject standard deviation for the random asymptote.

rsweep_sd

By-subject standard deviation for the random sweep.

rlrate_sd

By-subject standard deviation for the learning rate.

err_sd

Error standard deviation.

verbose

Whether to return random effects in the data frame.

Details

Used in Monte Carlo simulation. See sim_practice for details on data generation and fit_practice_models for details on model fitting.

Value

A 44-element numeric vector, containing statistical results for all three models. Paramters are prefixed by G for GAMM results, by L for LMEM results, and by N for NLME results. Following the prefix, is the type of statistic, with est for parameter estimates, se for standard errors, t for t-values, and p for p-values. Finally, the suffix identifies the parameter in question, with int for the intercept, wij for the within-subject effect, and bi for the between-subject effect. There are also specific parameters for the nonlinear model, including asym for the asymptote, sweep for the sweep, and lrc for the learning rate. In cases where the non-linear model estimation fails, the error is trapped and the corresponding N.xxx.xxx values will be set to NA.

See Also

sim_practice for information about data generation, and fit_practice_models for details about model fitting.


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