chen_reg: chen_reg

View source: R/chen_reg.R

chen_regR Documentation

chen_reg

Description

chen_reg is used to fit the chen regression, specified by giving the formula, the quantile, and the link function.

Usage

chen_reg(data, formula, tau = 0.5, link = "log")

Arguments

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"

Value

chenReg returns an object of class 'chenreg'

Note

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.

Examples

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


AlissonRP/chenReg documentation built on July 20, 2023, 4:50 a.m.