Description Usage Arguments Details Value Author(s) References
Computes forecasts for a model with AP structure.
The data can have any form allowed in, see apc.data.list
. These are all special cases of
generalised trapezoids. If the "lower triangle" with the
largest (age,coh) values are not observed, they can be forecast using this function.
The function extrapolates the AP model to the lower triangle where
per.zero+per.max < per <= age.max+coh.max-1
.
The estimates of the age parameters can be used for the lower triangle.
The estimates of the period parameters need to be extrapolated for the lower triangle.
Thus, the function extrapolates
per.forecast.J=age.max+coh.max-1-per.zero-per.max
period values.
The extrapolation method has to chosen so as not to introduce an identification problem, see
Kuang, Nielsen and Nielsen (2008b,2011).
Two such extrapolation methods are implemented in this function: "I0" and "I1".
The default is to report the linear predictor.
If the model.family="binominal.dose.response"
, that is a logistic model,
then forecasts of dose, response and survival probability are given for lower triangle.
1 | apc.forecast.ap(apc.fit,extrapolation.type="I0",suppress.warning=TRUE)
|
apc.fit |
List. Output from |
extrapolation.type |
Character. Choices for extrapolating the differenced period parameter ("Delta.beta_per"). Default is "I0".
Both methods are invariant to ad hoc identification of the implied period time effect, by
following the ideas put forward in
Kuang, Nielsen and Nielsen (2008b).
Internally, the extrapolation is done as follows.
The estimated differenced period parameters are found from
"apc.fit$coefficients.canonical" using
|
suppress.warning |
Logical. If true, suppresses warnings from |
When model.family=binomial.dose.response
forecasts are made by the component method, see Cox (1976).
It is intended to be used for a population analysis situation where the response equals cohort-decrease of dose.
For cell in forecast array with index (age,cohort)
then:
Survival probability is survival=1/(1+exp(predictor_(a,c)))
.
Dose is dose_(a,c)=max(0,dose_(a-1,c)-response_(a-1,c))
.
Response is response_(a,c)=dose_(a,c)*(1-survival_(a,c))
.
trap.predictors.forecast |
Matrix. Includes estimates and point forecasts of linear predictor. That is design*coefficient.
Same as the |
index.trap.J |
Matrix. age-coh coordinates for forecast area. Similar structure to
|
D.xi.per.extrapolated |
Matrix. Extrapolated parameters. Dimension |
trap.dose.forecast |
Matrix. Includes data and point forecasts. Forecasts in lower right triangle.
Dose in cell age,coh equal to dose in cell age-1,coh minus response in cell age-1,coh.
Only implemented for |
trap.response.forecast |
Matrix. Includes data and point forecasts. Forecasts in lower right triangle.
Response in cell age,coh equal to dose in cell age,coh times 1 minus probability of surviving in that cell.
Only implemented for |
trap.survival.forecast |
Matrix. Point forecasts. Forecasts in lower right triangle
Probability of surviving computed from |
Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 2 May 2016 (2 Mar 2016)
Cox, P.R. (1976) Demography. 5th Edition. Cambridge: Cambridge University Press. (page 324).
Kuang, D., Nielsen, B. and Nielsen, J.P. (2008b) Forecasting with the age-period-cohort model and the extended chain-ladder model. Biometrika 95, 987-991. Download: Article; Earlier version Nuffield DP.
Kuang, D., Nielsen B. and Nielsen J.P. (2011) Forecasting in an extended chain-ladder-type model. Journal of Risk and Insurance 78, 345-359. Download: Article; Earlier version: Nuffield DP.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.