This is a convenience function to re-estimates a GAMLj model adding posthoc tests. If no option is passed, extracts the post-hoc tests tables already in the model results (if any). If new post-hoc are defined, the post-hoc tests tables are returned.

posthoc(object, ...)

# S3 method for class 'gamlj'
posthoc(object, formula = NULL, ...)

Arguments

object

a gamlj results object of the class `gamlj`

...

all options accepted by a gamlj model function. Relevant for new tests are `post_hoc` (a list of list of terms), `adjust`, a list of correction to apply: one or more of none, bonf, holm, scheffe or sidak.

formula

a right hand side formula specifying the factors or factors combinations to test, of the form `~x+z`, `~x:z` or `~x*z`. It has prevalence on other options defining a post-hoc test via character options.

Value

a list of tables of class `ResultsElement`

Author

Marcello Gallucci

Examples

data(fivegroups)
fivegroups$Group<-factor(fivegroups$Group)
gmod<-GAMLj3::gamlj_lm(
  formula = Score ~Group,
  data = fivegroups)

posthoc(gmod,formula =~Group)
#> 
#>  POST HOC TESTS
#> 
#>  Post Hoc comparison:  Group                                                              
#>  ──────────────────────────────────────────────────────────────────────────────────────── 
#>    Group    vs    Group    Difference    SE           t             df     p-bonferroni   
#>  ──────────────────────────────────────────────────────────────────────────────────────── 
#>    1        -     2         0.1001010    0.1148116     0.8718719    166       1.0000000   
#>    1        -     3        -0.2435657    0.1083130    -2.2487194    166       0.1550748   
#>    1        -     4        -0.4431212    0.1083130    -4.0911157    166       0.0004010   
#>    2        -     3        -0.3436667    0.1142361    -3.0083893    166       0.0182139   
#>    2        -     4        -0.5432222    0.1142361    -4.7552588    166       0.0000257   
#>    3        -     4        -0.1995556    0.1077028    -1.8528349    166       0.3940883   
#>  ──────────────────────────────────────────────────────────────────────────────────────── 
#>