This is a convenience function to test and extract estimates and information about custom contrast.

test_contrasts(object, contrasts, ...)

Arguments

object

a gamlj results object of the class `gamlj`

contrasts

a named list with contrasts weights to test of the form list(factor1=c(a1,a2,b3), factor2=c(b1,b2,b3)). Multiple contrasts for the same factor can be tested. In this case, each contrast is tested independently.

...

all options accepted by a gamlj model function.

Value

an object of class

Author

Marcello Gallucci

Examples

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

em_means(gmod,formula =~Group)
#> 
#>  ESTIMATED MARGINAL MEANS
#> 
#>  Estimate Marginal Means - Group                                        
#>  ────────────────────────────────────────────────────────────────────── 
#>    Group    Mean          SE           df     Lower         Upper       
#>  ────────────────────────────────────────────────────────────────────── 
#>    1         0.0095455    0.0770180    166    -0.1425156    0.1616065   
#>    2        -0.0905556    0.0851466    166    -0.2586653    0.0775542   
#>    3         0.2531111    0.0761574    166     0.1027492    0.4034731   
#>    4         0.4526667    0.0761574    166     0.3023047    0.6030286   
#>  ────────────────────────────────────────────────────────────────────── 
#>