| .razao_resumo | R Documentation |
Internal helper that accepts either raw vectors x/y or
pre-aggregated sums, and returns a common set of summary statistics
(n, sum_x, sum_y, sum_x2, sum_y2, sum_xy, r) used by the
razao_*() functions. Supporting both calling styles matters because
some textbook problems (e.g. Example 7.5 of the course notes) give
only pre-computed sums, not the raw sample data.
.razao_resumo(
x = NULL,
y = NULL,
n = NULL,
sum_x = NULL,
sum_y = NULL,
sum_x2 = NULL,
sum_y2 = NULL,
sum_xy = NULL
)
x, y |
Optional raw numeric vectors. |
n, sum_x, sum_y, sum_x2, sum_y2, sum_xy |
Optional pre-aggregated
summary statistics (used only if |
A list with n, sum_x, sum_y, sum_x2, sum_y2,
sum_xy, r, and soma_dyx2 (= sum((y - r*x)^2), via the
computational Eq. 7.40).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.