Learn R Programming

SharpeR (version 0.1401)

plambdap: The lambda-prime distribution.

Description

Distribution function and quantile function for LeCoutre's lambda-prime distribution with df degrees of freedom and the observed t-statistic, tstat.

Usage

plambdap(q, df, tstat, lower.tail = TRUE, log.p = FALSE)

qlambdap(p, df, tstat, lower.tail = TRUE, log.p = FALSE)

Arguments

q
vector of quantiles.
p
vector of probabilities.
df
the degrees of freedom of the t-statistic.
tstat
the observed (non-central) t-statistic.
log.p
logical; if TRUE, probabilities p are given as $\mbox{log}(p)$.
lower.tail
logical; if TRUE (default), probabilities are $P[X \le x]$, otherwise, $P[X > x]$.

Value

  • dlambdap gives the density, plambdap gives the distribution function, qlambdap gives the quantile function, and rlambdap generates random deviates.

    Invalid arguments will result in return value NaN with a warning.

Details

Let $t$ be distributed as a non-central t with $\nu$ degrees of freedom and non-centrality parameter $\delta$. We can view this as $$t = \frac{Z + \delta}{\sqrt{V/\nu}}.$$ where $Z$ is a standard normal, $\delta$ is the non-centrality parameter, $V$ is a chi-square RV with $\nu$ degrees of freedom, independent of $Z$. We can rewrite this as $$\delta = t\sqrt{V/\nu} + Z.$$

Thus a 'lambda-prime' random variable with parameters $t$ and $\nu$ is one expressable as a sum $$t\sqrt{V/\nu} + Z$$ for Chi-square $V$ with $\nu$ d.f., independent from standard normal $Z$

References

Lecoutre, Bruno. "Another look at confidence intervals for the noncentral t distribution." Journal of Modern Applied Statistical Methods 6, no. 1 (2007): 107--116. http://www.univ-rouen.fr/LMRS/Persopage/Lecoutre/telechargements/Lecoutre_Another_look-JMSAM2007_6(1).pdf

Lecoutre, Bruno. "Two useful distributions for Bayesian predictive procedures under normal models." Journal of Statistical Planning and Inference 79 (1999): 93--105.

See Also

t-distribution functions, dt,pt,qt,rt

Other sr: as.sr, as.sr.data.frame, as.sr.default, as.sr.lm, as.sr.matrix, as.sr.timeSeries, as.sr.xts, confint.del_sropt, confint.sr, confint.sropt, dsr, is.sr, power.sr_test, print.del_sropt, print.sr, print.sropt, reannualize, reannualize.sr, reannualize.sropt, se, se.sr, sr, sr_equality_test, sr_test, sr_vcov

Examples

Run this code
rvs <- rnorm(128)
pvs <- plambdap(rvs, 253*6, 0.5)
plot(ecdf(pvs))
pvs <- plambdap(rvs, 253*6, 1)
plot(ecdf(pvs))
pvs <- plambdap(rvs, 253*6, -0.5)
plot(ecdf(pvs))
# test vectorization:
qv <- qlambdap(0.1,128,2)
qv <- qlambdap(c(0.1),128,2)
qv <- qlambdap(c(0.2),128,2)
qv <- qlambdap(c(0.2),253,2)
qv <- qlambdap(c(0.1,0.2),128,2)
qv <- qlambdap(c(0.1,0.2),c(128,253),2)
qv <- qlambdap(c(0.1,0.2),c(128,253),c(2,4))
qv <- qlambdap(c(0.1,0.2),c(128,253),c(2,4,8,16))

Run the code above in your browser using DataLab