calcErrorNonParam {rhosp}R Documentation

compute the bias, variance of the non parametric estimator

Description

calcErrorNonParam computes the risk constant R with the non parametric estimator and its bias and variance.

Usage

calcErrorNonParam(file, nb = 10, disXi, disP, plot = TRUE)

Arguments

file

the file in which the simulated data will be stored

nb

the number of simulation

disXi

the distribution of the variable Xi : disXi is a 3 elements list : rangen stands for a random positive variable generator ; nbparam for number of parameter of this distribution and param for a list of parameters

disP

the side effect probability (success probability of Zi) p : disP is a 3 elements list : disfun stands for a distribution function ; nbparam for number of parameter of this distribution and param for a list of parameters

plot

a logical variable to plot the variable Zi

Value

a list of the following components

bias

the bias of this estimator

var

the variance of this estimator

R

the risk constant estimated

CR

the CR risk constant calculated with R

Author(s)

Christophe Dutang and Julie Barthes

Examples

#arg1Exp<-list(rangen=rexp,nbparam=1,param=list(1/3));
#arg2Exp<-list(disfun=pexp,nbparam=1,param=list(1/5));


#res<-calcErrorNonParam("data.rda",25,arg1Exp,arg2Exp,TRUE)



[Package rhosp version 1.10 Index]