em.counts_to_responses: Convert counts to individual responses

Description Usage Arguments Value Examples

View source: R/data_convert.R

Description

There are many ways to represent the same data. In problem 4.2, the data is given in the form of counts. This is the inverse of em.counts_to_responses, e.g.,

1
2
3

Usage

1

Arguments

counts

count data

Value

the count data converted to response data, say counts = (379,299,...), then 379 responded 0 encounters, 299 responded 1 encounter, ...

Examples

1
2
3
4
  # let counts be the count data
  counts[j] # denotes number of respondents with j risky sexual encounters.
  xs <- em.counts_to_responses(counts)
  xs[k] # denotes the response of the i-th person

queelius/prob.4.2.comp.stats documentation built on Dec. 22, 2021, 10:58 a.m.