simple_effects | R Documentation |
This is a convenience function to re-estimates a GAMLj model adding simple effect analysis. If no option is passed, extracts the simple effects tables already in the model results (if any). If new tests are defined, the simple effects tests tables are returned.
simple_effects(object, ...)
## S3 method for class 'gamlj'
simple_effects(object, formula = NULL, ...)
object |
a gamlj results object of the class 'gamlj' |
... |
all options accepted by a gamlj model function. Relevant for new tests are
'simple_x' (the simple effect variable), |
formula |
a right hand side formula specifying the variables to test, of the form '~x:z', '~x:z:w' or '~x*z'. The formula is not expanded, so the first variable is the simple effect variable, the second is the moderator, the third an optional additional moderator, an so on. It has prevalence on other options defining a simple effects test via character options. |
a list of tables of class 'ResultsElement'
Marcello Gallucci
data(wicksell)
wicksell$time<-factor(wicksell$time)
wicksell$group<-factor(wicksell$group)
wicksell$subj<-factor(wicksell$subj)
gmod<-GAMLj3::gamlj_mixed(
formula = dv ~ 1 +group+ time:group+ time+( 1 | subj ),
data = wicksell)
simple_effects(gmod,formula =~time:group)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.