Description Usage Arguments Value Author(s) References Examples
Purely for testing of the rho_0 function.
1 | CheckRho(x1, x2, mu1, mu2, s1, s2, Srho12, G_Point7, GH_Quadrature)
|
x1 |
See rho_0 |
x2 |
See rho_0 |
mu1 |
See rho_0 |
mu2 |
See rho_0 |
s1 |
See rho_0 |
s2 |
See rho_0 |
Srho12 |
See rho_0 |
G_Point7 |
See rho_0 |
GH_Quadrature |
See rho_0 |
See rho_0
Yan-Xia Lin
No references
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x1, x2, mu1, mu2, s1, s2, Srho12, G_Point7, GH_Quadrature)
{
fhat1 <- kde(x = x1, binned = TRUE)
fhat2 <- kde(x = x2, binned = TRUE)
g <- 0
m <- 7
for (l in 1:m) {
for (k in 1:m) {
g <- g + GH_Quadrature[l] * GH_Quadrature[k] * ((qkde(pnorm(G_Point7[l]),
fhat1) - mu1)/s1) * ((qkde(pnorm(Srho12 * G_Point7[l] +
sqrt(1 - Srho12^2) * G_Point7[k]), fhat2) - mu2)/s2)
}
}
return(g)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.