estimate.degree.distns: estimate degree distributions by trait

Description Usage Arguments Details Value

View source: R/rds.r

Description

break down RDS degree distributions by trait, and return an object which has the degrees for each trait as well as functions to draw degrees from each trait.

Usage

1
estimate.degree.distns(survey.data, d.hat.vals, traits, keep.vars = NULL)

Arguments

survey.data

the respondent info

d.hat.vals

the variable that contains the degrees for each respondent

traits

a vector of the names of the columns of survey.data which refer to the traits

keep.vars

additional vars to return along with degrees

Details

one of the items returned as a result is a function, draw.degrees.fn, which takes one argument, traits. this is a vector of traits and, for each entry in this vector, draw.degress.fn returns a draw from the empirical distribution of degrees among respondents with that trait. so, draw.degrees.fn(c("0.0", "0.1", "0.1") would return a degree drawn uniformly at random from among the observed degrees of respondents with trait "0.0" and then two degrees from respondents with trait "0.1"

Value

an object with


surveybootstrap documentation built on May 29, 2017, 9:09 a.m.