Description Usage Arguments Details Value Author(s) References See Also Examples
logbin.smooth
fits loglink binomial
regression models using a stable CEM algorithm. It provides additional
flexibility over logbin
by allowing for smooth
semiparametric 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 EMtype 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 loglink
binomial GLMs, with the added flexibility of allowing semiparametric
B
and Iso
terms (note that logbin.smooth
will stop with an
error if no semiparametric terms are specified in the righthand side of the formula
;
logbin
should be used instead).
The method partitions the parameter space associated with the semiparametric 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 loglikelihood is the MLE for
the semiparametric 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 logbinomial 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, 10y) ~ 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, 10y) ~ 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.