View source: R/betafunctions.R
observedmoments | R Documentation |
Computes Raw, Central, or Standardized moment properties of a vector of observed scores.
observedmoments(
x,
type = c("raw", "central", "standardized"),
orders = 4,
correct = TRUE
)
x |
A vector of values, the distribution of which moments are to be calculated. |
type |
A character vector determining which moment-types are to be calculated. Permissible values are |
orders |
The number of moment-orders to be calculated for each of the moment-types. |
correct |
Logical. Whether to include bias correction in estimation of orders. Default is |
A list of moment types, each a list of moment orders.
# Generate some fictional data. Say, 100 individuals take a test with a
# maximum score of 100 and a minimum score of 0.
set.seed(1234)
testdata <- rbinom(100, 100, rBeta.4P(100, 0.25, 0.75, 5, 3))
hist(testdata, xlim = c(0, 100))
# To compute the first four raw, central, and standardized moments for this
# distribution of observed scores using observedmoments():
observedmoments(x = testdata, type = c("raw", "central", "standardized"),
orders = 4, correct = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.