data(c401k)
# Choose the first 500 units for a small example
c401k <- c401k[1:500,]
Y <- c401k$pira
X <- as.matrix(c401k[c("inc", "incsq", "marr", "male", "age", "agesq", "fsize" )])
D <- c401k$p401k
Z <- c401k$e401k
# high-level interface
est <- larf(Y~X, D, Z)
# low-level interface
est2 <- larf.fit(Y, X, D, Z)Run the code above in your browser using DataLab