View source: R/cap07-regressao.R
| reg_teste_origem | R Documentation |
Tests whether the regression line of y on x passes through the
origin (H0: a0 = 0), using both the t-statistic (Eq. 7.20) and the
confidence interval for a0 (Eq. 7.21), and recommends the ratio
estimator if the line passes through the origin (fails to reject
H0) or the regression estimator otherwise – following the logic of
Examples 7.1-7.2 of the course notes.
reg_teste_origem(x, y, conf = 0.95, ...)
x |
Numeric vector with the auxiliary variable. |
y |
Numeric vector with the variable of interest. |
conf |
Confidence level, default |
... |
Ignored (see package overview on tolerated extra arguments). |
A sampling_result object stating the recommended estimator,
the test statistic, the confidence interval for a0, and both
estimators computed side by side for comparison.
x <- c(1, 30, 44, 20, 0, 10, 15, 5, 2, 50, 35, 25)
y <- c(2, 35, 50, 27, 1, 15, 17, 7, 0, 53, 35, 30)
reg_teste_origem(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.