Revision 61fc3cd89e7f6776279333b534652356c7059f89 authored by Charles J. Geyer on 13 June 2021, 03:40:32 UTC, committed by cran-robot on 13 June 2021, 03:40:32 UTC
1 parent 1cc05f6
parm.Rout.save
R version 4.0.0 (2020-04-24) -- "Arbor Day"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
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(aster)
>
> data(echinacea)
>
> # cut and paste from help(predict.aster)
> vars <- c("ld02", "ld03", "ld04", "fl02", "fl03", "fl04",
+ "hdct02", "hdct03", "hdct04")
> redata <- reshape(echinacea, varying = list(vars), direction = "long",
+ timevar = "varb", times = as.factor(vars), v.names = "resp")
> redata <- data.frame(redata, root = 1)
> pred <- c(0, 1, 2, 1, 2, 3, 4, 5, 6)
> fam <- c(1, 1, 1, 1, 1, 1, 3, 3, 3)
> hdct <- grepl("hdct", as.character(redata$varb))
> redata <- data.frame(redata, hdct = as.integer(hdct))
> level <- gsub("[0-9]", "", as.character(redata$varb))
> redata <- data.frame(redata, level = as.factor(level))
> aout <- aster(resp ~ varb + level : (nsloc + ewloc) + hdct : pop,
+ pred, fam, varb, id, root, data = redata)
> # end of cut and paste from help(predict.aster)
>
> length(aout$dropped)
[1] 1
> # so would have had a problem with restart in version 1.0-3 and before
> aout <- aster(resp ~ varb + level : (nsloc + ewloc) + hdct : pop,
+ pred, fam, varb, id, root, data = redata, parm = aout$coefficients,
+ optout = TRUE)
> aout$optout$converged
[1] TRUE
> aout$optout$iterations == 1
[1] TRUE
>
>
> proc.time()
user system elapsed
0.677 0.032 0.700
Computing file changes ...