Finds the maximum likelihood estimate of a log-link binomial GLM using an EM algorithm, where each of the coefficients in the linear predictor is restricted to be non-positive.

1 2 3 |

`y` |
binomial response. May be a single column of 0/1 or two columns, giving the number of successes and failures. |

`x` |
non-negative covariate matrix. |

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

`start` |
starting values for the parameter estimates. All elements must be less than
or equal to |

`control` |
a |

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

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

This is a workhorse function for `logbin`

, and runs the EM algorithm to find the
constrained non-positive MLE associated with a log-link binomial GLM. See Marschner
and Gillett (2012) for full details.

A list containing the following components

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

`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` |
the linear fit on link scale. |

`deviance` |
up to a constant, minus twice the maximised log-likelihood. |

`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` |
the number of trials associated with each binomial response. |

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

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

`y` |
the |

`converged` |
logical. Did the EM 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 |

Mark W. Donoghoe markdonoghoe@gmail.com.

This function is based on code from Marschner and Gillett (2012) written by Alexandra Gillett.

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.

Marschner, I. C. and A. C. Gillett (2012). Relative risk regression: reliable
and flexible methods for log-binomial models. *Biostatistics* 13(1): 179–192.

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

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