Description Usage Arguments Details Value Author(s) References See Also
The function wrapper_fast_multinom
estimates the regression coefficients of a multinomial logistic model with fast_multinom
. This wrapper was used in our analysis in Bertl et al. (2007) (see References). The function wrapper_fast_multinom_binom
uses a binomial model instead.
1 2 3 4 5 6 7 | wrapper_fast_multinom(model.index, mi, datafolder, modelfile, resultsfolder,
startfile, contrasts = "all_sum", nested_samples = T, VC = T,
loglik = T)
wrapper_fast_multinom_binom(model.index, mi, datafolder, modelfile,
resultsfolder, startfile, contrasts = "all_sum", nested_samples = T,
VC = T, loglik = T)
|
model.index |
integer. Number of the model in the model matrix. |
mi |
integer. Number of multiple imputation replicate of the data set. |
datafolder |
character. Folder, where the data is saved. See data(cancermutations) for an example. The filename is |
modelfile |
character. File that contains the models in the form of a matrix (see examples). |
resultsfolder |
character. Where to save the results? |
startfile |
character. File that contains starting values for the parameter estimation. |
contrasts |
character. What contrasts should be set for the variables cancer_type, genomicSeg and sample_id. Default: 'all_sum'. All other settings will use the default contrasts, i. e. treatment contrasts. |
nested_samples |
Logical. Should the contrasts be defined such that the samples are nested within the cancer types? Default: T |
VC |
Logical. Should the VC matrix be computed? Default: T |
loglik |
Logical. Should the log-likelihood be computed? Default: T |
A dataset similar to the example data set cancermutations
is read. The dummy variables strong
, Cgi
, simple_repeat
, DNase1_peak
, expression_dummy
are changed to factors, optionally, sum contrasts are set to cancer_type, genomicSeg and sample_id, and nested contrasts are set to create a nesting of sample_id in cancer_type.
Then, the multinomial regression model indexed by model.index
is obtained from a model file and estimated with the function fast_multinom
.
The scripts that were used to run this function and that show all settings used in Bertl et al. (2007) are available in this package in the folder inst/Bertl_et_al_2017
. The pre-processed data can be downloaded from figshare.
There is no output. The estimates are saved along with (potential) warning messages.
Johanna Bertl
Bertl, J.; Guo, Q.; Rasmussen, M. J.; Besenbacher, S; Nielsen, M. M.; Hornshøj, H.; Pedersen, J. S. & Hobolth, A. A Site Specific Model And Analysis Of The Neutral Somatic Mutation Rate In Whole-Genome Cancer Data. bioRxiv, 2017. doi: https://doi.org/10.1101/122879 http://www.biorxiv.org/content/early/2017/06/21/122879
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.