I would like to know that the commands used in R work with linear regression tasks and confidence intervals, and why they are incorrect.
For example, let's say we have the following data:
A <- c(12,11,12,15,13,16,13,18,11,14)
B <- c(50,51,62,45,63,76,53,68,51,74)
We performed a linear regression describing variable B (height) of variable A (width). The question is to find a 90% confidence interval with an average height (B) that has 14 widths (A).
I know how to do linear regression in R, lm(B~A)and I get an equation like this B = a + A * c , where B and A are my variables a is the interception ..
What I tried was:
- Find the height using the width they give me:
B= a + (14)*c= MU (for example) - Finally, to get the interval:
t.test(B, mu = MU, conf.level=0.9)but, unfortunately, this is not true ..
source
share