simuldata: A function to reorder the columns of a data table/matrix/data...

Description Usage Arguments Value References Examples

View source: R/simuldata.R

Description

A function to reorder the columns of a data table/matrix/data frame and to change factor variables to numeric.

Usage

1
simuldata(n, l, categorical = FALSE, ep = 0, K = 2)

Arguments

n

The size of the population.

l

The number of continuous covariates.

categorical

A logical value of whether to include a categorical column.

ep

A numeric value to change the list probabilities.

K

The number of lists. Default value is 2. Maximum value is 3.

Value

A list of estimates containing the following components:

data

A dataframe in with K list capture histories and covariates from a population if true size n with only observed rows.

data_xstar

A dataframe in with two list capture histories and transformed covariates from a population if true size n with only observed rows.

psi0

The empirical capture probability for the set-up used.

pi1

The conditional capture probabilities for list 1.

pi2

The conditional capture probabilities for list 2.

pi3

The conditional capture probabilities for list 3 when K = 3.

References

Tilling, K., & Sterne, J. A. (1999). Capture-recapture models including covariate effects. American journal of epidemiology, 149(4), 392-400.

Kennedy, E. H. (2019). Nonparametric causal effects based on incremental propensity score interventions. Journal of the American Statistical Association, 114(526), 645-656.

Examples

1
2
data = simuldata(n = 1000, l = 2)$data
psi0 = simuldata(n = 10000, l = 2)$psi0

drpop documentation built on Oct. 11, 2021, 9:06 a.m.