A general overview of the lcModels class can be found here.

The lcModels() function creates a flat (named) list of lcModel objects. Duplicates are preserved.

lcModels(...)

Arguments

...

lcModel, lcModels, or a recursive list of lcModel objects. Arguments may be named.

Value

A lcModels object containing all specified lcModel objects.

Functionality

See also

Examples


lmkmMethod <- lcMethodLMKM(Y ~ Time, id = "Id", time = "Time")
lmkmModel <- latrend(lmkmMethod, latrendData)
rngMethod <- lcMethodRandom("Y", id = "Id", time = "Time")
rngModel <- latrend(rngMethod, latrendData)

lcModels(lmkmModel, rngModel)
#> List of 2 lcModels with
#>   .name .method
#> 1     1    lmkm
#> 2     2    part
#>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               standardize
#> 1 new("standardGeneric", .Data = function (x, center = TRUE, scale = TRUE) standardGeneric("scale"), generic = structure("scale", package = "base"),     package = "base", group = list(), valueClass = character(0),     signature = c("x", "center", "scale"), default = new("derivedDefaultMethod",         .Data = function (x, center = TRUE, scale = TRUE)         UseMethod("scale"), target = new("signature", .Data = "ANY",             names = "x", package = "methods"), defined = new("signature",             .Data = "ANY", names = "x", package = "methods"),         generic = structure("scale", package = "base")), skeleton = (new("derivedDefaultMethod",         .Data = function (x, center = TRUE, scale = TRUE)         UseMethod("scale"), target = new("signature", .Data = "ANY",             names = "x", package = "methods"), defined = new("signature",             .Data = "ANY", names = "x", package = "methods"),         generic = structure("scale", package = "base")))(x, center,         scale))
#> 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <NA>
#>   method model     y   qr singular.ok iter.max nstart
#> 1     qr  TRUE FALSE TRUE        TRUE       10      1
#> 2   <NA>    NA    NA   NA          NA       NA     NA
#>                                          algorithm  formula alpha   name
#> 1 c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen") Y ~ Time    NA   <NA>
#> 2                                             <NA>     <NA>    10 random
#>   response
#> 1     <NA>
#> 2        Y

lcModels(defaults = c(lmkmModel, rngModel))
#> List of 2 lcModels with
#>       .name .method
#> 1 defaults1    lmkm
#> 2 defaults2    part
#>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               standardize
#> 1 new("standardGeneric", .Data = function (x, center = TRUE, scale = TRUE) standardGeneric("scale"), generic = structure("scale", package = "base"),     package = "base", group = list(), valueClass = character(0),     signature = c("x", "center", "scale"), default = new("derivedDefaultMethod",         .Data = function (x, center = TRUE, scale = TRUE)         UseMethod("scale"), target = new("signature", .Data = "ANY",             names = "x", package = "methods"), defined = new("signature",             .Data = "ANY", names = "x", package = "methods"),         generic = structure("scale", package = "base")), skeleton = (new("derivedDefaultMethod",         .Data = function (x, center = TRUE, scale = TRUE)         UseMethod("scale"), target = new("signature", .Data = "ANY",             names = "x", package = "methods"), defined = new("signature",             .Data = "ANY", names = "x", package = "methods"),         generic = structure("scale", package = "base")))(x, center,         scale))
#> 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <NA>
#>   method model     y   qr singular.ok iter.max nstart
#> 1     qr  TRUE FALSE TRUE        TRUE       10      1
#> 2   <NA>    NA    NA   NA          NA       NA     NA
#>                                          algorithm  formula alpha   name
#> 1 c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen") Y ~ Time    NA   <NA>
#> 2                                             <NA>     <NA>    10 random
#>   response
#> 1     <NA>
#> 2        Y