Description Usage Arguments Examples
Fit Binary Regression Model
1 2 | Fit.BinReg(y, X = NULL, model = "logistic", offset = 0, df = NULL,
sig = 0.05, eps = 1e-08, maxit = 10, report = T)
|
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? |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.