# Log-likelihood displacements for single observation and single grouping variable

### Description

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

### Usage

1 2 3 4 5 |

### Arguments

`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 |

### Details

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.

### Author(s)

Przemyslaw Biecek

### Examples

1 2 3 4 5 6 7 8 9 10 |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.