# NOT RUN {
coef <- flm(mtcars$mpg, qM(mtcars[c("hp","carb")]),
mtcars$wt, add.icpt = TRUE)
coef
lmcoef <- coef(lm(mpg ~ hp + carb, weights = wt, mtcars))
lmcoef
all.equal(drop(coef), lmcoef)
# }
# NOT RUN {
<!-- % Need RcppArmadillo and RcppEigen -->
all_obj_equal(lapply(1:6, function(i)
flm(mtcars$mpg, qM(mtcars[c("hp","carb")]),
mtcars$wt, add.icpt = TRUE, method = i)))
# }
Run the code above in your browser using DataLab