the main function for running distribution regressions

distreg(formla, data, yvals, link = "logit")

Arguments

formla

y ~ x

data

the dataset

yvals

all the values of y to compute F(y|x)

link

which link function to use, it can be anything accepted by glm (for example, logit, probit, or cloglog), the default is "logit"

Value

DR object

Examples

data(igm) y0 <- median(igm$lcfincome) distreg(lcfincome ~ lfincome + HEDUC, igm, y0)
#> $yvals #> [1] 11.04563 #> #> $glmlist #> $glmlist[[1]] #> #> Call: glm(formula = formla, family = binomial(link = link), data = dta) #> #> Coefficients: #> (Intercept) lfincome HEDUCHS HEDUCLessHS #> 15.3320 -1.3976 0.1629 0.2256 #> #> Degrees of Freedom: 499 Total (i.e. Null); 496 Residual #> Null Deviance: 693.1 #> Residual Deviance: 640.9 AIC: 648.9 #> #> #> attr(,"class") #> [1] "DR"