Description Usage Arguments Value Author(s) References See Also Examples
Simulate paired data with a given correlation (Kendall's tau=(2/pi)arcsine(r)) and marginals being contaminated normal distributions: (1-eps)*F(x)+eps*F(x/K) where F is the cumulative standard normal distribution, eps the percentage of contamination and K a scale parameter. Moreover, this marginal can be multiplied by another scale parameter sigma but usually sigma=1.
1 | rpaired.contaminated(n, d1 = c(0.1, 10, 1), d2 = c(0.1, 10, 1), r = 0.5)
|
n |
sample size. |
d1 |
vector of 3 parameters for the first contaminated normal distribution (eps,K,sigma). |
d2 |
vector of 3 parameters for the second contaminated normal distribution. |
r |
correlation. |
An object of class paired.
Stephane CHAMPELY
Grambsch, P.M. (1994) Simple robust tests for scale differences in paired data. Biometrika, 81, 359-372.
rpaired.gld
1 | rpaired.contaminated(n=30,r=0.25)
|
Loading required package: MASS
Loading required package: gld
Loading required package: mvtnorm
Loading required package: lattice
Loading required package: ggplot2
Attaching package: 'PairedData'
The following object is masked from 'package:base':
summary
Object of class "paired"
x y
1 -1.25425568 -0.24011417
2 0.72832734 -1.22195587
3 0.49525938 0.40228973
4 1.10043402 0.25075798
5 -12.85167637 -0.91213567
6 0.16674703 -0.55698772
7 -0.08107328 -1.70426691
8 0.35100685 -0.23405973
9 -0.90996292 0.23556310
10 -0.80124291 0.31983489
11 0.89799602 0.11812255
12 0.68885412 1.25048906
13 -0.26101314 -2.12100710
14 0.08616934 0.01434244
15 8.46116263 -0.07647823
16 -0.17341171 -0.09174746
17 -0.16953829 -0.39988502
18 5.10265697 -0.09629965
19 0.34495777 1.48597645
20 0.99606301 14.99169443
21 -0.37251298 -0.02883713
22 1.52279927 0.17420437
23 0.78456967 0.23346818
24 -12.42257824 0.21585978
25 1.04183825 -0.34070250
26 1.87415023 0.71451733
27 0.30269294 -0.37297347
28 0.88441167 6.67061254
29 -8.66472030 0.53616022
30 0.35743697 1.33823297
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.