getBPMCnull: Generate a Monte-Carlo null distribution for a beta-Poisson...

Description Usage Arguments Value Examples

View source: R/getBPMCnull.R

Description

Generate a Monte-Carlo null distribution for a beta-Poisson model

Usage

1
2
getBPMCnull(param, n = 200, tbreak = NULL, tbreak.num = 20,
  sim.num = 1000, ran.num = 1e+05, E.esp = 0, useDebug = FALSE)

Arguments

param

A vector of parameters of the beta-Poisson model

n

The number of data points for each simulation

tbreak

A vector of break points

tbreak.num

Number of breaks

sim.num

A number of simulations

ran.num

The number of data points generated from the beta-Poisson model to approximate the theoretical model

E.esp

An small value added to expected value when computing X2

useDebug

A parameter just used for debug and checking, so useDebug=FALSE by default

Value

A list containning the Monte-Carlo null distribution and other values

Examples

1
2
3
4
5
set.seed(2015)
par=c(0.6,1.5,20,0.05)
MCnull.res=getBPMCnull(par,n=100,sim.num=100)
hist(MCnull.res$X2,xlab="goodness-of-fit statistic",
main="Monte-Carlo null distribution",breaks=20, prob=TRUE)

nghiavtr/BPSC documentation built on May 23, 2019, 4:42 p.m.