Skip to contents

These functions facilitate making inferences based on effect estimates in an unreplicated experiment, withn an underlying effect-sparsity model.

Usage

ref.dist(method, n.effects, nsets, save = TRUE)

eff.test(effects, method = "Zahn", pareto = TRUE, refdist, save = TRUE)

Arguments

method

The method to use in determining the reference line, curve, and/or critical values. This must be the name of a provided pseudo-standard-error method (see PSE), or a compatible user-supplied one.

n.effects

Integer number of effects estimated.

nsets

The number of complete-null samples of size n.effects to be simulated. If omitted, nsets is determined so that the total number of simulated effects is about 40,000.

save

Logical value. If TRUE, the simulated reference distribution is saved in the workspace under .Last.ref.dist. Other routines in this package try to avoid re-simulating a reference distribution if .Last.refdist exists and matches the current method and n.effects.

effects

Vector of observed effects to be tested against the reference distribution.

pareto

Logical value. If TRUE, the effects are presented in decreasing order of their absolute size.

refdist

A result of a previous call to ref.dist, in case the user wishes to manually supply a previously simulated reference distribution. Note however that eff.test will automatically reuse .Last.ref.dist if it is available and matches.

Details

ref.dist simulates samples of effects from the standard normal dstribution. For each sample, the pseudo standaerd error (PSE) of the effects (typically some kind of outlier-resistant estimate of the SD) is obtained via a call to PSE with specified method. The absolute \(t\) values are obtained as ratios of the simulated effects and the PSE, as well as and the maxima of these absolute \(t\) values. Quantiles and tail areas of these simulated distributions then form a reference for obtaining critical values and P values in testing an observed sample of effects.

eff.test performs a traditional-style analysis for an observed sample of effects. It outputs the effects, PSE, \(t\) ratios; and uses tail areas of the associated reference distribution to compute individual and simultaneous \(P\) values. The simultaneous \(P\) values implement a multiplicity correction for any type-I errors occurring among the tests.

Value

ref.dist returns an object of class "eff_refdist" -- structurally, a list with elements abst (the absolute values of the simulated \(t\) statistics), max.abst (the sample maxima of abst), and sig (a signature of the form method_n.effects). There is a print method for this class that displays a summary.

eff.test returns a data.frame containing the estimates, \(t ratios\), and estimated P values as tail areas of abst and max.abst from the reference distribution.

Author

Russell V. Lenth

Examples

require("unrepx")

zahn15 <- ref.dist("Zahn", 15)
eff.test(pdEff, refdist = zahn15)
#>      effect Zahn_PSE t.ratio p.value simult.pval
#> T     24.00 1.296801  18.507  0.0000      0.0000
#> C     -8.00 1.296801  -6.169  0.0000      0.0004
#> c     -5.50 1.296801  -4.241  0.0009      0.0135
#> Tc     4.50 1.296801   3.470  0.0038      0.0506
#> P     -2.25 1.296801  -1.735  0.0829      0.6753
#> TP    -1.25 1.296801  -0.964  0.3075      0.9974
#> CT     1.00 1.296801   0.771  0.4285      1.0000
#> TPc   -0.75 1.296801  -0.578  0.5692      1.0000
#> CTP   -0.75 1.296801  -0.578  0.5692      1.0000
#> CP     0.75 1.296801   0.578  0.5692      1.0000
#> CTc    0.50 1.296801   0.386  0.7111      1.0000
#> CTPc  -0.25 1.296801  -0.193  0.8529      1.0000
#> CPc   -0.25 1.296801  -0.193  0.8529      1.0000
#> Pc    -0.25 1.296801  -0.193  0.8529      1.0000
#> Cc     0.00 1.296801   0.000  1.0000      1.0000