Description Usage Arguments Value References See Also Examples
View source: R/power_norm_corr.R
This function calculates the correlation between a continuous variable, Y1, generated using a third or fifth-
order polynomial transformation and the generating standard normal variable, Z1. The power method correlation
(described in Headrick & Kowalchuk, 2007, doi: 10.1080/10629360600605065) is given by:
ρ_{y1,z1} = c1 + 3*c3 + 15* c5, where c5 = 0 if method
= "Fleishman". A value <= 0 indicates an invalid
pdf and the signs of c1 and c3 should be reversed, which could still yield an invalid pdf. All constants should
be checked using pdf_check
to see if they generate a valid pdf.
1 | power_norm_corr(c, method)
|
c |
a vector of constants c0, c1, c2, c3 (if |
method |
the method used to find the constants. "Fleishman" uses a third-order polynomial transformation and "Polynomial" uses Headrick's fifth-order transformation. |
A scalar equal to the correlation.
Please see references for pdf_check
.
fleish
, poly
,
find_constants
, pdf_check
1 2 3 4 5 6 7 8 9 | # Beta(a = 4, b = 2) Distribution
power_norm_corr(c = c(0.108304, 1.104252, -0.123347, -0.045284, 0.005014,
0.001285),
method = "Polynomial")
# Switch signs on c1, c3, and c5 to get negative correlation (invalid pdf):
power_norm_corr(c = c(0.108304, -1.104252, -0.123347, 0.045284, 0.005014,
-0.001285),
method = "Polynomial")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.