fitnocorr.mcmc: Run mixed-effects model ('lmer') with MCMC p-value

Description Usage Arguments Details Note See Also Examples

View source: R/onefactor.R

Description

Uses lmer to fit a random-intercepts only model, and then uses mcmcsamp to obtain p-values.

Usage

1
fitnocorr.mcmc(mcr.data, wsbi = FALSE, nmcmc = 10000)

Arguments

mcr.data

A dataframe formatted as described in mkDf.

wsbi

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

nmcmc

Number of Markov-Chain Monte Carlo simulations (default = 10000).

Details

If the model does not converge, returns NA. The MCMC procedure is based on Baayen's pvals.fnc in package languageR.

Note

This function no longer works and will throw an error, as the mcmcsamp function was removed starting with lme4 package 1.0; see mcmcsamp for details. slopes.

See Also

fitnocorr

Examples

1
2
3
4
5
6
7
8
9
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)

# NB: small number of MCMC runs so that the example runs quickly
# increase the number of runs for stable results
fitnocorr.mcmc(x.bi, wsbi=TRUE, nmcmc=1000) 

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