# gen_mixed_data: Generate correlated bivariate mixed outcome data In pgee.mixed: Penalized Generalized Estimating Equations for Bivariate Mixed Outcomes

## Description

`gen_mixed_data` returns randomly generated correlated bivariate mixed outcomes, and covariate matrices to model them, based on design parameters set in the function.

## Usage

 ```1 2``` ```gen_mixed_data(Beta.cont, Beta.bin, N, rho, intercept = TRUE, cov = "same", xcor = 0.25, sigma_yc = 1) ```

## Arguments

 `Beta.cont` Vector of true regression coefficients for the continuous outcome. `Beta.bin` Vector of true regression coefficients for the binary outcome. `N` Number of pairs of correlated outcomes. `rho` Gaussian copula parameter. `intercept` Assume an intercept (for both outcomes)? (default TRUE). If TRUE, then the first coefficient in Beta.cont and Beta.bin are assumed to correspond to intercepts. `cov` Specify if the covariate matrices for the continuous outcome and the binary outcome should share all covariates (set to "same"), share some covariates (set to "shared"), or share no covariates (set to "separate"). `xcor` Correlation parameter for AR(1) correlation structure of covariate design matrices (assumed same for both). `sigma_yc` Marginal variance of continuous responses.

## Details

A Gaussian copula is used to generate the correlated outcomes. Marginally, the continuous outcome follows a normal distribution with identity link to covariates, while the binary outcome follows a Bernoulli distribution with logit link to covariates. Covariates are generated from a zero-mean unit variance multivariate normal distribution, with an AR(1) correlation structure.

## Value

A list of generated data

 `yc` Vector of continuous outcomes. `yb` Vector of binary outcomes. `X` Covariate matrix for the continuous outcomes. `Z` Covariate matrix for the binary outcomes.

## Examples

 ```1 2 3 4``` ```# default settings gen_mixed_data(rnorm(5), rnorm(5), 10, 0.5) # separate covariate matrices, non-unit continuous variance gen_mixed_data(rnorm(5), rnorm(5), 10, 0.5, cov = "separate", sigma_yc = 2) ```

### Example output

```
```

pgee.mixed documentation built on May 2, 2019, 8:35 a.m.