fitnocorr: Run mixed-effects model using ('lmer')

Description Usage Arguments Value See Also Examples

View source: R/onefactor.R

Description

Fits a LMEM with random slopes and random intercepts but no random correlations (one-factor design only).

Usage

1
fitnocorr(mcr.data, wsbi = FALSE)

Arguments

mcr.data

A dataframe formatted as described in mkDf.

wsbi

Whether the design is between-items (TRUE) or within-items (FALSE).

Value

A vector with elements:

fm

Code for the model that converged: (1) dropped one slope; (2) dropped two slopes; (3) main model did not converge; (4) comparision model for likelihood ratio test did not converge.

t

t-statistic for the treatment effect

chi

chi-square statistic for the likelihood ratio test (1 df)

pt

p-value for the t-statistic (normal distribution)

pchi

p-value for the chi-square statistic

See Also

mkDf, fitlmer.mcmc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
nmc <- 10
pmx <- cbind(randParams(genParamRanges(), nmc, 1001), seed=mkSeeds(nmc, 1001))

# between-items dataset
x.bi <- mkDf(nsubj=24, nitem=24, mcr.params=pmx[1,], wsbi=TRUE)

# within-items dataset
x.wi <- mkDf(nsubj=24, nitem=24, mcr.params=pmx[1,], wsbi=FALSE)

# maximal model
fitnocorr(x.bi, wsbi=TRUE)
fitnocorr(x.wi, wsbi=FALSE)

dalejbarr/simgen documentation built on Jan. 28, 2019, 7:43 p.m.