lexpit {blm} | R Documentation |

A direct probability model for regression with a binary outcome from observational data. Covariate effects are the sum of additive terms and an expit term, which allows some explanatory variables to be additive and others non-linear.

```
lexpit(formula.linear,formula.expit,data,na.action=na.omit,
weights=NULL,strata=NULL,par.init=NULL,
warn = FALSE,
control.lexpit=list(max.iter=1000,tol=1E-7),...)
```

`formula.linear` |
formula for linear model for binary outcome, |

`formula.expit` |
formula for expit model, linear in expit, |

`data` |
data.frame containing the variables of |

`na.action` |
function specifying how missing data should be handled, na.action |

`weights` |
Vector of weights equal to the number of observations. For population-based case-control study, weights are the inverse sampling fractions for controls. |

`strata` |
vector indicating the stratification for weighted regression with stratified observational data |

`par.init` |
list (optional) of initial parameters for |

`warn` |
logical indicator whether to include warnings during algorithm fitting. Default of |

`control.lexpit` |
list with control parameters for optimization algorithm |

`...` |
Additional arguments passed to |

`lexpit`

model uses a two-stage optimization procedure. At the first stage linear terms the solutions to the maximum of a pseudo log-likelihood using a constrained optimization algorithm with an adaptive barrier method, `constrOptim`

(Lange, 2010). The second stage maximizes the pseudo log-likelihood with respect to the expit terms using iterative reweighted least squares with an offset term for the linear component of the model.

Variance estimates are based on Taylor linearization (Shah, 2002). When `weights`

are not NULL, it is assumed that the study is a case-control design.

Returns an object of class `lexpit`

.

S. Kovalchik s.a.kovalchik@gmail.com

Kovalchik S, Varadhan R (2013). Fitting Additive Binomial Regression Models with the R Package blm. *Journal of Statistical Software*, 54(1), 1-18. URL: https://www.jstatsoft.org/v54/i01/.

Lange, K. (2010) *Numerical Analysis for Statisticians*, Springer.

Shah, BV. (2002) Calculus of Taylor deviations. Joint Statistical Meetings.

```
data(ccdata)
fit <- lexpit(y~female,y~packyear,weights = ccdata$w,
strata=ccdata$strata,data=ccdata)
summary(fit)
# LEXPIT MODEL FOR BLADDER CANCER RISK BY AGE 70
formula.linear <- bladder70~female * smoke_status
formula.expit <- bladder70~redmeat+fiber.centered+I(fiber.centered^2)
# ADDITIVE EFFECTS FOR GENDER AND SMOKING
# LOGISTIC EFFECTS FOR FIBER AND REDMEAT CONSUMPTION
data(aarp)
fit <- lexpit(formula.linear, formula.expit, aarp, weight=aarp$w)
logLik(fit)
model.formula(fit)
# SUMMARY
summary(fit)
confint(fit)
# FITTED ABSOLUTE RISK PER 1,000 PERSONS
head(predict(fit)*1000)
```

[Package *blm* version 2022.0.0.1 Index]