Estim_diagnost {EstimDiagnostics}R Documentation

Sample estimators' values for different sample sizes

Description

For every sample size value the function creates a sample and evaluates the estimators Nmc times.

Usage

Estim_diagnost(Nmc, s, Inference, packages = NULL)

Arguments

Nmc

number of repetitions

s

numeric vector of sample sizes

Inference

function of s creating a sample and evaluating estimators (see details)

packages

list of packages to pass to foreach loop

Value

data frame with estimators' values

Examples

Nmc=400
s<-c(1e2,1e3)

Inference<-function(s){
  rrr<-rnorm(n=s)
  list(Mn=mean(rrr), Sd=sd(rrr))
}
data <- Estim_diagnost(Nmc, s, Inference)
estims_qqplot(data)
estims_boxplot(data)

#
Inference<-function(s){
rrr<-2/0
list(Mn=mean(rrr), Sd=sd(rrr))
}
head(Estim_diagnost(Nmc, s, Inference))

#
Inference<-function(s){
rrr<-rnorm(n=s)
rrr[2]<-"dwq"
list(Mn=mean(rrr), Sd=sd(rrr))
}
head(Estim_diagnost(Nmc, s, Inference))


[Package EstimDiagnostics version 0.0.3 Index]