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.
theil(x=NULL, y=NULL, alpha=0.05, beta.0=0, type="t",
example=FALSE, r=3, slopes=F, doplot=TRUE)
Returns a list with "NSM3Ch9ChickFn" class containing the following components:
same as input argument
same as input argument
same as input argument
same as input argument
same as input argument
the observed C statistic
the observed C.bar statistic
the observed alpha.hat statistic
the observed beta.hat statistic
table containing all n(n-1)/2
the P-value corresponding to the selected type of test/confidence interval
the lower endpoint of the confidence interval
the upper endpoint of the confidence interval
first data vector
second data vector
the significance level
the null hypothesized value
can be "t" (two-sided), "u" (upper) or "l" (lower). The type refers both to the test and the confidence interval.
if true, will analyze the data from Example 9.1
the number of places for rounding. Increase it if your P-values are coming out as 0 or 1.
if true, will print all n(n-1)/2 slopes
if true, will plot the data and estimated line
Eric Chicken
##Example 9.1 Hollander-Wolfe-Chicken##
theil (x, y, example=TRUE, slopes=TRUE)
Run the code above in your browser using DataLab