Description Usage Arguments Value
View source: R/weighted-sampling.R
Calculate the log likelihood using weighted sampling
1  | loglike_weighted_total(par, prev_par, freq, n_vec, x_vec, B, return_neg = TRUE)
 | 
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  | 
log likelihood sum as a function of par
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.