pspline.validate.scalars: Run a simulation study to validate a scalar estimator

Description Usage Arguments Value

View source: R/validation.R

Description

Run a simulation study to validate a scalar estimator

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
pspline.validate.scalars(
  fun.truth,
  n.truths,
  fun.observations,
  n.observations,
  fun.model,
  fun.outcomes,
  n.samples,
  level
)

Arguments

fun.truth

function that generates a true state of the system. Takes no arguments, returns data frame of true values for model variables

n.truths

number of different truths to generate for simulation study

fun.observations

function that generates a set of observations from truth. Takes one argument (truth data frame) and returns data frame of observations

n.observations

number of sets of observations to generate for each truth in the simulation study

fun.model

function that returns a model to be used for estimation. Takes one argument (observations data frame) and returns the model

fun.outcomes

function that calculates the outcomes of interest. Same as outcomes function in pspline.estimate.scalars.

n.samples

number of samples to use for estimation. See pspline.estimate.scalars.

level

confidence level to use for estimation. See pspline.estimate.scalars.

Value

list of summary (which is a data frame specifying the fraction of true values that were contained in their estimated confidence interval) and results (which is a data frame specifying the quantile of the true value in the estimated sampled distribution for each simulation)


pspline.inference documentation built on Jan. 19, 2021, 5:07 p.m.