Description Usage Arguments Value Author(s) References See Also Examples
This function performs correlation tests for the shocks generated by simshocks
.
1 2 3 4 5 6 | esgcortest(
x,
alternative = c("two.sided", "less", "greater"),
method = c("pearson", "kendall", "spearman"),
conf.level = 0.95
)
|
x |
gaussian (bivariate) shocks, with correlation, generated by |
alternative |
indicates the alternative hypothesis and must be one of "two.sided", "greater" or "less". |
method |
which correlation coefficient is to be used for the test : "pearson", "kendall", or "spearman". |
conf.level |
confidence level. |
a list with 2 components : estimated correlation coefficients, and confidence intervals for the estimated correlations.
Thierry Moudiki + stats package
D. J. Best & D. E. Roberts (1975), Algorithm AS 89: The Upper Tail Probabilities of Spearman's rho. Applied Statistics, 24, 377-379.
Myles Hollander & Douglas A. Wolfe (1973), Nonparametric Statistical Methods. New York: John Wiley & Sons. Pages 185-194 (Kendall and Spearman tests).
1 2 3 4 5 6 7 8 9 10 11 12 13 | nb <- 500
s0.par1 <- simshocks(n = nb, horizon = 3, frequency = "semi",
family = 1, par = 0.2)
s0.par2 <- simshocks(n = nb, horizon = 3, frequency = "semi",
family = 1, par = 0.8)
(test1 <- esgcortest(s0.par1))
(test2 <- esgcortest(s0.par2))
par(mfrow=c(2, 1))
esgplotbands(test1)
esgplotbands(test2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.