nnnegbin {addreg} | R Documentation |

## ECME Algorithm for Additive Negative Binomial 1 Model

### Description

Finds the maximum likelihood estimate of an additive negative binomial (NB1) model using an ECME algorithm, where each of the mean coefficients is restricted to be non-negative.

### Usage

```
nnnegbin(y, x, standard, offset, start, control = addreg.control(),
accelerate = c("em", "squarem", "pem", "qn"),
control.method = list())
```

### Arguments

`y` |
non-negative integer response vector. |

`x` |
non-negative covariate matrix. |

`standard` |
standardising vector, where each element is a positive constant that (multiplicatively) standardises the fitted value of the corresponding element of the response vector. The default is a vector of ones. |

`offset` |
non-negative additive offset vector. The default is a vector of zeros. |

`start` |
vector of starting values for the parameter estimates. The last element is
the starting value of the |

`control` |
an |

`accelerate` |
a character string that determines the acceleration
algorithm to be used, (partially) matching one of |

`control.method` |
a list of control parameters for the acceleration algorithm. See |

### Details

This is a workhorse function for `addreg`

, and runs the ECME algorithm to find the
constrained non-negative MLE associated with an additive NB1 model.

### Value

A list containing the following components

`coefficients` |
the constrained non-negative maximum likelihood estimate of the mean parameters. |

`scale` |
the maximum likelihood estimate of the scale parameter. |

`residuals` |
the residuals at the MLE, that is |

`fitted.values` |
the fitted mean values. |

`rank` |
the number of parameters in the model (named “ |

`family` |
included for compatibility — will always be |

`linear.predictors` |
included for compatibility — same as |

`deviance` |
up to a constant, minus twice the maximised log-likelihood (with respect to
a saturated NB1 model with the same |

`aic` |
a version of Akaike's |

`aic.c` |
a small-sample corrected
version of Akaike's |

`null.deviance` |
the deviance for the null model, comparable with |

`iter` |
the number of iterations of the EM algorithm used. |

`weights` |
included for compatibility — a vector of ones. |

`prior.weights` |
included for compatibility — a vector of ones. |

`standard` |
the |

`df.residual` |
the residual degrees of freedom. |

`df.null` |
the residual degrees of freedom for the null model. |

`y` |
the |

`converged` |
logical. Did the ECME algorithm converge
(according to |

`boundary` |
logical. Is the MLE on the boundary of the parameter
space — i.e. are any of the |

`loglik` |
the maximised log-likelihood. |

`nn.design` |
the non-negative |

### Author(s)

Mark W. Donoghoe markdonoghoe@gmail.com.

### References

Donoghoe, M. W. and I. C. Marschner (2016). Estimation of adjusted rate
differences using additive negative binomial regression. *Statistics
in Medicine* 35(18): 3166–3178.

Hurvich, C. M., J. S. Simonoff and C.-L. Tsai (1998). Smoothing parameter
selection in non-parametric regression using an improved Akaike
information criterion.
*Journal of the Royal Statistical Society: Series B (Statistical Methodology)* 60(2): 271–293.

*addreg*version 3.0 Index]