
Raw empirical moments for individual and grouped data.
emm(x, order = 1, …)# S3 method for default
emm(x, order = 1, …)
# S3 method for grouped.data
emm(x, order = 1, …)
a vector or matrix of individual data, or an object of class
"grouped data"
.
order of the moment. Must be positive.
further arguments passed to or from other methods.
A named vector or matrix of moments.
Arguments …
are passed to colMeans
;
na.rm = TRUE
may be useful for individual data with missing
values.
For individual data, the
For grouped data with group boundaries
Klugman, S. A., Panjer, H. H. and Willmot, G. E. (1998), Loss Models, From Data to Decisions, Wiley.
mean
and mean.grouped.data
for simpler
access to the first moment.
# NOT RUN {
## Individual data
data(dental)
emm(dental, order = 1:3)
## Grouped data
data(gdental)
emm(gdental)
x <- grouped.data(cj = gdental[, 1],
nj1 = sample(1:100, nrow(gdental)),
nj2 = sample(1:100, nrow(gdental)))
emm(x) # same as mean(x)
# }
Run the code above in your browser using DataLab