lldistreg.Rd
the main function for running "local" distribution regressions. This function runs a local regression that is local for a single (scalar) continuous treatment variable. It also allows for other variables but it does not smooth over these variables.
lldistreg(formla, xformla = NULL, data, yvals, tvals, link = "logit", cl = 1)
formla | y ~ t , t must be a single continuous variable |
---|---|
xformla | ~x, x are other (non-smoothed) variables included in the model |
data | the dataset |
yvals | all the values of y to compute F(y|t,x) |
tvals | the values of the continuous treatment to comput F(y|t,x) |
link | which link function to use, it can be anything accepted by glm (for example, logit, probit, or cloglog), the default is "logit" |
cl | the number of clusters to use, default is 1 |
a list of llDR objects that are indexed by the values in yvals and tvals
data(igm) lldistreg(lcfincome ~ lfincome, ~HEDUC, igm, 10, 10)#> [[1]] #> $y #> [1] 10 #> #> $t #> [1] 10 #> #> $thet #> [,1] #> [1,] 0.08870324 #> [2,] 0.20207450 #> [3,] 1.96814531 #> [4,] -1.87944207 #> #> attr(,"class") #> [1] "llDR" #> #> attr(,"class") #> [1] "llDRlist"