Last data update: 2014.03.03

R: Rank-Based Estimates and Inference for Linear Models
Rfit-packageR Documentation

Rank-Based Estimates and Inference for Linear Models

Description

Package provides functions for rank-based analyses of linear models. Rank-based estimation and inference offers a robust alternative to least squares.

Details

Package: Rfit
Type: Package
Version: 0.21
Date: 2014-11-05
License: GPL (version 2 or later)
LazyLoad: yes

Author(s)

John Kloke, Joesph McKean

Maintainer: John Kloke <kloke@biostat.wisc.edu>

References

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

Jaeckel, L. A. (1972). Estimating regression coefficients by minimizing the dispersion of residuals. Annal s of Mathematical Statistics, 43, 1449 - 1458.

Jureckova, J. (1971). Nonparametric estimate of regression coefficients. Annals of Mathematical Statistics , 42, 1328 - 1338.

Examples

data(baseball)
data(wscores)
fit<-rfit(weight~height,data=baseball)
summary(fit)
plot(fitted(fit),rstudent(fit))

### Example of the Reduction (Drop) in dispersion test ###
y<-rnorm(47)
x1<-rnorm(47)
x2<-rnorm(47)
fitF<-rfit(y~x1+x2)
fitR<-rfit(y~x1)
drop.test(fitF,fitR)



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/Rfit-package.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Rfit-package
> ### Title: Rank-Based Estimates and Inference for Linear Models
> ### Aliases: Rfit-package Rfit
> ### Keywords: nonparametric robust regression package
> 
> ### ** Examples
> 
> data(baseball)
> data(wscores)
> fit<-rfit(weight~height,data=baseball)
> summary(fit)
Call:
rfit.default(formula = weight ~ height, data = baseball)

Coefficients:
              Estimate Std. Error t.value   p.value    
(Intercept) -228.57144   56.14659 -4.0710  0.000146 ***
height         5.71429    0.76018  7.5171 4.373e-10 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Multiple R-squared (Robust): 0.4418605 
Reduction in Dispersion Test: 45.125 p-value: 0 

> plot(fitted(fit),rstudent(fit))
> 
> ### Example of the Reduction (Drop) in dispersion test ###
> y<-rnorm(47)
> x1<-rnorm(47)
> x2<-rnorm(47)
> fitF<-rfit(y~x1+x2)
> fitR<-rfit(y~x1)
> drop.test(fitF,fitR)

Drop in Dispersion Test
F-Statistic     p-value 
  0.0046625   0.9458701 
> 
> 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>