Description Usage Arguments Value Author(s) References See Also Examples
This function simulates bivariate distribution with correaltion equal to rho
, mean equal to mean
,
standard deviation equal to sd
, skewness equal to skewness
, and kurtosis equal to kurtosis
by Fleishman polynomials. Note that that the specified skewness and kurtosis parameters have to be in line with
kurtosis >= (skewnewss^2 - 2)
1 2 |
n |
number of observations. |
rho |
correlation. |
mean |
mean vector. |
sd |
standard deviation vector. |
skewness |
skewness vector. |
kurtosis |
kurtosis vector. |
Returns a data.frame with variables x
and y
.
Takuya Yanagida takuya.yanagida@univie.ac.at,
Rasch, D., Kubinger, K. D., & Yanagida, T. (2011). Statistics in psychology - Using R and SPSS. New York: John Wiley & Sons.
test.cor
, seqtest.cor
, comptest.cor
,
1 2 3 4 5 6 7 8 9 10 11 12 13 | #------------------------------------------------
# Bivariate distribution with rho = 0.3, n = 200
# x: skewness = 0, kurtosis = 0
# y: skewness = 0, kurtosis = 0
sim.cor(200, rho = 0.3)
#-----------------------------------------------
# Bivariate distribution with rho = 0.4, n = 500
# x: skewness = 0, kurtosis = 1.5
# y: skewness = 2, kurtosis = 7
sim.cor(500, rho = 0.4, skewness = c(0, 1.5), kurtosis = c(2, 7))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.