Description Usage Arguments Value Author(s) Examples
View source: R/data.table.regression.utils.R
simple function which takes a lm model output to create a named vector intended for use with data.table and group by
1 | mlm.output.statlong(fit)
|
fit |
object returned from a linear model function lm() and quantreg::rq() are supported |
a data.table with columns statistic and value
Maik Renner, mrenner [at] bgc-jena.mpg.de
1 2 3 4 5 6 7 | # output of regression model is melted to two columns
data(mtcars)
fitlm = lm(formula = "mpg ~ drat + gear", data = mtcars)
mlm.output.statlong(fitlm)
# example for group by operation with data.table power
DT = as.data.table(mtcars)
DT[, mlm.output.statlong(lm(formula = "mpg ~ drat + gear", .SD) ), by = list(am) ]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.