IntegrativeFPM: Integrative finite population mean (IntegrativeFPM)

Description Usage Arguments Details Value References Examples

View source: R/IntegrativeFPM.R

Description

Implements integrative analyses for the finite population mean parameters combining a non-probability sample with a probability sample which provides high-dimensional representative covariate information of the target population.

Usage

1
IntegrativeFPM(y, x, deltaB, sw, family, lambda_a, lambda_b)

Arguments

y

is a vector of outcome; NA for the probability sample (n x 1)

x

is a matrix of covariates without intercept (n x p)

deltaB

is a vector of the binary indicator of belonging to the nonprobability sample; i.e., 1 if the unit belongs to the nonprobability sample, and 0 otherwise (n x 1)

sw

is a vector of weights: 1 for the unit in the nonprobability sample and the design weight for the unit in the probability sample (n x 1)

family

specifies the outcome model

"gaussian": a linear regression model for the continuous outcome

"binomial": a logistic regression model for the binary outcome

lambda_a

is a scalar tuning parameter in the penalized estimating equation for alpha (the sampling score parameter)

The sampling score is a logistic regression model for the probability of selection into the nonprobability sample given X

lambda_b

is a scalar tuning parameter in the penalized estimation for beta (the outcome model parameter)

The outcome model is a linear regression model for continuous outcome or a logistic regression model for binary outcome

Details

The non-probability sample contains observations on (X,Y); however, the sampling mechanism is unknown. On the other hand, although the probability sample with sampling weights represents the finite population, it contains observations only on X.

The function "IntegrativeFPM" implements a two-step approach for integrating the probability sample and the nonprobability sample for finite population inference.

The first step selects important variables in the sampling score model and the outcome model by penalization.

The second step conducts a doubly robust inference for the finite population mean of interest. In this step, the nuisance model parameters are refitted based on the selected variables by minimizing the asymptotic squared bias of the doubly robust estimator. This estimating strategy mitigates the possible first-step selection error and renders the doubly robust estimator root-n consistent if either the sampling probability or the outcome model is correctly specified.

Value

References

Yang, S., Kim, J.K, and Song, R. (2019). Doubly Robust Inference when Combining Probability and Non-probability Samples with High-dimensional Data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
set.seed(1234)

## population size

N <- 10000

## x is a p-dimensional covariate

p <- 50
x <- matrix( rnorm(N*p,0,1),N,p)

## y is a continuous outcome

beta0 <- c(1,1,1,1,1,rep(0,p-4))
y <- cbind(1,x)%*%beta0 + rnorm(N,0,1)
true <- mean(y)

## y2 is a binary outcome

ly2 <- (cbind(1,x)%*%beta0)
ply <- exp(ly2)/(1+exp(ly2))
y2 <- rbinom(N,1,ply)
true2 <- mean(y2)

## A.set is a prob sample: SRS
## sampling probability into A is known when estimation

nAexp <- 1000
probA <- rep(nAexp/N,N)
A.index <- rbinom(N,size = 1,prob = probA)
A.loc <- which(A.index == 1)
nA <- sum(A.index == 1)
sw.A <- 1/probA[A.loc]
x.A <- x[A.loc,]
y.A <- rep(NA,nA) # y is not observed in Sample A
y2.A <- rep(NA,nA)

## B.set is a nonprob sample
## sampling probability into B is unknown when estimation

nBexp <- 2000
alpha0 <- c(-2,1,1,1,1,rep(0,p-4))
probB <- (1+exp(-cbind(1,x)%*%alpha0))^(-1)
B.index <- rbinom(N,size = 1,prob = probB)
B.loc <- which(B.index == 1)
nB <- sum(B.index)
x.B <- x[B.loc,]
y.B <- y[B.loc]
y2.B <- y2[B.loc]

## combined dataset

y.AB <- c(y.A,y.B)
y2.AB <- c(y2.A,y2.B)
x.AB <- rbind(x.A,x.B)
deltaB <- c(rep(0,nA),rep(1,nB))
sw <- c(sw.A,rep(1,nB))

## specify tuning parameters

lambda_a <- 1.25
lambda_b <- 0.25
lambda2_b <- 0.02

true
IntegrativeFPM(y=y.AB, x=x.AB, deltaB, sw, family="gaussian",lambda_a,lambda_b)

true2
IntegrativeFPM(y=y2.AB, x=x.AB, deltaB, sw, family="binomial",lambda_a, lambda2_b)

shuyang1987/IntegrativeFPM documentation built on April 28, 2021, 8:24 p.m.