Description Usage Arguments Details Value Author(s) References See Also Examples
logbin.smooth
fits log-link binomial
regression models using a stable CEM algorithm. It provides additional
flexibility over logbin
by allowing for smooth
semi-parametric terms.
1 2 3 4 |
formula |
an object of class |
mono |
a vector indicating which terms in
|
data |
an optional data frame, list or environment
(or object coercible by |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
na.action |
a function which indicates what should happen when the data
contain |
offset |
this can be used to specify an a
priori known component to be included in the linear
predictor during fitting. This should be |
control |
a list of parameters for controlling the
fitting process, passed to
|
model |
a logical value indicating whether the model frame should be included as a component of the returned value. |
model.logbin |
a logical value indicating whether the fitted |
method |
a character string that determines which EM-type algorithm to use
to find the MLE: Unlike |
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 |
... |
arguments to be used to form the default
|
logbin.smooth
performs the same fitting process as logbin
,
providing a stable maximum likelihood estimation procedure for log-link
binomial GLMs, with the added flexibility of allowing semi-parametric
B
and Iso
terms (note that logbin.smooth
will stop with an
error if no semi-parametric terms are specified in the right-hand side of the formula
;
logbin
should be used instead).
The method partitions the parameter space associated with the semi-parametric part of the
model into a sequence of constrained parameter spaces, and defines a fully parametric
logbin
model for each. The model with the highest log-likelihood is the MLE for
the semi-parametric model (see Donoghoe and Marschner, 2015).
An object of class "logbin.smooth"
, which contains the same objects as class
"logbin"
(the same as "glm"
), as well as:
model.logbin |
if |
xminmax.smooth |
the minimum and maximum observed values for each of the smooth terms in the model, to help define the covariate space. |
full.formula |
the component from |
knots |
a named list containing the knot vectors for each of the smooth terms in the model. |
Mark W. Donoghoe markdonoghoe@gmail.com
Donoghoe, M. W. and I. C. Marschner (2015). Flexible regression models for rate differences, risk differences and relative risks. International Journal of Biostatistics 11(1): 91–108.
Donoghoe, M. W. and I. C. Marschner (2018). logbin: An R package for relative risk regression using the log-binomial model. Journal of Statistical Software 86(9): 1–22.
Marschner, I. C. (2014). Combinatorial EM algorithms. Statistics and Computing 24(6): 921–940.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Simple example
x <- c(0.3, 0.2, 0.0, 0.1, 0.2, 0.1, 0.7, 0.2, 1.0, 0.9)
y <- c(5, 4, 6, 4, 7, 3, 6, 5, 9, 8)
system.time(m1 <- logbin.smooth(cbind(y, 10-y) ~ B(x, knot.range = 0:2), mono = 1, trace = 1))
## Compare with accelerated version
system.time(m1.acc <- update(m1, accelerate = "squarem"))
## Isotonic relationship
m2 <- logbin.smooth(cbind(y, 10-y) ~ Iso(x))
plot(m1)
plot(m2)
summary(predict(m1, type = "response"))
summary(predict(m2, type = "response"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.