effectsdfhelp: Create a dataframe based on an 'observed' variable design and...

Usage Arguments Examples

Usage

1
effectsdf(variablespecification, effectspecifications)

Arguments

variablespecification

A list of 'observed' variables to create a design specification. Must include 'participant' as one variable.

effectspecifications

A list of effects. Effect names must be variable names from variablespecification prefixed with 'b'. Must specify level at which to apply as second argument.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Please note these parameter values are provided for illustrative purposes only

observedvariables = as.list(c(participant = "rep(1:20, each = 40)",
                              qriscore = "rnorm(participant, 10, 2)",
                              hlvascore = "rnorm(participant, 8, 0.5)",
                              texts = "rep(1:10, times = 20, each = 4)",
                              question = "rep(1:800)"))

effectvariables = as.list(c(intercept = "0.15",
                            bparticipant = "rnorm(participant, mean=0, sd=0.04)",
                            bqriscore = "rnorm(participant, 0.025, 0.001)",
                            bhlvascore = "rnorm(participant, 0.02, 0.001)",
                            btexts = "rnorm(texts, 0, 0.02)",
                            bquestion = "rnorm(question, 0, 0.015)"))

effectsdf(observedvariables, effectvariables)

chaddlewick/spr documentation built on May 14, 2019, 3:06 a.m.