# NOT RUN {
nona.xs.nz <- na.omit(xs.nz) # Overkill!!
nona.xs.nz$dmd <- with(nona.xs.nz, round(drinkmaxday))
nona.xs.nz$feethr <- with(nona.xs.nz, round(feethour))
nona.xs.nz$sleephr <- with(nona.xs.nz, round(sleep))
nona.xs.nz$beats <- with(nona.xs.nz, round(pulse))
p2 <- rrvglm(cbind(dmd, feethr, sleephr, beats) ~ age + smokenow +
depressed + embarrassed + fedup + hurt + miserable + # 11 psychological
nofriend + moody + nervous + tense + worry + worrier, # variables
noRRR = ~ age + smokenow, trace = FALSE, poissonff, data = nona.xs.nz,
Rank = 2)
cp2 <- calibrate(p2, new = head(nona.xs.nz, 9), type = "all", trace = TRUE)
cp2
two.cases <- nona.xs.nz[1:2, ] # Another example
two.cases$dmd <- c(4, 10)
two.cases$feethr <- c(4, 7)
two.cases$sleephr <- c(7, 8)
two.cases$beats <- c(62, 71)
cp2b <- calibrate(p2, new = two.cases, type = "all")
cp2b
# }
Run the code above in your browser using DataLab