[...]
calcAME(treat, group, time, what, vfr, dat)
Character string. Treatment variable.
Grouping variable
Time variable
"Mu" or "Sigma"
gamlss output
Dataframe
List of length 2. Element 1 returns AME by group and time. Elements 2 returns the AME by time.
data(incdat)
vfr <- gamlss()
#> Error in terms(formula, specials = .gamlss.sm.list): promise already under evaluation: recursive default argument reference or earlier problems?
AME_mu <- calcAME("treat", group="SES", time="year", what="mu", vfr, incdat)
#> Error in calcAME("treat", group = "SES", time = "year", what = "mu", vfr, incdat): treat not in dataset