theil: Function to estimate and perform tests on the slope and...

theilR Documentation

Function to estimate and perform tests on the slope and intercept of a simple linear model.

Description

This code estimates and performs tests on the slope and intercept of a simple linear model. Based on chapter 9 of Hollander, Wolfe & Chicken, Nonparametric Statistical Methods, 3e.

Usage

theil(x=NULL, y=NULL, alpha=0.05, beta.0=0, type="t", 
      example=FALSE, r=3, slopes=F, doplot=TRUE) 

Arguments

x

first data vector

y

second data vector

alpha

the significance level

beta.0

the null hypothesized value

type

can be "t" (two-sided), "u" (upper) or "l" (lower). The type refers both to the test and the confidence interval.

example

if true, will analyze the data from Example 9.1

r

the number of places for rounding. Increase it if your P-values are coming out as 0 or 1.

slopes

if true, will print all n(n-1)/2 slopes

doplot

if true, will plot the data and estimated line

Value

Returns a list with "NSM3Ch9ChickFn" class containing the following components:

alpha

same as input argument

beta.0

same as input argument

type

same as input argument

r

same as input argument

slopes

same as input argument

C.stat

the observed C statistic

C.bar

the observed C.bar statistic

alpha.hat

the observed alpha.hat statistic

beta.hat

the observed beta.hat statistic

slopes.table

table containing all n(n-1)/2

p.val

the P-value corresponding to the selected type of test/confidence interval

L

the lower endpoint of the confidence interval

U

the upper endpoint of the confidence interval

Author(s)

Eric Chicken

Examples

##Example 9.1 Hollander-Wolfe-Chicken##
theil (x, y, example=TRUE, slopes=TRUE)

NSM3 documentation built on Nov. 4, 2024, 5:08 p.m.

Related to theil in NSM3...