parncp: Parametric estimation of noncentrality parameter distribution

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Assuming normality of noncentrality parameters (parncpt) or a mixture of two normal distributions (parncpt2), the MLE of its standard deviation(s) (and possibly mean(s) also) is estimated from observed t-statistics

Usage

1
2
3
4
5
parncpt(tstat, df, zeromean = TRUE, ...)
parncpt.bfgs.0mean(tstat, df, starts, grids, approximation = "int2", ...)
parncpt.bfgs.non0mean(tstat, df, starts, grids, approximation = "int2", ...)
parncpt.momeff(tstat,n1,n2=n1,zeromean,gamma2,lower.df=6.1,upper.df=100,approx=TRUE)
parncpt2(tstat, df, common=c('mean','sd'), ...)

Arguments

tstat

numeric vector of t-statistics

df

numeric vector of degrees of freedom

zeromean

logical; if TRUE, then mean of noncentrality parameters is assumed to be zero and is not estimated.

common

character vector. Allowed values are 'mean', 'sd', 'none'. If 'none' is present, common must be a scalar, and an unrestricted 2-component normal mixture is fit to ncp distribution. NULL is treated the same as 'none'. If mean is present, the means of the two normal components of the ncp distribution are assumed to be negative of each other. If sd is present, the sandard deviations of the two normal components of the ncp distribution are assumed to be common.

...

Other arguments to optim.

starts

An optional vector of starting values. If missing, a grid search will be performed to get a good starting value.

grids

A list of three components (lower, upper, ngrid) defining the grids to be searched in find a good starting value. Each component is a numeric vector of the same length as the number of parameters. lower and upper give the bounds, and ngrid specifies the number of points for each dimension.

approximation

Methods of approximating the noncentral t-density. int2 is exact for integer df, but interpolate to fractional df. 'laplace' is the laplacian approximation; 'saddlepoint' is the saddlepoint approximation; 'none' computes the (sort of) exact density using the default dt function.

n1

Treatment 1 sample size

n2

Treatment 2 sample size

gamma2

Gamma square parameter, i.e., variance of effect sizes.

lower.df

lower bound of degrees of freedom, in case of n1 is missing

upper.df

upper bound of degrees of freedom, in case of n1 is missing

approx

logical, indicating if no exact solutions are available, whether approx. solutions are returned.

Details

parncpt calls either parncpt.bfgs.0mean or parncpt.bfgs.non0mean, depending whether zeromean is TRUE or FALSE. Both parncpt.bfgs.0mean and parncpt.bfgs.non0mean use the 'L-BFGS-B' algorithm by calling optim. All gradiants are analytical, but the Hessian is only numerical approximation. The first parmater is always pi0, i.e., the proportion of true null hypotheses; the last parameter is always the standard deviation of noncentrality parameters; for parncpt.bfgs.non0mean the middle parameter is the mean of noncentrality parameters, whereas for parncpt.bfgs.0mean the mean is set to 0 a priori.

parncpt2 calls parncpt2.constrOptim to find the maximum likelihood estimates of parameters when the noncentrality parameter distribution is assumed to be a mixture of two normals. The parameterization being used is such that pi0 is the proportion of true nulls and pi1 is the proportion of non-nulls of which the noncentrality parameters come from the normal component with smaller mean. Therefore, for the noncentrality parameter distribution, tau=pi1/(1-pi0) is the mixing proportion for the normal component with smaller mean.

Value

Except for parncpt2, the result is a list with class attribute being c('parncpt', 'ncpest').

pi0

proportion of true nulls

mu.ncp

mean of ncp

sd.ncp

SD of ncp

data

a list of tstat and df

logLik

an object of class logLik. Call logLik.ncpest to extract. Similarly, AIC is callable.

enp

the (effective) number of parameters in the model

par

estimated parameters. Call coef.ncpest to extract.

obj

the negative loglikelihood function that is minimized

gradiant

analytic gradiant at the estimate

hessian

numeric hessian at the estimate

nobs

the number of test statistics

For parncpt2, the result is a list with class attribute being c('parncpt2', 'parncpt', 'ncpest'), which is a list with the follwoing additional components:

pi1

proportion of non-nulls of which the noncentrality parameters come from the normal component with smaller mean.

tau.ncp

the mixing proportion of the normal component of the ncp distribution with smaller mean.

mu1.ncp

the mean of the normal component of the ncp distribution with smaller mean.

sd1.ncp

the SD of the normal component of the ncp distribution with smaller mean.

mu2.ncp

the mean of the normal component of the ncp distribution with larger mean.

sd2.ncp

the SD of the normal component of the ncp distribution with larger mean.

Note

df could be Inf for z-tests. When this is the case, approximation is ignored.

parncpt.momeff is the old code using method of moments estimates. It is outdated, depreciated, and not completely compatible with current ncpest class.

Author(s)

Long Qu

References

Qu L, Nettleton D, Dekkers JCM. (2012) Improved Estimation of the Noncentrality Parameter Distribution from a Large Number of $t$-statistics, with Applications to False Discovery Rate Estimation in Microarray Data Analysis. Biometrics, 68, 1178–1187.

See Also

sparncpt, nparncpt, fitted.parncpt, plot.parncpt, summary.parncpt, coef.ncpest, logLik.ncpest, vcov.ncpest, AIC, dncp

Examples

1
2
3
4
5
6
7
## Not run: 
data(simulatedTstat)
(pfit=parncpt(tstat=simulatedTstat, df=8, zeromean=FALSE)); plot(pfit)
(pfit0=parncpt(tstat=simulatedTstat, df=8, zeromean=TRUE)); plot(pfit0)
(pfit2=parncpt2(tstat=simulatedTstat, df=8)); plot(pfit2)

## End(Not run)

pi0 documentation built on May 2, 2019, 4:47 p.m.