## ------------------------------------------------
## Method `MeanFunction$n`
## ------------------------------------------------
# \dontshow{
setParallel(FALSE) # for the CRAN check
# }
df <- nelder(~(cl(4)*t(5)) > ind(5))
df$int <- 0
df[df$cl <= 2, 'int'] <- 1
mf1 <- MeanFunction$new(formula = ~ int ,
data=df,
parameters = c(-1,1)
)
mf1$n()
## ------------------------------------------------
## Method `MeanFunction$new`
## ------------------------------------------------
# \dontshow{
setParallel(FALSE) # for the CRAN check
# }
df <- nelder(~(cl(4)*t(5)) > ind(5))
df$int <- 0
df[df$cl <= 2, 'int'] <- 1
mf1 <- MeanFunction$new(formula = ~ int ,
data=df,
parameters = c(-1,1),
)
## ------------------------------------------------
## Method `MeanFunction$colnames`
## ------------------------------------------------
# \dontshow{
setParallel(FALSE) # for the CRAN check
# }
df <- nelder(~(cl(4)*t(5)) > ind(5))
df$int <- 0
df[df$cl <= 5, 'int'] <- 1
mf1 <- MeanFunction$new(formula = ~ int ,
data=df,
parameters = c(-1,1)
)
mf1$colnames(c("cluster","time","individual","treatment"))
mf1$colnames()
## ------------------------------------------------
## Method `MeanFunction$subset_rows`
## ------------------------------------------------
# \dontshow{
setParallel(FALSE) # for the CRAN check
# }
df <- nelder(~(cl(4)*t(5)) > ind(5))
df$int <- 0
df[df$cl <= 5, 'int'] <- 1
mf1 <- MeanFunction$new(formula = ~ int ,
data=df,
parameters = c(-1,1)
)
mf1$subset_rows(1:20)
Run the code above in your browser using DataLab