cond_prob: Generate conditional probabilities by group

Description Usage Arguments Value

Description

Generate conditional probabilities by group

Usage

1
cond_prob(data, factor, newvar, prob_list)

Arguments

data

dataframe to add variable to

factor

grouping variable that probability of newvar is conditional on

newvar

name, character, of new variable defined by prob_list

prob_list

a list, defining the way newvar should be generated

Value

data.frame with newvar appended to dataframe


OpenSDP/OpenSDPsynthR documentation built on June 20, 2020, 6:18 a.m.