Description Usage Arguments Value See Also Examples

View source: R/simCNVdataWeibull.R

This function simulates intensity for a CNV and a time to event response (followed-up cohort study design) for different scenarios

1 2 | ```
simCNVdataWeibull(n, mu.surrog, sd.surrog, w, lambda, shape, time.cens = Inf,
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. |

`lambda` |
A vector containing the means of the response variable for every copy number status |

`shape` |
A vector containing the shape of the response variable for every copy number status |

`time.cens` |
Censoring time, e.g. end of follow-up |

`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 |

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

`resp` |
Time to event or censoring variable (response) |

`cens` |
Censoring indicator |

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

`cnv` |
True copy number status |

`simCNVdataBinary`

,
`simCNVdataCaseCon`

,
`simCNVdataPois`

,
`simCNVdataNorm`

,
`cnv`

,
`CNVassoc`

1 2 3 4 5 6 7 8 9 10 11 12 | ```
library(survival)
maf<-0.3
hr<-1.5
set.seed(123)
simData<-simCNVdataWeibull(n=3000, mu.surrog=c(0,0.5,1), sd.surrog=rep(0.15,3),
w=c((1-maf)^2,2*maf*(1-maf), maf^2), lambda=0.05*c(1,hr,hr^2), shape=rep(1,3),
time.cens=1.5, cnv.random = FALSE)
CNV<-cnv(simData$surrog,mix.method="EMmixt")
getQualityScore(CNV,type="CNVtools")
mod<-CNVassoc(Surv(resp, cens)~CNV,data=simData,family="weibull")
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.