Description Usage Arguments Details Value Author(s) References Examples
Calculate confidence intervals for crossover points of two simple linear regression lines using the Fieller method.
1 | FiellerC(Data)
|
Data |
a dataframe containing data values for y, x1, and x2 |
Fieller (1954) proposed a method for calculating the confidence interval for the ratio of two normally distributed random variables without assuming any particular form for the sampling distribution of the ratio itself. The function FiellerC() calculates confidence intervals for the crossover points of two simple regression lines using the Fieller method.
LowCI |
lower bound of confidence intervals for C based on the Fieller method |
UpperCI |
upper bound of confidence intervals for C based on the Fieller method |
Sunbok Lee
Fieller, E. C. (1954). Some problems in interval estimation. Journal of the Royal Statistical Society, Series B: Methodological, 16, 175-185.
1 2 3 4 5 6 7 8 9 10 11 | # example data
library(MASS)
out <- mvrnorm(1000, mu = c(0,0), Sigma = matrix(c(1,0.2,0.2,1), ncol = 2),empirical = TRUE)
x1 <- out[,1]
x2 <- out[,2]
epsilon <-rnorm(1000,0,1)
y <- 1 + 1*x1 + 0.5*x2 + 1*x1*x2 + epsilon # true C = -0.5/1 = -0.5
simData <- data.frame(y=y,x1=x1,x2=x2)
# run FiellerC()
FiellerC(simData)
|
$LowCI
[1] -0.5293345
$UpperCI
[1] -0.3944595
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.