Randomly select configurations from a data frame or configTable
Randomly select configurations from a data frame or configTable
The function some randomly selects configurations from a data frame or configTable with or without replacement.
some(x,...)## S3 method for class 'data.frame'some(x, n =10, replace =TRUE,...)## S3 method for class 'configTable'some(x, n =10, replace =TRUE,...)
Arguments
x: Data frame or configTable.
n: Sample size.
replace: Logical; if TRUE, configurations are sampled with replacement.
...: Not used.
Details
The function some randomly samples configurations from x, which is a data frame or configTable. Such samples can, for instance, be used to simulate data fragmentation (limited diversity), i.e. the failure to observe/measure all configurations that are compatible with a data generating causal structure. They can also be used to simulate large-N data featuring multiple cases instantiating each configuration.
Returns
A data frame or configTable.
Note
The generic function some is read from the package list("car"). The method for data.frames in the cna package has an additional parameter replace, which is TRUE by default. It will thus not apply the same sampling scheme as the method in car by default.
References
Krook, Mona Lena. 2010. Women's Representation in Parliament: A Qualitative ComparativeAnalysis.