loglike_cluster_summary: Calculate the log likelihood for data

Description Usage Arguments Value

View source: R/likelihood.R

Description

Calculate the log likelihood for data

Usage

1
2
3
4
5
6
7
loglike_cluster_summary(
  par,
  cluster_summary,
  sampled_trees,
  return_neg = FALSE,
  n_trials = 10
)

Arguments

par

vector of parameters "beta_0" and "beta_1"

cluster_summary

output from summarize_clusters()

sampled_trees

draws from simulate_many_cond_bp

return_neg

If TRUE, return the negative log like.

n_trials

number of trials for each "average"

Value

likelihood summing over the 'average' of cluster with given n and n_pos (single number), weighted by the data


skgallagher/TBornotTB documentation built on April 21, 2020, 1:19 p.m.