simul.bs.mme {bs}R Documentation

Simulation study by using MME method

Description

The function simul.bs.mme() simulates three samples of size n from a population T ~ BS(alpha,beta), one for each method (rbs1(), rbs2(), or rbs3()), computes the MMES's for alpha and beta, and establish goodness-of-fit for each sample.

Usage

simul.bs.mme(n, alpha, beta)

Arguments

n Samples of size n.
alpha Teorical shape parameter for simulations.
beta Teorical scale parameter for simulations.

Details

In order to carry out simulation studies, we develop the functions simul.bs.gme(), simul.bs.mle(), and simul.bs.mme(). These functions generate random samples, estimate parameters, and establish goodness-of-fit. The samples of size n, one for each method (G1, G2, or G3), are generated by using rbs1(), rbs2(), and rbs3(), respectively. The estimations, one for each method, are obtained by using est1bs(), est2bs(), and est3bs(), respectively. The goodness-of-fit method is based on the statistic of Kolmogorov-Smirnov (KS), which is available through the function ksbs(). The generated observations by means of G1, G2, and G3 are saved as slots of the R class simulBsClass, which are named sample1, sample2, and sample3, respectively. Furthermore, the results of the simulation study are saved in a fourth slot of this class, named results.

Value

An object of class "simulBsClass" (Slots).

Author(s)

Víctor Leiva <victor.leiva@uv.cl>, Hugo Hernández <hugo.hernande@msn.com>, and Marco Riquelme <mriquelm@ucm.cl>.

References

Leiva, V., Hernández, H., and Riquelme, M. (2006). A New Package for the Birnbaum-Saunders Distribution. Rnews, 6/4, 35-40. (http://www.r-project.org)

Examples

## Example: simul.bs.mle()
simul.bs.mle(100,0.5,1.0)

results<-simul.bs.mle(100,0.5,1.0)
results@results

sample<-results@sample1

## Example: simul.bs.mme()
simul.bs.mme(100,0.5,1.0)

## Example: simul.bs.gme()
simul.bs.gme(100,0.5,1.0)

[Package bs version 1.0 Index]