loglike_weighted_total: Calculate the log likelihood using weighted sampling

Description Usage Arguments Value

View source: R/weighted-sampling.R

Description

Calculate the log likelihood using weighted sampling

Usage

1
loglike_weighted_total(par, prev_par, freq, n_vec, x_vec, B, return_neg = TRUE)

Arguments

par

parameters to optimize over. par[1] is beta_0 and par[2] is beta_1

prev_par

parameters to form the weights. 1 is beta_0 and 2 is beta_1

freq

vector of times the cluster of size n with x positives occurred

n_vec

cluster sizes

x_vec

number of positives in each cluster

B

number of samples for each

return_neg

logical. Default is TRUE, returns the negative log likelihood

Value

log likelihood sum as a function of par


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