Description Usage Arguments Value Author(s) Examples
View source: R/data.table.regression.utils.R
sucessfull error handling for errors on function calls when groups are empty
1 | mlm.output.statlong.call.rq(mula, data, se = "iid", ...)
|
mula |
a formula for a lm() regression provided as character using the column names of the data |
data |
the data table with the column names |
... |
additional arguments to call rq() in particular the quantile must be set e.g. tau = .90 |
a data.table with columns statistic and value
Maik Renner, mrenner [at] bgc-jena.mpg.de
1 2 3 4 5 6 | DT = as.data.table(mtcars)
DT[, mlm.output.statlong.call(mula = "mpg ~ drat + gear", data = .SD) , by = list(am) ]
# impose an error with a nonexisting column name
DT[, mlm.output.statlong.call(mula = "mpg ~ drat + gear + bogus", data = .SD) , by = list(am) ]
# use ... to weight the regression
DT[, mlm.output.statlong.call(mula = "mpg ~ drat + gear", data = .SD, weight = cyl) , by = list(am) ]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.