par.f.test | R Documentation |
Performs an F-test (non-directional) on multiple (L) linear combinations of parameters in a linear model.
par.f.test(
mod,
data = list(),
nh,
q = rep(0, dim(nh)[1]),
sig.level = 0.05,
details = FALSE,
hyp = TRUE
)
mod |
model object estimated by |
data |
name of the data frame to be used if |
nh |
matrix of the coefficients of the linear combination of parameters. Each of the L rows of that matrix represents a linear combination. |
q |
L-dimensional vector of values on which the parameter (combination) is to be tested against. Default value is the null-vector. |
sig.level |
significance level. Default value: |
details |
logical value indicating whether specific details about the test should be returned. |
hyp |
logical value indicating whether the hypotheses should be part of the output. To be disabled if output is too large. |
Objects x generated by par.f.test
can be plotted using plot(x, plot.what = ...)
. Argument plot.what
can have the following values:
"dist" | plot the null distribution, test statistics and p-values. |
"ellipse" | plot acceptance ellipse. |
If plot.what = "ellipse"
is specified, further arguments can be passed to plot()
:
type = "acceptance" | plot acceptance ellipse ("acceptance") or confidence ellipse ("confidence"). |
which.coef = c(2,3) | for which two coefficients should the ellipse be plotted? |
center = TRUE | plot center of ellipse. |
intervals = TRUE | plot interval borders. |
test.point = TRUE | plot the point (q-values or coefficients) used in F-Test. |
q = c(0,0) | the q-value used in acceptance ellipse. |
sig.level = 0.05 | significance level used. |
A list object including:
hyp | character matrix of hypotheses (if hyp = TRUE ). |
nh | linear combinations tested in the null hypothesis (in matrix form). |
q | vector of values the linear combinations are tested on. |
mod | the model passed to par.f.test . |
results | a data frame of basic test results. |
SSR.H0 | sum of squared residuals in H0-model. |
SSR.H1 | sum of squared residuals in regular model. |
nulldist | type of the null distribution with its parameters. |
## H0: beta1 = 0.33 and beta2 = 0
x <- par.f.test(barley ~ phos + nit, data = log(data.fertilizer),
nh = rbind(c(0,1,0), c(0,0,1)),
q = c(0.33,0.33),
details = TRUE)
x # Show the test results
plot(x) # Visualize the test result
plot(x, plot.what = "ellipse", q = c(0.33, 0.33))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.