Description Usage Arguments Value Examples
Compute a likelihood ratio test based on the loglikelihoods of the residuals of two different models of the same data.
1 2 3 4 5 6 7 8 | logLikelihood(
in_1,
in_2,
df_1 = NULL,
df_2 = NULL,
in_pdf = NULL,
verbose = FALSE
)
|
in_1 |
Residuals of model 1 of the input data. |
in_2 |
Residuals of model 2 of the input data. |
df_1 |
Degrees of freedom of the input model 1. If either |
df_2 |
Degrees of freedom of the input model 2. If either |
in_pdf |
Probability distribution function, passed on to computeLogLik, if NULL a normal distribution is used. |
verbose |
Verbose if |
A list with entries
statistic
: The test
statistic
delta_df
: The difference in degrees of freedom between
input model 1 and 2
p.value
: p value of the statistical test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | library(BSgenome.Hsapiens.UCSC.hg19)
data(lymphoma_test)
data(sigs)
data(cutoffs)
word_length <- 3
temp_list <- create_mutation_catalogue_from_df(
lymphoma_test_df,this_seqnames.field = "CHROM",
this_start.field = "POS",this_end.field = "POS",
this_PID.field = "PID",this_subgroup.field = "SUBGROUP",
this_refGenome = BSgenome.Hsapiens.UCSC.hg19,
this_wordLength = word_length)
lymphoma_catalogue_df <- temp_list$matrix
lymphoma_PIDs <- colnames(lymphoma_catalogue_df)
current_sig_df <- AlexCosmicValid_sig_df
current_sigInd_df <- AlexCosmicValid_sigInd_df
current_cutoff_vector <- cutoffCosmicValid_rel_df[6, ]
iniLCDList <- LCD_complex_cutoff(
in_mutation_catalogue_df = lymphoma_catalogue_df[, 1, drop = FALSE],
in_signatures_df = current_sig_df,
in_cutoff_vector = current_cutoff_vector,
in_method = "relative", in_rescale = TRUE,
in_sig_ind_df = current_sigInd_df)
current_sig_df <- AlexCosmicValid_sig_df[, -9]
current_sigInd_df <- AlexCosmicValid_sigInd_df[-9,]
current_cutoff_vector <- cutoffCosmicValid_rel_df[6, -9]
redLCDList <- LCD_complex_cutoff(
in_mutation_catalogue_df = lymphoma_catalogue_df[, 1, drop = FALSE],
in_signatures_df = current_sig_df,
in_cutoff_vector = current_cutoff_vector,
in_method = "relative", in_rescale = TRUE,
in_sig_ind_df = current_sigInd_df)
logLikelihood(iniLCDList, redLCDList)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.