estlambda: Estimate the inflation factor for a distribution of P-values

Description Usage Arguments Value Author(s) See Also Examples

Description

Estimate the inflation factor for a distribution of P-values or 1df chi-square test. The major use of this procedure is the Genomic Control, but can also be used to visualise the distribution of P-values coming from other tests. Methods implemented include 'median' (median(chi2)/0.455...), regression (of observed onto expected) and 'KS' (optimizing the chi2.1df distribution fit by use of Kolmogorov-Smirnov test)

Usage

1
2
  estlambda(data, plot = FALSE, proportion = 1,
    method = "regression", filter = TRUE, df = 1, ...)

Arguments

data

A vector of reals. If all are <=1, it is assumed that this is a vector of P-values, else it is treated as a vector of chi-squares

plot

Whether the plot should be shown or not (default).

proportion

The proportion of lowest P (or chi^2) values to be used when estimating the inflation factor lambda.

method

"regression" (default), "median", or "KS": method to be used for lambda estimation.

filter

if the test statistics with 0-value of chi^2 should be excluded prior to estimation of lambda.

df

Number of degrees of freedom.

...

arguments passed to the plot function.

Value

A list with elements

estimate

Estimate of lambda

se

Standard error of the estimate

Author(s)

Yurii Aulchenko

See Also

ccfast, qtscore

Examples

1
2
3
4
5
6
7
8
9
require(GenABEL.data)
data(srdta)
pex <- summary(gtdata(srdta))[,"Pexact"]
estlambda(pex, plot=TRUE)
estlambda(pex, method="regression", proportion = 0.95)
estlambda(pex, method="median")
estlambda(pex, method="KS")
a <- qtscore(bt,srdta)
lambda(a)

Example output

Loading required package: MASS
Loading required package: GenABEL.data
$estimate
[1] 1.221399

$se
[1] 0.02964587

$estimate
[1] 1.221399

$se
[1] 0.02964587

$estimate
[1] 0.9069703

$se
[1] NA

$estimate
[1] 0.5000458

$se
[1] NA

Warning message:
In estlambda(pex, method = "KS") :
  using method='KS' lambda too close to limits, use other method
Warning messages:
1: In test.type(y, trait.type) : binomial trait is analysed as gaussian
2: In qtscore(bt, srdta) : 11 observations deleted due to missingness
3: In qtscore(bt, srdta) : Lambda estimated < 1, set to 1
$estimate
[1] 1

$se
[1] NA

GenABEL documentation built on May 30, 2017, 3:36 a.m.

Related to estlambda in GenABEL...