unifit {MVB} | R Documentation |
fit univariate log-linear model using Newton-Raphson algorithm.
unifit(formula, data = list(), family = c("gaussian", "binomial"), output = 0)
formula |
a symbolic description of the model to be fit. |
data |
an optional data frame containing the variables in the
model. By default the variables are taken from the
environment from which |
family |
a GLM family, currently support gaussian and binomial. |
output |
with values 0 or 1, indicating whether the fitting process is muted or not. |
The unifit
utilize the class structure of the underlying C++
code and fitted the model with Newton-Raphson algorithm.
An object of class mvbfit
, for which some methods are
available.
unilps
, mvbfit
n <- 100 p <- 4 x <- matrix(rnorm(n * p, 0, 4), n, p) eta <- x pr <- exp(eta) / (1+ exp(eta)) res <- rbinom(n, 1, pr) fit <- unifit(res ~ x - 1, family = 'binomial')