BICadj
and AICadj
calculate the BIC and AIC for SITAR models, adjusting
the likelihood for Box-Cox transformed y variables. varexp
calculates the variance
explained by SITAR models, compared to the corresponding fixed effect models.BICadj(..., pattern)
AICadj(..., k = 2, pattern)
varexp(..., pattern)
BICadj
and AICadj
a named vector of deviances in increasing order.
For varexp
a named vector of percentages in decreasing order.The variance explained is given by
BICadj
and AICadj
accept non-sitar
models with a logLik
class.
varexp
ignores objects not of class sitar
.
BIC
, AIC
data(heights)
## fit sitar model for height
m1 <- sitar(x=age, y=height, id=id, data=heights, df=5)
## update it for log(height)
m2 <- update(m1, y=sqrt(height))
## compare variance explained in the two models
varexp(m1, m2)
## compare BIC adjusting for sqrt transform
## the pattern matches names starting with "m" followed by a digit
BICadj(pattern="^m[0-9]")
Run the code above in your browser using DataLab