Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

4.2 The g-and-h Distribution > 4.2.1 R Functions ghdist and rmul - Pg. 110

110 Introduction to Robust Estimation and Hypothesis Testing Table 4.2: One-Sided Type I Error Probabilities when Using Student's t, n = 12, = 0.025. g 0.0 0.0 0.5 0.5 h 0.0 0.5 0.0 0.5 P(T > t 0.975 ) .025 .015 .000 .000 P(T < t 0.025 ) .025 .016 .420 .295 fixed g, as the tails get heavier (h increases from 0 to 0.5), the probability of a type I error decreases. This is not surprising because sampling from a heavy-tailed distribution inflates s which in turn results in longer confidence intervals. A similar result, but to a lesser extent, is found when using robust measures of location. Multivariate g-and-h Distributions It is noted that multivariate distributions having some specified correlation matrix R can be generated as follows. Generate X where the marginal distributions are independent. Form the Cholesky decomposition U U = R, where U is the matrix of factor loadings of the principal components of the square-root method of factoring a correlation matrix, and U is the transpose of U . Then XU produces a matrix of data that has population correlation matrix R. 4.2.1 R Functions ghdist and rmul The R function ghdist(n,g=0,h=0) generates n observations from a g-and-h distribution. By default, observations are generated from a standard normal distribution (g = h = 0). The R function rmul(n,p = 2, cmat = diag(rep(1, p)), rho = NA, mar.fun = rnorm,...) generates n vectors of observations from a p-variate distribution having correlation matrix specified by the argument cmat and marginal distributions specified by the argument mar.fun. By default, data are generated from a bivariate normal distribution with Pearson's correlation equal to 0. If the argument rho is specified, all pairs of variables will have correlation rho. The command rmul(30, p = 3,rho = 0.4, mar.fun = ghdist, g=1, h=0.2) would first generate data from a trivariate distribution for which the marginal distributions are independent with marginal g-and-h distributions, where g = 1 and h = 0.2, after which the www.elsevierdirect.com