reg.intcomp: Common slope and comparison of several simple linear regression intercepts
Description
Compute the common slope of parallel linear regression lines and test for equality of their intercepts. The function returns the common slope and its confidence interval, the intercept of each regression line and its confidence interval, test for equality of each intercept to a given value and performs pairwise comparisons between intercepts.
a formula of the form y ~ x | f, where y and x give the dependent and independent variable, respectively, and f is a factor giving levels to be compared.
data
an optional data frame containing the variables in the formula formula. By default the variables are taken from environment(formula).
conf.level
confidence level.
theo
numeric vector: theoretical value of each intercept.
p.method
method for p-values correction. See healp of p.adjust.
Value
data.namea character string giving the name(s) of the data.
conf.levelconfidence level.
slope.commcommon slope and confidence interval.
interceptsintercept of each regression line.
intercepts.ciconfidence interval of intercepts.
intercepts.theotheoretical intercepts.
intercepts.ttest statistics for equality to theoretical values.
intercepts.pcorrected p-values for equality to theoretical values.
intercepts.tabdata frame of results of tests for equality to theoretical value.
x <- rep(1:30,3)
y <- c(1:30+rnorm(30,0,3),seq(10,35,25/29)+rnorm(30,0,3),seq(-27,0,27/29)+rnorm(30,0,3))
fact <- gl(3,30,labels=LETTERS[1:3])
reg.intcomp(y~x|fact)