qpUnifRndAssociation {qpgraph} | R Documentation

## Uniformly random association values

### Description

Builds a matrix of uniformly random association values between -1 and +1 for all pairs of variables that follow from the number of variables given as input argument.

### Usage

    qpUnifRndAssociation(n.var, var.names=as.character(1:n.var))

### Arguments

`n.var` | number of variables.
`var.names` | names of the variables to use as row and column names in the resulting matrix.

### Details

This function simply generates uniformly random association values with no independence pattern associated to them. For generating a random covariance matrix that reflects such a pattern use the function `qpG2Sigma`.

### Value

A symmetric matrix of uniformly random association values between -1 and +1.

### Author(s)

R. Castelo

### See Also

`qpG2Sigma`

### Examples

    rndassociation <- qpUnifRndAssociation(100)
    summary(rndassociation[upper.tri(rndassociation)])

[Package qpgraph version 2.14.0 Index]