unifit: univariate model fitting

Description Usage Arguments Details Value See Also Examples

Description

fit univariate log-linear model using Newton-Raphson algorithm.

Usage

1
2
3
unifit(formula, data = list(),
       family = c("gaussian", "binomial"),
       output = 0)

Arguments

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 unifit is called.

family

a GLM family, currently support gaussian and binomial.

output

with values 0 or 1, indicating whether the fitting process is muted or not.

Details

The unifit utilize the class structure of the underlying C++ code and fitted the model with Newton-Raphson algorithm.

Value

An object of class mvbfit, for which some methods are available.

See Also

unilps, mvbfit

Examples

1
2
3
4
5
6
7
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')

MVB documentation built on May 2, 2019, 3:06 a.m.