fit.BinReg: Fit Binary Regression Model

Description Usage Arguments Examples

Description

Fit Binary Regression Model

Usage

1
2
Fit.BinReg(y, X = NULL, model = "logistic", offset = 0, df = NULL,
  sig = 0.05, eps = 1e-08, maxit = 10, report = T)

Arguments

y

Binary 0/1 outcome vector.

X

Numeric model matrix. Include an intercept.

model

Selected from among logistic, probit, and robit.

offset

Fixed component added to the linear predictor.

df

Degrees of freedom, if using the robit model.

sig

Significance level, for CIs.

eps

Tolerance for Newton-Raphson iterations.

maxit

Maximum number of NR iterations.

report

Report fitting progress?

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
set.seed(100);
# Design matrix
X = cbind(1,matrix(rnorm(3e3),nrow=1e3));
# Coefficient
b = c(1,-1,1,0);

# Logistic observations
y = rBinReg(X,b,model="logistic");
# Estimate logistic model
M = Fit.BinReg(y,X,model="logistic");

# Probit observations
y = rBinReg(X,b,model="probit");
# Estimate probit model
M = Fit.BinReg(y,X,model="probit");

# Robit observations
y = rBinReg(X,b,model="robit",df=5);
# Estimate robit model
M = Fit.BinReg(y,X,model="robit",df=5);

## End(Not run)

zrmacc/BinReg documentation built on May 9, 2019, 8:08 a.m.