Description Usage Arguments Details Value See Also Examples

This function simulates intensity for a CNV and a quantitative trait response for different scenarios

1 | ```
simCNVdataNorm(n, mu.surrog, sd.surrog, w, mu.y, sd.y, cnv.random = FALSE)
``` |

`n` |
An integer indicating the desired number of individuals to be simulated |

`mu.surrog` |
A vector containing the signal (surrogate variable) means for every copy number status (latent classes). Its length must be equal to the number of latent classes |

`sd.surrog` |
A vector containing the signal standard deviation for every copy number status. Its length must be equal to mu.surrog. |

`w` |
A vector containing the frequencies for every copy number status. Its length must be equal to mu.surrog and its components must sum up one. |

`mu.y` |
A vector containing the means of the response variable for every copy number status. Its length must be equal to mu.surrog. |

`sd.y` |
A single number indicating the residual standard deviation |

`cnv.random` |
A logical value. TRUE means that copy number status is drawn under a multinomial distribution with proportions indicated by 'w'. FALSE means that the real simulated frequency is always the same and is rounded to the most similar integer to the frequencies indicated by 'w'. Default value is FALSE |

This function is useful to calculate the power of association models for a
continuous (normal-distributed) trait under different scenarios ,e.g.
setting different degrees of association (effects), considering different
degrees of uncertainty controlled by the distribution of intensity signal
data, i.e. mean `mu.surrog`

, standard deviation `sd.surrog`

and
proportion `w`

, etc.

Data frame with individual simulated data per row and with the following variables:

`resp` |
Continous trait variable (response) |

`surrog` |
Signal intensity following a mixture of normals with means,
standard deviations
and proportions specified by |

`cnv` |
True copy number status |

`simCNVdataBinary`

,
`simCNVdataCaseCon`

,
`simCNVdataPois`

,
`simCNVdataWeibull`

,
`cnv`

,
`CNVassoc`

1 2 3 4 5 6 7 8 9 10 11 | ```
set.seed(123)
maf<-0.3
effect<-3
simData<-simCNVdataNorm(n=1000, mu.surrog=c(0,0.5,1), sd.surrog=rep(0.15,3),
w=c((1-maf)^2,2*maf*(1-maf), maf^2), mu.y=100+c(0,effect,2*effect),
sd.y=rep(20,3), cnv.random = FALSE)
CNV<-cnv(simData$surrog,mix.method="EMmixt")
getQualityScore(CNV,type="CNVtools")
mod<-CNVassoc(resp~CNV,data=simData,family="gaussian",emsteps=10)
CNVtest(mod)
summary(mod)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.