distMat {expandFunctions} | R Documentation |
Generate a pXq matrix with coefficients drawn from the univariate distribution dist with options distOpt.
distMat(p, q, dist = rnorm, distOpt = NULL)
p |
Number of rows |
q |
Number of columns |
dist |
distribution of coefficients to draw from; default is rnorm. |
distOpt |
Named list of additional parameters for dist. Always omit the first parameter,n, of the distribution sampling function. Defaults may be omitted if desired (see examples). |
The user may provide their own distribution function, but note that the number of values to return, n, must be the first argument, just as with the built-in distributions. The first argument does not have to be named.
A pXq matrix with coefficients distributed as dist with parameters defined in '...'
X <- distMat(10,2) X <- distMat(10,2,distOpt=list(mean=1,sd=2)) X <- distMat(5,3,rnorm,list(mean=1,sd=2)) X <- distMat(5,3,rnorm,list(sd=2)) X <- distMat(50,3,rt,list(df=3))