errorstat: Compute one or more error summaries

Description Usage Arguments Details Value Author(s) Examples

Description

errorstat computes one or more error summaries (e.g., MSE, bias) in one or more bins defined by uppers

Usage

1
errorstat(truth, estimate, uppers = NULL, mse = TRUE, bias = TRUE, ...)

Arguments

truth

true values of the parameter

estimate

estimated values of the parameter

uppers

upper bounds of each interval

mse

should the MSE be computed?

bias

should the bias be computed?

...

additional error summaries.

Details

errorstat is primarily a utility for determine how MSE and bias change with the level of a true parameter. It allows the user to partition the range true values into disjoint intervals and compute the error summaries for each of these intervals.

Optionally, the user can define additional error summaries through the dots argument. Each summary should be a function of two variables. The first of these variables is the true parameter value, and the second is the estimated parameter value.

Value

A data.frame containing the number of elements in each interval and the values of each error summary.

Author(s)

Matthew Zeigenfuse

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(eRm)
truth <- list(trait = rnorm(100), thresh = rnorm(20))
resp <- evalq(sim.rasch(trait, thresh), truth)
ermfit <- RM(resp)
ppfit <- person.parameter(ermfit)
errorstat(truth, list(trait = coef(ppfit), thresh = -coef(ermfit)), -2:2)

## End(Not run)

mdzeig/errorstat documentation built on May 22, 2019, 6:48 p.m.