Last data update: 2014.03.03

R: Estimate of the Scale Parameter taustar
taustarR Documentation

Estimate of the Scale Parameter taustar

Description

An estimate of the scale parameter taustar = 1/(2*f(0)) is needed for the standard error of the intercept in rank-based regression.

Usage

taustar(resid, p, conf = 0.95)

Arguments

resid

full model residuals

p

is the number of regression coefficients (without the intercept)

conf

confidence level of CI used

Details

Confidence interval estimate of taustar. See, for example, Hettmansperger and McKean (1998) p.7-8 and p.25-26.

Value

Length-one numeric object containing the estimated scale parameter taustar.

Author(s)

Joseph McKean, John Kloke

References

Hettmansperger, T.P. and McKean J.W. (2011), Robust Nonparametric Statistical Methods, 2nd ed., New York: Chapman-Hall.

See Also

rfit

Examples

##  This is an internal function.  See rfit for user-level examples.

## The function is currently defined as
function (resid, p, conf = 0.95) 
{
    n = length(resid)
    zc = qnorm((1 + conf)/2)
    c1 = (n/2) - ((sqrt(n) * zc)/2) - 0.5
    ic1 = floor(c1)
    if (ic1 < 0) {
        ic1 = 0
    }
    z = sort(resid)
    l = z[ic1 + 1]
    u = z[n - ic1]
    df = sqrt(n)/sqrt(n - p - 1)
    taustar = df * ((sqrt(n) * (u - l))/(2 * zc))
    taustar
  }

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Rfit)
Loading required package: quantreg
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Rfit/taustar.Rd_%03d_medium.png", width=480, height=480)
> ### Name: taustar
> ### Title: Estimate of the Scale Parameter taustar
> ### Aliases: taustar
> 
> ### ** Examples
> 
> ##  This is an internal function.  See rfit for user-level examples.
> 
> ## The function is currently defined as
> function (resid, p, conf = 0.95) 
+ {
+     n = length(resid)
+     zc = qnorm((1 + conf)/2)
+     c1 = (n/2) - ((sqrt(n) * zc)/2) - 0.5
+     ic1 = floor(c1)
+     if (ic1 < 0) {
+         ic1 = 0
+     }
+     z = sort(resid)
+     l = z[ic1 + 1]
+     u = z[n - ic1]
+     df = sqrt(n)/sqrt(n - p - 1)
+     taustar = df * ((sqrt(n) * (u - l))/(2 * zc))
+     taustar
+   }
function (resid, p, conf = 0.95) 
{
    n = length(resid)
    zc = qnorm((1 + conf)/2)
    c1 = (n/2) - ((sqrt(n) * zc)/2) - 0.5
    ic1 = floor(c1)
    if (ic1 < 0) {
        ic1 = 0
    }
    z = sort(resid)
    l = z[ic1 + 1]
    u = z[n - ic1]
    df = sqrt(n)/sqrt(n - p - 1)
    taustar = df * ((sqrt(n) * (u - l))/(2 * zc))
    taustar
}
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>