chen_reg | R Documentation |
chen_reg is used to fit the chen regression, specified by giving the formula, the quantile, and the link function.
chen_reg(data, formula, tau = 0.5, link = "log")
data |
data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. |
formula |
an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted |
tau |
a number that indicates the quantile that you want to fit the regression |
link |
string that indicates the link function that you want to fit the regression. Either "log" or "sqrt" |
chenReg returns an object of class 'chenreg'
You can specify all variables (except y) to be your covariates using '.', you can also add transformation like 'log(x1)' You can write -1 in the formula to not use intercept in the model.
library(chenreg)
chen_reg(data = simu[, -1], Y ~ V2 + V3, tau = 0.5, link = "log")
chen_reg(data = simu[, -1], Y ~ . - 1, tau = 0.2, link = "log")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.