Functions for log-likelihood displacements for each observation or each level of given factor

1 2 3 4 5 |

`model` |
a mixed model of the class mer, |

`fixef, vcor` |
model parameters log-likelihood evaluation, if not provided then the estimates extracted from the 'model' parameter will be used |

`formula` |
a model formula that will be passes to the nlme function |

`data` |
a data frame |

`var` |
a name of grouping variable (factor) for which the group log-likelihood displacement will be performed |

`inds` |
indexes of observations for which observation log-likelihood displacement will be performed |

Likelihood displacement is defined as a difference of likelihoods calculated on full dataset for two models with different sets of parameters. The first model is a model with ML estimates obtained for full dataset, while the second model is a model with ML estimates obtained on dataset without a selected observation or group of observations.

Likelihood displacements are used in model diagnostic.

Note that these functions reestimate coefficients in a set of model may be a time consuming.

The function recalculateLogLik() calculated a log-likelihood for model defined by the object model and model parameters defined in following function arguments.

The functions groupDisp() and obsDisp() calculates how the log-likelihood will decrees if selected groups or selected observations will not be used for parameter estimates. Note that log-likelihood is calculated on full dataset.

Przemyslaw Biecek

1 2 3 4 5 6 7 8 9 10 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.