adjust_Rcpp_min: Adjustment function

Description Usage Arguments Details Value Examples

Description

This is the C++ adjustment function that is called by adjust_visits. It adjusts the numbers of shared visits for each pair.

Usage

1
adjust_Rcpp_min(mat, prob)

Arguments

mat

matrix with 3 columns (unadjusted number of shared visits, number of visits of the first member, number of visits of the second member) to adjust

prob

probability of sharing a single visit, default 1/75

Details

written in C++

Value

a vector of adjusted number of shared visits

Examples

1
2
3
4
5
6
visits <- data.frame(Freq = c(1,1,1,2,3),
                     N_visits.x = c(46,39,10,40,55),
                     N_visits.y = c(68,68,68,24,24))
mat <- as.matrix(visits)
adj_mat <- adjust_Rcpp_min(mat, prob=1/75)
adj_mat

alexmarzel/svisits documentation built on May 12, 2019, 1:36 a.m.