Description Usage Arguments Details Value References Examples

View source: R/carx_residuals.R

Computes the residuals of fitted `carx`

object.
When no censoring is present, the ordinary residuals will be computed.
Otherwise, the simulated residuals (Gourieroux, Monfort, Renault, and Trognon 1987) of a
fitted `carx`

object will be computed, as suggested in Wang and Chan (2017).

1 2 3 |

`object` |
a fitted |

`type` |
a string indicates which type of residual is to be returned. "raw" returns the (simulated) residuals; "pearson" returns the raw residuals divided by estimated standard error of the residuals. |

`seed` |
the seed for the random number generator. |

`...` |
not used. |

The simulated residuals are constructed as follows.
First, impute each unobserved *Y_t^** by a (random) realization from the conditional distribution
*D(Y_t^*|\{(Y_s,X_s)\}_{s=1}^t)*, evaluated at the parameter estimate.
Then, refit the model with *(Y_t^* , X_t)* so obtained, via the method of conditional maximum likelihood;
the residuals from the latter model are the simulated residuals *\varepsilon_t*.

the simulated residuals.

Gourieroux C, Monfort A, Renault E, Trognon A (1987). "Simulated residuals." Journal of Econometrics, 34(1), 201-252.

Wang C, Chan KS (2017). "Quasi-likelihood estimation of a censored autoregressive model with exogenous variables." Journal of the American Statistical Association. 2017 Mar 20(just-accepted).

1 2 3 4 5 6 |

carx documentation built on Nov. 20, 2017, 9:04 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.