tests/testthat/test-plot.R

context("plot.brokenstick")

# ctl <- control_brokenstick(kr = control_kr(imp_skip = 10))
# knots <- round(c(0, 1, 2, 3, 6, 9, 12, 15, 18, 24)/12, 4)
# data <- brokenstick:::reset_data(smocc_200[!is.na(smocc_200$hgt_z), ],
#                                  names = list(x = "age", y = "hgt_z", g = "id"),
#                                  x = knots)
# data$.source <- NULL
# fit_kr <- brokenstick(hgt_z ~ age | id, data = data,
#                       knots = knots, boundary = c(0, 3),
#                       method = "kr", control = ctl, seed = 81204)
# plot(fit_kr, newdata = data, show = c(TRUE, FALSE, TRUE), group = c(10001, 10005, 10022))

Try the brokenstick package in your browser

Any scripts or data that you put into this service are public.

brokenstick documentation built on March 31, 2023, 9:24 p.m.