View source: R/summarySecDiff.r
summarySecDiff | R Documentation |
Due to the identifiability problem of the APC model are the latent effects not interpretable, however, the second differences representing measure of curvature are. This function returns summary information for the second differences either on the internal log scale or the exponential scale for age, period or cohort effects. On the exponential scale, these contrasts represent ratios of two adjacent relative
risks. Caution, in order to extract the summary information the option secondDiff
needs to be set in the function BAPC
.
summarySecDiff(APCList, variable="age", log=FALSE)
APCList |
a |
variable |
a string indicating for which of "age", "period" or "cohort" effects, the summary information is desired. |
log |
Boolean (default:FALSE) indicating whether the summary information should be returned on the log scale, i.e. the real second differences of age effects, say, or for the exponential transformation to get in on the observation scale. |
A matrix including mean, standard deviation and quantile information.
Andrea Riebler
BAPC
## Not run: if(requireNamespace("INLA", quietly = TRUE)) { require(INLA) data(FemLCSweden) data(FemPYSweden) data(whostandard) lc_sweden <- APCList(FemLCSweden, FemPYSweden, gf=5) result <- BAPC(lc_sweden, predict=list(npredict=10, retro=TRUE), secondDiff=TRUE, stdweight=NULL, verbose=FALSE) summarySecDiff(result, variable="period", log=FALSE) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.