mlm.output.statlong.call.rq: Call a linear QUANTILE regression model and reorganize its...

Description Usage Arguments Value Author(s) Examples

View source: R/data.table.regression.utils.R

Description

sucessfull error handling for errors on function calls when groups are empty

Usage

1
mlm.output.statlong.call.rq(mula, data, se = "iid", ...)

Arguments

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

Value

a data.table with columns statistic and value

Author(s)

Maik Renner, mrenner [at] bgc-jena.mpg.de

Examples

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) ]

laubblatt/phaselag documentation built on Sept. 30, 2020, 11:21 a.m.