aiccrq: Akaike's Information Criterion for weighted quantile...

Description Usage Arguments Details Value Examples

View source: R/aiccrq.R

Description

Get AIC values for a single weighted quantile regression as used in WRTDS models

Usage

1
aiccrq(mod_in, tau = 0.5)

Arguments

mod_in

input crq model

tau

numeric indicating quantile to evaluate

Details

The AIC value is based on the log-likelihood estimate of the model that accounts for the specific quantile, the minimum of the objective function (rho), and the number of model parameters. The residuals are specific to the WRTDS model such that this function cannot be applied to arbitrary crq models.

Value

AIC estimate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# get wts for a model centered on the first observation
ref_in <- tidobj[1, ]
ref_wts <- getwts(tidobj, ref_in)

# get the model
mod <- quantreg::crq(
   survival::Surv(res, not_cens, type = "left") ~ 
     dec_time + flo + sin(2*pi*dec_time) + cos(2*pi*dec_time), 
   weights = ref_wts,
   data = tidobj, 
   method = "Portnoy"
   )

aiccrq(mod)

fawda123/WRTDStidal documentation built on June 11, 2021, 7:45 a.m.