get_histogram_with_post_mean {BMRMM}R Documentation

Duration Times Plots: Histogram of duration times with Estimated Posterior Mean

Description

Plots the histogram of Duration Times superimposed the posterior mean mixture gamma distribution

Usage

get_histogram_with_post_mean(
  results,
  x_range = c(min(results$Duration_Times), max(results$Duration_Times)),
  breaks = (max(results$Duration_Times) - min(results$Duration_Times)) *
    length(results$Duration_Times)^(1/3)/2/IQR(results$Duration_Times)
)

Arguments

results

results of duration times, i.e., results_duration

x_range

custom range for x-axis; default is (min(durations),max(durations))

breaks

custom breaks for the histogram; default breaks follows the Freedman-Diaconis rule, which would be (max(durations)-min(durations))*n^(1/3)/2/IQR(durations)

Value

No return value, called for plotting histogram superimposed with the posterior distribution of mixture gamma.

Examples

results <- BMRMM(foxp2_sm,num_cov=2,simsize=50)
get_histogram_with_post_mean(results$results_duration,x_range=c(0,2),breaks=50)

[Package BMRMM version 0.0.1 Index]