| nsca_reference | R Documentation |
Fits the ordinary least-squares regression of the outcome on each condition,
on the same observations both frontiers were fitted to. This is the line
lm(y ~ x) returns, and it is what reference = "ols" draws on
nsca_plot().
nsca_reference(model, x = NULL)
model |
An object returned by |
x |
Optional condition names or positions. All conditions by default. |
It is reported apart from nsca_table() because it is a different kind of
quantity. Regression describes how the expected outcome moves with the
condition; the two frontiers describe which condition-outcome combinations
are absent. Section 6.1 of the condition analysis in degree framework keeps
the two logics side by side rather than merging them into one number, and
section 4.3 notes that a frontier is fixed by the most extreme observations
rather than by the central tendency. A reference line therefore has a slope
and an intercept but no empty zone, no effect size, no p value, no
threshold, and no part in the joint-support decision.
The line is computed on request, so it is available whether or not
reference = "ols" was set; drawn records whether it also appears on the
plot.
A data frame with one row per condition: condition, outcome,
line, line_type, observations, intercept, slope, r_squared
and drawn.
nsca_analysis(), nsca_table(), nsca_terms()
set.seed(1)
x <- sort(runif(60))
dat <- data.frame(X = x, Y = pmin(pmax(x + rnorm(60, 0, 0.1), 0), 1))
fit <- nsca_analysis(dat, "X", "Y", ceilings = "ce_fdh", reference = "ols")
nsca_reference(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.