Nsim_stat: Nsim_stat

Description Usage Arguments Value Author(s) Examples

View source: R/plots.R

Description

Computes how well the parameters gamma and kappa are fitted at various numbers of simulations, and how these affect the computation of p-values. Returns an object of class 'sim_N_test' which can be plotted.

Usage

1
2
Nsim_stat(lr, NN = c(50, 100, 500, 1000, 1500), NB = 500, p_at = c(2, 3,
  5, 10), quant_at = pnorm(-2:2), verbose = TRUE)

Arguments

lr

matrix of simulation results

NN

vector of integer; test performance of simulation fit for n simulations, where n takes the values in NN

NB

number of bootstrap samples to take for each sample size in NN

p_at

compute p values at each value in p_at

quant_at

for each size in NN and each parameter, record these quantiles of the bootstrapped parameter

verbose

print values of NN[i] as they complete.

Value

list of two objects, stat and quant; stat[,ii,i] is, in order, kappa, gamma, and p-values given gamma and kappa of each value in p_at for the i'th bootstrap sample for bootstrap sample size NN[ii]; quant[k,ii,j] is the quant_at[j]'th quantile of boostrapped test statistic k amongst bootstrap samples of size NN[ii]

Author(s)

James Liley

Examples

1
2
3
4
data("sim_mat.RData") 
stat=Nsim_stat(sim_mat)
summary(stat)
plot(stat)

jamesliley/subtest documentation built on May 18, 2019, 11:21 a.m.