Learn R Programming

RSizeBiased (version 0.1.0)

zeta_plug_in: \(\zeta_{n,r}^i, i=1,2\) test statistic for the Weibull or the gamma distribution (depending on user input.

Description

Studentized version of the \(T^i_{n,r}, i=1,2\) test statistic for the Weibull/gamma distribution.

Usage

zeta_plug_in(null_value, datain,r,EST_par,type, dist)

Arguments

null_value

The parameter value in the hypothesis test under the null

datain

The available sample points.

r

The size (order) of the distribution. The special cases \(r=1,2,3\) correspond to length, area, volume biased samples respectively and are the most frequently encountered in practice. The case \(r=0\) corresponds to random samples from the underlying distribution.

EST_par

A vector of length 2, containing the shape and scale parameters of the Weibull distribution.

type

Numeric switch: type =1 returns the \(\zeta_{n,r}^1\) test statistic, any other value returns \(\zeta_{n,r}^2\)

dist

Character switch, enables the choice of distribution: type "weib" for the Weibull or "gamma" for the gamma distribution.

Value

A scalar with the value of the test statistic.

Details

When type=1 the function returns

$$\sqrt{n} \frac{T_{n,r^1} - \mu^0}{ \sigma_{1,r}(\hat \theta_n)} \rightarrow N(0,1)$$

after using the fact that under the null we have \(\mu_1=\mu^0\). Any other value for type returns

$$\sqrt{n} \frac{T_{n,r^2} - \sigma_0^2}{ \sigma_{2,r}(\hat \theta_n)} \rightarrow N(0,1)$$

in which case the fact that var(X)\(=\sigma_0^2\) under the null has been used.

References

Economou et. al. (2021). Hypothesis testing for the population mean and variance based on r-size biased samples, under review.

Examples

Run this code
# NOT RUN {
data(ufc)
datain_r <- ufc[,4]
nullMEAN <- 14
# ml estimates = c(2.6555,8.0376),  taken from section 6.2 in Economou et. al. (2021).
zeta_plug_in(nullMEAN, datain_r, 2, c(2.6555,8.0376),1, "gamma") #corresponds to mean

nullVar <- 180
zeta_plug_in(nullVar, datain_r, 2, c(2.6555,8.0376),2, "gamma") #corresponds to var

# }

Run the code above in your browser using DataLab