R Under development (unstable) (2024-09-15 r87152 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > library(aster2) Loading required package: Matrix This is beta software. Unless you need to do aster models with dependence groups, use package "aster" instead. See help(aster2-package) for differences from package "aster" and examples. > > data(test1) > > fred <- asterdata(test1, + vars = c("m1", "m2", "m3", "n1", "n2", "b1", "p1", "z1"), + pred = c(0, 0, 0, 1, 1, 2, 3, 6), group = c(0, 1, 2, 0, 4, 0, 0, 0), + code = c(1, 1, 1, 2, 2, 3, 4, 5), + families = list(fam.multinomial(3), "normal.location.scale", + "bernoulli", "poisson", "zero.truncated.poisson")) > > theta.star <- aster2:::starting(fred) > > idx.minus.one <- as.character(fred$redata$varb) == "n2" > > all(theta.star[idx.minus.one] == (- 1)) [1] TRUE > all(theta.star[! idx.minus.one] == 0) [1] TRUE > > > proc.time() user system elapsed 0.76 0.12 0.87