makePSData {fitPS} | R Documentation |
Create a survey data set manually
Description
Create a survey data set from the command line rather than reading data in from a file. This function is likely to be only useful where there are a very small number of group sizes, or sizes of groups of glass.
Usage
makePSData(n, count = NULL, type = c("P", "S"), notes = NULL)
makeData(n, count = NULL, type = c("P", "S"), notes = NULL)
createPSData(n, count = NULL, type = c("P", "S"), notes = NULL)
Arguments
n |
Either the number of groups of glass or the size of different groups
of glass, or a |
count |
Either the number of people in the survey sample who had
|
type |
either |
notes |
a |
Details
If count
is NULL
, then it is assumed that n
consists of actual observed group sizes or numbers of groups of glass found
on a survey of N individuals. That is, one could provide n = rep(0:1,
98, 1)
or n = 0:1, count = c(98, 1)
. The former is more useful when
performing simulation studies.
Value
an object of type psData
—see readData
for more
details.
See Also
readData
Examples
## recreate the data read in the readData example
p1 = makePSData(n = c(0, 1, 2), count = c(98, 1, 1), type = "P")
s1 = makePSData(n = 1:3, count = c(1, 1, 1), type = "S")
p1
s1