Learn R Programming

LN0SCIs (version 0.1.5)

GPQW: GPQW

Description

A method based on generalized pivotal quantity with order statistics(also see GPQH) to construct the simultaneous confidence intervals for Ratios of Means of Log-normal Populations with Zeros.

Usage

GPQW(n,p,mu,sigma,N,C2=rbind(c(-1,1,0),c(-1,0,1),c(0,-1,1)),alpha=0.05)

Arguments

n

The sample size of the mixture distributions,must be an integer vector.

p

The zero probability of the mixture distribution,it has the same length to the n params.

mu

The mean of the non-zero samples,which after log-transformation.

sigma

The variance of the non-zero samples,which after log-transformation.

N

The number of independent generated data sets.

C2

Matrix C,You can refer to the paper of Xu et al. for specific forms.

alpha

The confidence level,it always set alpha=0.5

Value

The method will return the Simultaneous Confidence Intervals(SCIs) and the time consuming

Details

More information about GPQW, you can read the paper: Simultaneous Confidence Intervals for Ratios of Means of Log-normal Populations with Zeros.

Examples

Run this code
# NOT RUN {

alpha <- 0.05

p <- c(0.1,0.15,0.1)
n <- c(30,15,50)
mu <- c(0,0,0)
sigma <- c(1,1,1)
N <- 100
GPQW(n,p,mu,sigma,N)

# }
# NOT RUN {
p <- c(0.1,0.15,0.1,0.6)
n <- c(30,15,10,50)
mu <- c(0,0,0,0)
sigma <- c(1,1,1,2)
C2 <- rbind(c(-1,1,0,0),c(-1,0,1,0),c(-1,0,0,1),c(0,-1,1,0),c(0,-1,0,1),c(0,0,-1,1))

N <- 1000;
GPQW(n,p,mu,sigma,N,C2 = C2)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab