getBiCop: Simulate bivariate normally distributed data with specified...

Description Usage Arguments Details

Description

The variables x and y stem from a distribution with correlation rho, but the actual correlation between x and y will vary around that true value.

Usage

1
2
getBiCop(N, rho, rho_sub = NA, fraction = NA, mar.fun = rnorm, x = NULL,
  ...)

Arguments

rho

True correlation coefficient in the population. If rho_sub is given, this is the correlation in the rest of the sample without the subset.

rho_sub

True correlation coefficient in the subset. Default is no seperate subset.

fraction

The size of the subset as a percentage of the full sample. The subset is then contained in the first round(N * fraction) rows of the returned data frame.

n

Sample size.

Details

Code from http://stats.stackexchange.com/questions/15011/generate-a-random-variable-with-a-defined-correlation-to-an-existing-variable


Thie1e/subsetcor documentation built on May 9, 2019, 4:41 p.m.