calculate.mle {DCluster}R Documentation

Calculate Parameters Involved in Sampling Procedures

Description

When boostrap is used to sample values of the statistic under study, it is possible to use argument mle to pass the values of the parameters involved in the sampling procedure.

Usage

calculate.mle(d, model="poisson")

Arguments

d

A dataframe as described in the DCluster manual page.

model

Model used to sample data. It can be either "multinomial", "poisson" or "negbin".

Value

A list with the estimates of the parameters involved in the model:

Multimonial

Total observed cases (n) and vector of probabilities (p).

Poisson

Total number of regions (n) and vector of means (lambda).

Negative Binomial (Poisson-Gamma)

Total number of regions (n), size and probabilites, calculated after estimating parameters parameters nu and alpha of the Gamma distribution following equations proposed by Clayton and Kaldor (1989).

See Also

DCluster, observed.sim

Examples

library(spdep)

data(nc.sids)

sids<-data.frame(Observed=nc.sids$SID74)
sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74))
sids<-cbind(sids, x=nc.sids$x, y=nc.sids$y)


#Carry out simulations
datasim<-multinom.sim(sids, mle=calculate.mle(sids, model="multinomal") )

#Estimators for Poisson distribution
datasim<-poisson.sim(sids, mle=calculate.mle(sids, model="poisson") )

#Estimators for Negative Binomial distribution
datasim<-negbin.sim(sids, mle=calculate.mle(sids, model="negbin") )


[Package DCluster version 0.2-10 Index]