-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tex
1663 lines (1489 loc) · 81.5 KB
/
index.tex
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
%
\documentclass[
letterpaper,
DIV=11,
numbers=noendperiod]{scrreprt}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
% xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\usepackage[margin=1in]{geometry}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\setcounter{secnumdepth}{5}
% Make \paragraph and \subparagraph free-standing
\makeatletter
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}{
\@ifstar
\xxxParagraphStar
\xxxParagraphNoStar
}
\newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}}
\newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}{
\@ifstar
\xxxSubParagraphStar
\xxxSubParagraphNoStar
}
\newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}}
\newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
\makeatother
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}\usepackage{longtable,booktabs,array}
\usepackage{calc} % for calculating minipage widths
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
\usepackage{graphicx}
\makeatletter
\newsavebox\pandoc@box
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
\sbox\pandoc@box{#1}%
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
\else\usebox{\pandoc@box}%
\fi%
}
% Set default figure placement to htbp
\def\fps@figure{htbp}
\makeatother
% definitions for citeproc citations
\NewDocumentCommand\citeproctext{}{}
\NewDocumentCommand\citeproc{mm}{%
\begingroup\def\citeproctext{#2}\cite{#1}\endgroup}
\makeatletter
% allow citations to break across lines
\let\@cite@ofmt\@firstofone
% avoid brackets around text for \cite:
\def\@biblabel#1{}
\def\@cite#1#2{{#1\if@tempswa , #2\fi}}
\makeatother
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing
{\begin{list}{}{%
\setlength{\itemindent}{0pt}
\setlength{\leftmargin}{0pt}
\setlength{\parsep}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\setlength{\leftmargin}{\cslhangindent}
\setlength{\itemindent}{-1\cslhangindent}
\fi
% set entry spacing
\setlength{\itemsep}{#2\baselineskip}}}
{\end{list}}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
\KOMAoption{captions}{tableheading}
\makeatletter
\@ifpackageloaded{bookmark}{}{\usepackage{bookmark}}
\makeatother
\makeatletter
\@ifpackageloaded{caption}{}{\usepackage{caption}}
\AtBeginDocument{%
\ifdefined\contentsname
\renewcommand*\contentsname{Table of contents}
\else
\newcommand\contentsname{Table of contents}
\fi
\ifdefined\listfigurename
\renewcommand*\listfigurename{List of Figures}
\else
\newcommand\listfigurename{List of Figures}
\fi
\ifdefined\listtablename
\renewcommand*\listtablename{List of Tables}
\else
\newcommand\listtablename{List of Tables}
\fi
\ifdefined\figurename
\renewcommand*\figurename{Figure}
\else
\newcommand\figurename{Figure}
\fi
\ifdefined\tablename
\renewcommand*\tablename{Table}
\else
\newcommand\tablename{Table}
\fi
}
\@ifpackageloaded{float}{}{\usepackage{float}}
\floatstyle{ruled}
\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]}
\floatname{codelisting}{Listing}
\newcommand*\listoflistings{\listof{codelisting}{List of Listings}}
\makeatother
\makeatletter
\makeatother
\makeatletter
\@ifpackageloaded{caption}{}{\usepackage{caption}}
\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}}
\makeatother
\usepackage{bookmark}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same} % disable monospaced font for URLs
\hypersetup{
pdftitle={Modern inference methods for non-probability samples with R},
pdfauthor={Łukasz Chrostowski, Maciej Beręsewicz},
colorlinks=true,
linkcolor={blue},
filecolor={Maroon},
citecolor={Blue},
urlcolor={Blue},
pdfcreator={LaTeX via pandoc}}
\title{Modern inference methods for non-probability samples with R}
\author{Łukasz Chrostowski, Maciej Beręsewicz}
\date{}
\begin{document}
\maketitle
\renewcommand*\contentsname{Table of contents}
{
\hypersetup{linkcolor=}
\setcounter{tocdepth}{2}
\tableofcontents
}
\bookmarksetup{startatroot}
\chapter{Welcome!}\label{welcome}
Welcome to the book on \emph{Modern inference methods for
non-probability samples in R}! In this comprehensive guide, we will
delve into the details of statistical inference, focusing specifically
on the unique challenges and techniques associated with non-probability
samples.
Throughout this course, you will embark on a journey that combines both
theoretical considerations and hands-on practicality. Whether you're an
aspiring statistician, a data scientist, or a researcher in any field,
this material will equip you with the knowledge and tools needed to
navigate the intricacies of non-probability samples and extract
meaningful insights from your data.
Here's a glimpse of what you can expect to know:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
\textbf{Understanding Non-probability Samples}: Gain a deep
understanding of what nonprobability samples are, their
characteristics, and the contexts in which they are commonly used.
\item
\textbf{Challenges and Biases}: Explore the inherent challenges and
biases associated with non-probability samples, including selection
bias, coverage bias, and non-response bias.
\item
\textbf{Statistical Inference Techniques}: Discover specialized
statistical methods designed to address the unique characteristics of
non-probability samples, including propensity score weighting and
imputation techniques.
\item
\textbf{Hands-on R Programming}: Introduction of R \texttt{nonprobsvy}
package for inference with non-probability sample.
\end{enumerate}
Have a great read!
\bookmarksetup{startatroot}
\chapter{Introduction and Overview}\label{introduction-and-overview}
The goal of the nonprobsvy R package is to carry out statistical
inferences with nonprobability survey samples (including big data) when
auxiliary information from external sources like probability samples or
population totals/means are available. It should be noted that there are
several packages that allow for correcting selection bias in
non-probability samples such as GJRM (Marra et al.~2017), NonProbEst
(Rueda et al.~2020) or even sampling (Tillé and Matei 2021). However,
these packages do not implement state-of-the-art approaches recently
proposed in the literature: Chen et al.~(2020), Yang et al.~(2020), Wu
(2022) nor use survey package {[}Lumley 2004{]} for inference.
We implemented propensity score weighting (e.g.~with calibration
constraints), mass imputation (e.g.~nearest neighbor) and doubly robust
estimators that take into account minimization of the asymptotic bias of
the population mean estimators, variable selection or overlap between
random and nonrandom sample. The package uses survey package
functionalities when a probability sample is available. Probability
sampling methods are adopted by official statistics and researchers in
many areas, such as social or health science. Probability samples are
collected under known sampling design and therefore
highly-representative for the target population. On the other hand it is
known that this type of sampling is expensive and subject to high
non-response rates, that increases every year (source here). With
advance new technology and big data sources, nonprobability samples
become more and more popular in statistical inference. They contain rich
information about target population and provide cost-time efficiency in
comparison to probability samples. On the other hand selection mechanism
is not known for nonprobability samples and therefore it is a great
misuse to say that this sample are representative for the target
population.
A popular framework in data integration is to assume that auxiliary
variables on the same population are available for probabiliy samples or
population totals from external sources and therefore one can combine
these information with biased nonprobability sample. In this book we
perform and expand known methods for statistical inference using
described framework for data integration. We can treat data integration
as a missing data problem with following structure
\begin{longtable}[]{@{}
>{\centering\arraybackslash}p{(\linewidth - 8\tabcolsep) * \real{0.1039}}
>{\centering\arraybackslash}p{(\linewidth - 8\tabcolsep) * \real{0.3117}}
>{\centering\arraybackslash}p{(\linewidth - 8\tabcolsep) * \real{0.1818}}
>{\centering\arraybackslash}p{(\linewidth - 8\tabcolsep) * \real{0.1818}}
>{\centering\arraybackslash}p{(\linewidth - 8\tabcolsep) * \real{0.2208}}@{}}
\toprule\noalign{}
\begin{minipage}[b]{\linewidth}\centering
Sample
\end{minipage} & \begin{minipage}[b]{\linewidth}\centering
Type
\end{minipage} & \begin{minipage}[b]{\linewidth}\centering
\(\bX\)
\end{minipage} & \begin{minipage}[b]{\linewidth}\centering
\(Y\)
\end{minipage} & \begin{minipage}[b]{\linewidth}\centering
Representative?
\end{minipage} \\
\midrule\noalign{}
\endhead
\bottomrule\noalign{}
\endlastfoot
\(S_B\) & Probability Sample & \(\checkmark\) & & Yes \\
\(S_A\) & Non-probability Sample & \(\checkmark\) & \(\checkmark\) &
No \\
\end{longtable}
Instead of sample \(S_B\) we can consider vector of population
totals/means, which will be the subject of consideration later in the
book. Under the setting from the table above we are going to develop
statistical methods of inference, that require certain assumptions on
the outcome or selection models, and sampling mechanism for \(S_B\) as
well. Structure of the book is as follow: in the chapters 2, 3 and 4 we
describe recommended methods for the issue presented. In the chapter 5
we propose techniques of variables selection for high-dimensional data,
which can reduce bias of the estimator. In the last chapters, we present
simulation results performed with the help of the package under
development, as well as a summary and consider the methods worthy of
further work.
\bookmarksetup{startatroot}
\chapter{Inverse probability
weighting}\label{inverse-probability-weighting}
\section{Motivation and assumptions}\label{motivation-and-assumptions}
The biggest drawback of the nonprobability sampling is unknown selection
mechanism for a unit to be included in the sample. This is why we talk
about so called ``biased sample'' problem. Inverse probabiliy approach
is based on assumption that reference probabiliy sample (\(S_B\)) is
available and therefore we can estimate propensity score of selection
mechanism.
Let \(\mathcal{U}=\{1,2, \ldots, N\}\) represent the finite population
with N units and
\(\left\{\left(\bx_i, y_i\right), i \in \mathcal{S}_{\mathrm{A}}\right\}\)
and \(\{\left(\bx_i, d_i^B), i \in \mathcal{S}_{\mathrm{B}}\right\}\) be
the datasets from non-probability and probability samples respectively,
where \(D_i^B\) are design weights for probability sample. Let
\(\bY = \left(Y_1, Y_2, \cdots, Y_{n_{A}}\right)^{T}\) and let
\(\bX_A\), \(\bX_B\) denote an \(n \times \left( p+1 \right)\) design
matrices for samples \(S_A\) and \(S_B\) of the form \[
\begin{equation*}
\bX_A =
\begin{bmatrix}
1 & x_{11} & x_{12} & \cdots & x_{1p} \\
1 & x_{21} & x_{22} & \cdots & x_{2p} \\
\vdots & \vdots & \ddots & \vdots \\
1 & x_{n_{A}1} & x_{n_{A}2} & \cdots & x_{n_{A}p} \\
\end{bmatrix}
\end{equation*}
\]\\
\[
\begin{equation*}
\bX_B =
\begin{bmatrix}
1 & x_{11} & x_{12} & \cdots & x_{1p} \\
1 & x_{21} & x_{22} & \cdots & x_{2p} \\
\vdots & \vdots & \ddots & \vdots \\
1 & x_{n_{B}1} & x_{n_{B}2} & \cdots & x_{n_{B}p} \\
\end{bmatrix}
\end{equation*}
\\
\]
Following assumptions are required for this model:
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
The selection indicator \(R_i\) and the response variable \(y_i\) are
independent given the set of covariates \(\bx_i\).
\item
All units have a nonzero propensity score, that is, \(\pi_i^A > 0\)
for all \(i\).
\item
The indicator variables \(R_i^A\) and \(R_j^A\) are independent for
given \(\bx_i\) and \(\bx_j\) for \(i \neq j\).
\end{enumerate}
There are few methods for inclusion probability estimation for \(S_A\).
The first one is based on Maximum Likelihood approach but with
correction for access to a random sample rather than the entire
population. One can also construct calibration equation, so that
estimated propensity weights allow to reproduce the whole population.
Let us to perform technical details of these methods.
\section{Maximum likelihood
estimation}\label{maximum-likelihood-estimation}
Suppose that propensity score can be modelled parametrically as
\(\mathbb{P}\left(R_i=1 \mid \bx_i\right) = \pi(\bx_{i}, \btheta_{0})\).
The maximum likelihood estimator is computed as
\(\hat{\pi}_{i}^{A} = \pi(\bx_{i}, \hat{\btheta}_{0})\), where
\(\hat{\btheta}_{0}\) is the maximizer of the following log-likelihood
function:
\[
\begin{split}
\ell(\boldsymbol{\theta}) & =\sum_{i=1}^N\left\{R_i \log \pi_i^{\mathrm{A}}+\left(1-R_i\right) \log \left(1-\pi_i^{\mathrm{A}}\right)\right\} \\ & =\sum_{i \in \mathcal{S}_{\mathrm{A}}} \log \left\{\frac{\pi\left(\boldsymbol{x}_i, \boldsymbol{\theta}\right)}{1-\pi\left(\boldsymbol{x}_i, \boldsymbol{\theta}\right)}\right\}+\sum_{i=1}^N \log \left\{1-\pi\left(\boldsymbol{x}_i, \boldsymbol{\theta}\right)\right\}
\end{split}
\]
Since we do not observe \(\bx_i\) for all units, Yilin Chen, Pengfei Li
\& Changbao Wu presented following log-likelihood function is subject to
data integration basing on samples \(S_A\) and \(S_B\). They proposed
logistic regression model with
\(\pi(\bx_{i}, \btheta) = \frac{\exp(\bx_{i}^{\top}\btheta)}{\exp(\bx_{i}^{\top}\btheta) + 1}\)
in order to estimate \(\btheta\). We expanded this approach on probit
regression and complementary log-log model. For the sake of accuracy,
let us recall that the probit and cloglog models are based on the
assumption that model takes the form
\(\pi(\bx_{i},\btheta) = \Phi(\bx_{i}^{\top}\btheta)\) and
\(\pi(\bx_{i}, \btheta) = 1 - \exp(-\exp(\bx_{i}^{\top}\btheta))\)
respectively. \begin{equation}\phantomsection\label{eq-xyp}{
\begin{equation} \label{eq-1}
\ell^{*}(\btheta) = \sum_{i \in S_{A}}\log \left\{\frac{\pi(\bx_{i}, \btheta)}{1 - \pi(\bx_{i},\btheta)}\right\} + \sum_{i \in S_{B}}d_{i}^{B}\log\{1 - \pi({\bx_{i},\btheta})\}
\end{equation}
}\end{equation} In order to maximize function from (3.1) equate its
derivative (gradient) to zero. This will give us p+1 nonlinear equations
with respect to \(\btheta\), which will have no explicit solutions. To
solve the given system of equations, the Newton-Raphson algorithm can be
used. This method also requires the calculation of the second derivative
of the log-likelihood function (hessian). By expanding the function
(3.1) into a Taylor series, it can be shown that \(\hat{\btheta}\) can
be found by using the following iterative method: \[
\btheta^{(m)} = \btheta^{(m-1)} - \{H(\btheta^{(m-1)}\}^{-1}U(\btheta^{(m-1})),
\] where \(\operatorname{H}\) - hessian, \(\operatorname{U}\) -
gradient. This will give us a convergent MLE estimator (for
\(m \rightarrow \infty\)).
In the \texttt{nonprobsvy} package, in addition to the Newton-Raphson
method, you can also use the Nelder-Mead and
Broyden-Fletcher-Goldfarb-Shanno methods implemented in the
\texttt{optim} and \texttt{maxLik} functions.
From the chain rule for counting derivatives, we know that \[
\begin{equation*}
\frac{\partial \ell}{\partial \boldsymbol{\theta}}=\frac{\partial \ell}{\partial p} \frac{\partial p}{\partial \boldsymbol{\eta}} \frac{\partial \boldsymbol{\eta}}{\partial \boldsymbol{\theta}}=\frac{\partial \ell}{\partial p} \frac{\partial p}{\partial \boldsymbol{\eta}} \boldsymbol{X}
\end{equation*}
\] where \(\eta=\boldsymbol{X}^{\top} \boldsymbol{\theta}\),
\(\frac{\partial \ell}{\partial \boldsymbol{\theta}}=\boldsymbol{U} \boldsymbol{X}\)
(\(\boldsymbol{U} = \frac{\partial \ell}{\partial {\eta}}\)) and
\(\frac{\partial^2 \ell}{\partial \boldsymbol{\theta} \partial \boldsymbol{\theta}^{\top}}= \boldsymbol{X}^{\top} \boldsymbol{W} \boldsymbol{X}\)
(\(\boldsymbol{W} = \frac{\partial^2 \ell}{\partial {\eta}}\)). Using
this rule In the following subsections we present the full derivation of
the MLE n the following subsections. Calculations include technical
differences depending on the assumed model for the propensity score.
\subsection{Logistic regression}\label{logistic-regression}
Log-likelihood function with logistic regression is given by \[
\ell^{*}(\btheta) = \sum_{i \in S_A}\bx_{i}^{\top}\btheta - \sum_{i \in S_B}d_{i}^{B}\log\{1 + \exp(\bx_{i}^{\top}\btheta)\}
\] with analytical gradient and hessian given by \[
\frac{\partial \ell^*}{\partial\btheta} = \sum_{i \in S_{A}}\bx_{i} - \sum_{i \in S_{B}}d_{i}^{B}\pi(\bx_{i}, \btheta)\bx_{i}
\] and \[
\frac{\partial^{2} \ell^{*}}{\partial\btheta^{T} \partial\btheta} =- \sum_{i \in S_B}d_i^B\pi(\bx_i,\btheta)(1 - \pi(\bx_i,\btheta))\bx_i\bx_i^{\top} = \bX_B^{\top}\operatorname{\bW}_{B}\bX_B,
\] respectively, where \[
\begin{align*}
\operatorname{\bW}_{B} =
diag & \left(-d_1^B\pi(\bx_{1},\btheta)(1 - \pi(\bx_{1},\btheta)), -d_2^B\pi(\bx_{2},\btheta)(1 - \pi(\bx_{2},\btheta)), \right. \\
& \left. \ldots, -d_{n_{B}}^{B}\pi(\bx_{n_{B}},\btheta)(1 - \pi(x_{n_{B}},\btheta))\right).
\end{align*}
\]
\subsection{Complementary log-log
regression}\label{complementary-log-log-regression}
Similarly, log-likelihood function has form of \[
\ell^{*}(\btheta) = \sum_{i \in S_{A}}\left\{\log\{1 - \exp(-\exp(\bx_{i}^{\top}\btheta))\} + \exp(\bx_{i}^{\top}\btheta)\right\} - \sum_{i \in S_{B}} d_{i}^{B}\exp(\bx_{i}^{\top}\btheta)
\] with analytical gradient and hessian equal to \[
\frac{\partial \ell^*}{\partial\btheta} = \sum_{i \in S_{A}}\frac{\exp(\bx_{i}^{\top}\btheta)\bx_{i}}{\pi(\bx_{i}, \btheta)} - \sum_{i \in S_{B}}d_{i}^{B}\exp(\bx_{i}^{T}\btheta)\bx_{i}
\] and \[
\begin{split}
\frac{\partial^{2} \ell^{*}}{\partial\btheta^{T} \partial\btheta} & = \sum_{i \in S_A} \frac{\exp(\bx_{i}^{\top}\btheta)}{\pi(\bx_{i}, \btheta)} \left\{1 - \frac{\exp(\bx_{i}^{\top}\btheta)}{\pi(\bx_{i}, \btheta)} + \exp(\bx_{i}^{\top}\btheta)\right\}\bx_i\bx_i^{\top} - \sum_{i \in S_B}d_i^B\exp (\bx_{i}^{\top}\btheta)\bx_i\bx_i^{\top} \\ & = \bX_A^{\top}\operatorname{\bW}_{Ac}\bX_A - \bX_B^{\top}\operatorname{\bW}_{Bc}\bX_B,
\end{split}
\] respectively, where \[
\begin{align*}
\operatorname{\bW}_{Ac} = Diag & \left(\frac{\exp(\bx_{1}^{\top}\btheta)}{\pi(\bx_{1}, \btheta)} \left\{1 - \frac{\exp(\bx_{1}^{\top}\btheta)}{\pi(\bx_{1}, \btheta)} + \exp(\bx_{1}^{\top}\btheta)\right\}, \right.
\\
& \left. \frac{\exp(\bx_{2}^{\top}\btheta)}{\pi(\bx_{2}, \btheta)} \left\{1 - \frac{\exp(\bx_{2}^{\top}\btheta)}{\pi(\bx_{2}, \btheta)} + \exp(\bx_{2}^{\top}\btheta)\right\}, \right.
\\
& \left. \ldots, \right.
\\
& \left. \frac{\exp(\bx_{n_A}^{\top}\btheta)} {\pi(\bx_{n_A}, \btheta)} \left\{1 - \frac{\exp(\bx_{n_A}^{\top}\btheta)}{\pi(\bx_{n_A}, \btheta)} + \exp(\bx_{n_A}^{\top}\btheta)\right\} \right)
\end{align*}
\] and \[
\begin{align*}
\operatorname{\bW}_{Bc} = Diag \left(d_1^B\exp (\bx_{1}^{\top}\btheta), d_2^B\exp (\bx_{2}^{\top}\btheta), \ldots, d_{n_B}^B\exp (\bx_{n_{B}}^{\top}\btheta)\right).
\end{align*}
\]
\subsection{Probit regression}\label{probit-regression}
For probit model calculations are as follow \[
\begin{align*}
\begin{split}
\ell^{*}(\btheta) & = \sum_{i \in S_{A}}\log\left\{\frac{\Phi(\bx_{i}^{\top}\btheta)}{1 - \Phi(\bx_{i}^{\top}\btheta)}\right\} + \sum_{i \in S_{B}}d_{i}^{B}\log\{1 - \Phi(\bx_{i}^{\top}\btheta)\}
\end{split}
\end{align*}
\] with analytical gradient as \[
\frac{\partial \ell^*}{\partial\btheta} = \sum_{i \in S_A}\frac{\phi(\bx_i^{\top}\btheta)}{\Phi(\bx_i^{\top}\btheta)(1 - \Phi(\bx_i^{\top}\btheta))}\bx_i - \sum_{i \in S_B}d_i^B\frac{\phi(\bx_i^{\top}\btheta)}{1 - \Phi(\bx_i^{\top}\btheta)}\bx_i.
\] and hessian equals to \[
\begin{align*}
\begin{split}
\frac{\partial^{2} \ell^{*}}{\partial\btheta^{T} \partial\btheta} & = \sum_{i \in S_A}\frac{ - \bx_i^{\top} \phi(\bx_i^{\top}\btheta)}{\Phi(\bx_i^{\top}\btheta)(1 - \Phi(\bx_i^{\top}\btheta) )}\bx_i\bx_i^{\top} - \sum_{i \in S_A}\frac{\phi(\bx_i^{\top}\btheta))^{2} \left(1 - 2\Phi(\bx_i^{\top}\btheta))\right)}{\Phi(\bx_i^{\top}\btheta)^{2}(1 - \Phi(\bx_i^{\top}\btheta) )^{2}}\bx_i\bx_i^{\top} \\ & - \sum_{i \in S_B}\frac{\bx_i^{\top}\btheta \phi(\bx_i^{\top}\btheta)}{(1 - \Phi(\bx_i^{\top}\btheta))}\bx_i\bx_i^{\top} - \sum_{i \in S_B} \frac{\phi(\bx_i^{\top}\btheta)^{2}}{\left(1 - \Phi(\bx_i^{\top}\btheta) \right)} \\ &= \bX_A^{\top}\operatorname{\bW}_{Ap}\bX_A - \bX_B^{\top}\operatorname{\bW}_{Bp}\bX_B
\end{split}
\end{align*}
\] where \[
\begin{align}
\operatorname{\bW}_{Ap} = Diag & \left(\frac{ - \bx_1^{\top} \phi(\bx_1^{\top}\btheta)}{\Phi(\bx_1^{\top}\btheta)(1 - \Phi(\bx_1^{\top}\btheta) )}\bx_1\bx_1^{\top} - \frac{\phi(\bx_1^{\top}\btheta))^{2} \left(1 - 2\Phi(\bx_1^{\top}\btheta))\right)}{\Phi(\bx_1^{\top}\btheta)^{2}(1 - \Phi(\bx_1^{\top}\btheta) )^{2}}\bx_1\bx_1^{\top} \right.,
\\
& \left. \frac{ - \bx_2^{\top} \phi(\bx_2^{\top}\btheta)}{\Phi(\bx_2^{\top}\btheta)(1 - \Phi(\bx_2^{\top}\btheta) )}\bx_2\bx_2^{\top} - \frac{\phi(\bx_2^{\top}\btheta))^{2} \left(1 - 2\Phi(\bx_2^{\top}\btheta))\right)}{\Phi(\bx_2^{\top}\btheta)^{2}(1 - \Phi(\bx_2^{\top}\btheta) )^{2}}\bx_2\bx_2^{\top}, \right.
\\
& \left. \ldots, \right.
\\
& \left. \frac{ - \bx_{n_A}^{\top} \phi(\bx_{n_A}^{\top}\btheta)}{\Phi(\bx_{n_A}^{\top}\btheta)(1 - \Phi(\bx_{n_A}^{\top}\btheta) )}\bx_{n_A}\bx_{n_A}^{\top} - \frac{\phi(\bx_{n_A}^{\top}\btheta))^{2} \left(1 - 2\Phi(\bx_{n_A}^{\top}\btheta))\right)}{\Phi(\bx_{n_A}^{\top}\btheta)^{2}(1 - \Phi(\bx_{n_A}^{\top}\btheta) )^{2}}\bx_{n_A}\bx_{n_A}^{\top}\right)
\end{align}
\] and \[
\begin{align}
\operatorname{\bW}_{Bp} = Diag & \left(\frac{\bx_1^{\top}\btheta \phi(\bx_1^{\top}\btheta)}{(1 - \Phi(\bx_1^{\top}\btheta))}\bx_1\bx_1^{\top} - \frac{\phi(\bx_1^{\top}\btheta)^{2}}{\left(1 - \Phi(\bx_1^{\top}\btheta) \right)}, \right.
\\
&
\left. \frac{\bx_2^{\top}\btheta \phi(\bx_2^{\top}\btheta)}{(1 - \Phi(\bx_2^{\top}\btheta))}\bx_2\bx_2^{\top} - \frac{\phi(\bx_2^{\top}\btheta)^{2}}{\left(1 - \Phi(\bx_2^{\top}\btheta) \right)}, \right.
\\
& \left. \ldots, \right.
\\
& \left. \frac{\bx_{N_B}^{\top}\btheta \phi(\bx_{N_B}^{\top}\btheta)}{(1 - \Phi(\bx_{N_B}^{\top}\btheta))}\bx_{N_B}\bx_{N_B}^{\top} - \frac{\phi(\bx_{N_B}^{\top}\btheta)^{2}}{\left(1 - \Phi(\bx_{N_B}^{\top}\btheta) \right)}\right)
\end{align}
\]
\section{General estimating
equations}\label{general-estimating-equations}
The pseudo score equations derived from Maximum Likelihood Estimation
methods may be replaced by a system of general estimating equations. Let
\(\operatorname{h}\left(\bx\right)\) be the smooth function and
\begin{equation}\phantomsection\label{eq-xyp}{
\begin{equation}
\mathbf{U}(\btheta)=\sum_{i \in S_A} \mathbf{h}\left(\mathbf{x}_i, \btheta\right)-\sum_{i \in S_B} d_i^B \pi\left(\mathbf{x}_i, \btheta\right) \mathbf{h}\left(\mathbf{x}_i, \btheta\right).
\end{equation}
}\end{equation} Under \(\operatorname{h}\left(\bx_i\right) = \bx_i\) and
logistic model for propensity score, Equation (3.2) looks like distorted
version of the score equation from MLE method. Then \[
\mathbf{U}(\btheta)=\sum_{i \in S_A} \bx_i -\sum_{i \in S_B} d_i^B \pi\left(\mathbf{x}_i, \btheta\right) \bx_i.
\] and analytical Jacobian is given by \[
\frac{\partial \mathbf{U}}{\partial\btheta} = - \sum_{i \in S_B} d_i^B \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right) \left(1 - \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)\right)\bx_i \bx_i^{\mathrm{T}}.
\] The second proposed of the smooth function in the literature is
\(\operatorname{h}\left(\bx_i\right) = \bx_i / \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)\),
for which the \(\operatorname{U}\)-function takes the following form \[
\mathbf{U}(\btheta)=\sum_{i \in S_A} \bx_i \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)^{-1} -\sum_{i \in S_B} d_i^B \bx_i.
\] The most important difference between these two version, however, is
the fact that for
\(\operatorname{h}\left(\bx_i\right) = \bx_i / \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)\),
\(\mathbf{U}(\btheta)\) requires only the accessed or estimated
population totals for auxiliary variables \(\bx\). This approach can be
particularly useful when the values of \(\bx\) at the unit for a
probability sample are not available. Generally, the goal is to find
solution for following system of equations \[
\begin{equation*}
\sum_{i \in S_A} \mathbf{h}\left(\mathbf{x}_i, \btheta\right) = \sum_{i \in S_B} d_i^B \pi\left(\mathbf{x}_i, \btheta\right) \mathbf{h}\left(\mathbf{x}_i, \btheta\right)
\end{equation*}
\]
Derived \(\hat{\btheta}\) estimated from this model can be less
efficient than the one based on MLE approach, moreover, limited
empirical results show that the solution of
\(\mathbf{U}(\btheta) = \bZero\) can be unstable for given
\(\operatorname{h}\left(\bx_i\right)\). On the other hand estimating
equations based methods extend the propensity model to more restrictive
estimation conditions, for example, when a vector of population
totals/means is available instead of a sample \(S_B\).
In total, we have six models for this estimation method depending on the
\(\operatorname{h}\)-function and the way propensity score is
parameterized. Let us present all of them.
\subsection{Logistic regression}\label{logistic-regression-1}
As the one model for logistic regression is presented above, we have
equation under
\(\operatorname{h}\left(\bx_i\right) = \bx_i \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)^{-1}\)
to consider. Analytical jacobian is given by \[
\frac{\partial \operatorname{U}(\btheta)}{\partial \btheta} = -\sum_{i \in S_A} \frac{1 - \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)}{\pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)} \bx_i \bx_i^{\mathrm{T}}.
\]
\subsection{Complementary log-log
regression}\label{complementary-log-log-regression-1}
For
\(\operatorname{h}\left(\bx_i\right) = \bx_i \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)^{-1}\)
analytical jacobian is given by \[
\frac{\partial \operatorname{U}(\btheta)}{\partial \btheta} = - \sum_{i \in S_A} \frac{1 - \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)}{\pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)^2} \exp(\bx_i^{\mathrm{T}} \btheta) \bx_i \bx_i^{\mathrm{T}}
\] and \(\operatorname{h}\left(\bx_i\right) = \bx_i\) we have \[
\frac{\partial \operatorname{U}(\btheta)}{\partial \btheta} = - \sum_{i \in S_B} \frac{1 - \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)}{\pi_i^B} \exp \left(\bx_i^\mathrm{T} \btheta\right) \bx_i \bx_i^{\mathrm{T}}.
\]
\subsection{Probit regression}\label{probit-regression-1}
Similarly, for the probit model, under
\(\operatorname{h}\left(\bx_i\right) = \bx_i \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)^{-1}\)
analyical jacobian is given by \[
\frac{\partial \operatorname{U}(\btheta)}{\partial \btheta} = - \sum_{i \in S_A} \frac{\dot{\pi}_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)}{\pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)^2} \bx_i \bx_i^{\mathrm{T}}
\] and under \(\operatorname{h}\left(\bx_i\right) = \bx_i\) we have
\[
\frac{\partial \operatorname{U}(\partial \btheta)}{\btheta} = - \sum_{i \in S_B} \frac{\dot{\pi}_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)}{\pi_i^B} \bx_i \bx_i^{\mathrm{T}}.
\]
\section{Population mean estimator and its
properties}\label{population-mean-estimator-and-its-properties}
With the estimated propensity scores we can consider two approaches for
population mean estimation, depending on whether population size is
known or not.
\[
\begin{equation*}
\hat{\mu}_{IPW1} = \frac{1}{N} \sum_{i \in S_A} \frac{y_i}{\hat{\pi}_i^{A}}
\end{equation*}
\]
\[
\begin{equation*}
\hat{\mu}_{IPW2} = \frac{1}{\hat{N}^{A}} \sum_{i \in S_A} \frac{y_i}{\hat{\pi}_i^{A}},
\end{equation*}
\] where \(\hat{N^A} = \sum_{i \in S_A} \hat{d}_i^A\).
In the literature (Kim et al 2020) asymptotic properties of the
estimators above are obtained in details. In particular main approach is
based on Taylor approximation what is performed in the following
subsection.
\subsection{Variance of an estimator}\label{variance-of-an-estimator}
Let \(\boldsymbol{\eta} = \left(\mu, \btheta^{T}\right)^{T}\) be the set
of parameters to estimate for inverse probability weighting model. The
estimator
\(\hat{\boldsymbol{\eta}} = \left(\hat{\mu}, \hat{\btheta}^{T}\right)^{T}\)
is the solution of joint estimating equations
\(\boldsymbol{\Phi}_n(\boldsymbol{\eta}) = \bZero\). \[
\begin{equation}
\boldsymbol{\Phi}_n(\boldsymbol{\eta})=\left(\begin{array}{c}
\frac{1}{N} \sum_{i=1}^N\left[\frac{R_i\left(y_i-\mu\right)}{\pi_i^A}+\Delta \frac{R_i-\pi_i^A}{\pi_i^A}\right] \\
\mathbf{U}(\btheta)
\end{array}\right)=\bZero,
\end{equation}
\] where where \(\Delta = \mu\), if \(\hat{\mu} = \hat{\mu}_{IPW1}\) and
\(\Delta = 0\) if \(\hat{\mu} = \hat{\mu}_{IPW2}\).
\(\mathbf{U}(\btheta)\) is objective function corresponding to given way
od estimation. For example in case od pseudo maximum likelihood
estimation, we have gradient corresponding to the choosen link function.
In case of GEE it will be on of considered estimating equations. We have
\(\mathbb{E} \left\{\boldsymbol{\Phi}_n(\boldsymbol{\eta})\right\} = \bZero\)
when
\(\boldsymbol{\eta} = \boldsymbol{\eta}_{0} = \left(\mu_y, \btheta_0^{T}\right)^{T}\).
By applying the first order Taylor expansion around
\(\boldsymbol{\eta}_0\), we further have \[
\begin{equation*}
\hat{\boldsymbol{\eta}}-\boldsymbol{\eta}_0=\left[\boldsymbol{\phi}_n\left(\boldsymbol{\eta}_0\right)\right]^{-1} \boldsymbol{\Phi}_n\left(\boldsymbol{\eta}_0\right)+o_p\left(n_A^{-1 / 2}\right)=\left[E\left\{\boldsymbol{\phi}_n\left(\boldsymbol{\eta}_0\right)\right\}\right]^{-1} \boldsymbol{\Phi}_n\left(\boldsymbol{\eta}_0\right)+o_p\left(n_A^{-1 / 2}\right),
\end{equation*}
\] where
\(\boldsymbol{\phi}_n(\boldsymbol{\eta})=\partial \boldsymbol{\Phi}_n(\boldsymbol{\eta}) / \partial \boldsymbol{\eta}\).
It follows that \[
\begin{equation}
\operatorname{Var}(\hat{\boldsymbol{\eta}})=\left[E\left\{\boldsymbol{\phi}_n\left(\boldsymbol{\eta}_0\right)\right\}\right]^{-1} \operatorname{Var}\left\{\boldsymbol{\Phi}_n\left(\boldsymbol{\eta}_0\right)\right\}\left[E\left\{\boldsymbol{\phi}_n\left(\boldsymbol{\eta}_0\right)\right\}^{\top}\right]^{-1}+o\left(n_A^{-1}\right).
\end{equation}
\] Let us show how to derive this variance-covariance matrix in case of
MLE with logistic regression model. Calculations for the rest of the
models is available in Appendix and you are welcome to take a look at
them. Thus, we have \[
\boldsymbol{\Phi}_n(\boldsymbol{\eta})=\left(\begin{array}{c}
\frac{1}{N} \sum_{i=1}^N\left[\frac{R_i\left(y_i-\mu\right)}{\pi_i^A}+\Delta \frac{R_i-\pi_i^A}{\pi_i^A}\right] \\
\frac{1}{N} \sum_{i=1}^N R_i \boldsymbol{x}_i-\frac{1}{N} \sum_{i \in \mathcal{S}_B} d_i^B \pi_i^A \boldsymbol{x}_i
\end{array}\right)
\] and
\[
\phi_n(\boldsymbol{\eta})=\frac{1}{N}\left(\begin{array}{cc}
-\sum_{i=1}^N\left\{\left(1-\frac{\Delta}{\mu}\right) \frac{R_i}{\pi_i^A}+\frac{\Delta}{\mu}\right\} & -\sum_{i=1}^N \frac{1-\pi_i^A}{\pi_i^A} R_i\left(y_i-\mu+\Delta\right) \boldsymbol{x}_i^{\top} \\
\mathbf{0} & -\sum_{i \in \mathcal{S}_B} d_i^B \pi_i^A\left(1-\pi_i^A\right) \boldsymbol{x}_i \boldsymbol{x}_i^{\top}
\end{array}\right)
\] It can be shown that \[
\left[E\left\{\boldsymbol{\phi}_n(\boldsymbol{\eta})\right\}\right]^{-1}=\left(\begin{array}{cc}
-1 & \mathbf{b}^{\top} \\
\mathbf{0} & -\left[\frac{1}{N} \sum_{i=1}^N \pi_i^A\left(1-\pi_i^A\right) \boldsymbol{x}_i \boldsymbol{x}_i^{\top}\right]^{-1}
\end{array}\right)
\] where
\[
\mathbf{b}^{\top} =
\left\{N^{-1} \sum_{i=1}^N\left(1-\pi_i^{\mathrm{A}}\right) \left(y_i-\mu_y + \Delta\right) x_i^{\top}\right\}\left\{N^{-1} \sum_{i=1}^N \pi_i^{\mathrm{A}}\left(1-\pi_i^{\mathrm{A}}\right) \boldsymbol{x}_i x_i^{\top}\right\}^{-1}
\]
\(\operatorname{Var}\left\{\boldsymbol{\Phi}_n\left(\boldsymbol{\eta}_0\right)\right\}\)
can be found using decomposition of
\(\bPhi_n(\boldsymbol{\eta}) = \bA_1 + \bA_2\). Since the probability
sample is assumed to be independent on non-probabillity sample, we have
\(\operatorname{Var}\left\{\boldsymbol{\Phi}_n\left(\boldsymbol{\eta}_0\right)\right\} = \operatorname{Var}\left(\bA_1\right) + \operatorname{Var}\left(\bA_2\right)\).
Let \[
\mathbf{A}_1=\frac{1}{N} \sum_{i=1}^N\left(\begin{array}{c}
\frac{R_i\left(y_i-\mu\right)}{\pi_i^A}+\Delta \frac{R_i-\pi_i^A}{\pi_i^A} \\
R_i \boldsymbol{x}_i-\pi_i^A \boldsymbol{x}_i
\end{array}\right), \quad \mathbf{A}_2=\frac{1}{N}\left(\begin{array}{c}
0 \\
\sum_{i=1}^N \pi_i^A \boldsymbol{x}_i-\sum_{i \in S_B} d_i^B \pi_i^A \boldsymbol{x}_i
\end{array}\right)
\]
With this division, we have
\(\operatorname{Var}\left\{\boldsymbol{\Phi}_n\left(\boldsymbol{\eta}_0\right)\right\}=\mathbf{V}_1+\mathbf{V}_2\)
where \(\mathbf{V}_1 = Var \left(A_1\right)\) and
\(\mathbf{V}_2 = Var \left(A_2\right)\). \(V_1\) depends only on the
model for propensity score and \(V_2\) on sampling design for
probability sample, both evaluated on
\(\boldsymbol{\eta} = \boldsymbol{\eta}_0\). Finally we have \[
\mathbf{V}_1=\frac{1}{N^2} \sum_{i=1}^N\left(\begin{array}{cc}
\left\{\left(1-\pi_i^A\right) / \pi_i^A\right\}\left(y_i-\mu+\Delta\right)^2 & \left(1-\pi_i^A\right)\left(y_i-\mu+\Delta\right) \boldsymbol{x}_i^{\top} \\
\left(1-\pi_i^A\right)\left(y_i-\mu+\Delta\right) \boldsymbol{x}_i & \pi_i^A\left(1-\pi_i^A\right) \boldsymbol{x}_i \boldsymbol{x}_i^{\top}
\end{array}\right)
\] and \[
\mathbf{V}_2=\left(\begin{array}{ll}
0 & \mathbf{0}^{\top} \\
\mathbf{0} & \mathbf{D}
\end{array}\right)
\] where
\(\mathbf{D}=N^{-2} V_p\left(\sum_{i \in \mathcal{S}_B} d_i^B \pi_i^A \boldsymbol{x}_i\right)\)
and is given by \[
\begin{equation}
{\mathbf{D}}=\frac{1}{N^2} \sum_{i \in \mathcal{S}_{\mathrm{B}}} \sum_{j \in \mathcal{S}_{\mathrm{B}}} \frac{\pi_{i j}^{\mathrm{B}}-\pi_i^{\mathrm{B}} \pi_j^{\mathrm{B}}}{\pi_{i j}^{\mathrm{B}}} \frac{{\pi}_i^{\mathrm{A}}}{\pi_i^{\mathrm{B}}} \frac{{\pi}_j^{\mathrm{A}}}{\pi_j^{\mathrm{B}}} \boldsymbol{x}_i \boldsymbol{x}_j^{\top}
\end{equation}
\] The asymptotic variance for \(\mu_{IPW}\) is the first diagonal
element of matrix \[
\left[E\left\{\boldsymbol{\phi}_n\left(\boldsymbol{\eta}_0\right)\right\}\right]^{-1} \operatorname{Var}\left\{\boldsymbol{\Phi}_n\left(\boldsymbol{\eta}_0\right)\right\}\left[E\left\{\boldsymbol{\phi}_n\left(\boldsymbol{\eta}_0\right)\right\}^{\top}\right]^{-1}.
\]
\bookmarksetup{startatroot}
\chapter{}\label{section}
\[
\newcommand{\bSigma}{\boldsymbol{\Sigma}}
\newcommand{\bOmega}{\boldsymbol{\Omega}}
\newcommand{\bTheta}{\boldsymbol{\Theta}}
\newcommand{\bPi}{\boldsymbol{\Pi}}
\newcommand{\bbeta}{\boldsymbol{\beta}}
\newcommand{\balpha}{\boldsymbol{\alpha}}
\newcommand{\brho}{\boldsymbol{\rho}}
\newcommand{\beps}{\boldsymbol{\epsilon}}
\newcommand{\blambda}{\boldsymbol{\lambda}}
\newcommand{\bgamma}{\boldsymbol{\gamma}}
\newcommand{\btheta}{\boldsymbol{\theta}}
\newcommand{\bmu}{\boldsymbol{\mu}}
\newcommand{\bpi}{\boldsymbol{\pi}}
\newcommand{\bphi}{\boldsymbol{\phi}}
\newcommand{\bPhi}{\boldsymbol{\Phi}}
\newcommand{\boldeta}{\boldsymbol{\eta}}
\newcommand{\bx}{\boldsymbol{x}}
\newcommand{\bD}{\boldsymbol{D}}
\newcommand{\bV}{\boldsymbol{V}}
\newcommand{\bv}{\boldsymbol{v}}
\newcommand{\bY}{\boldsymbol{Y}}
\newcommand{\bA}{\boldsymbol{A}}
\newcommand{\bB}{\boldsymbol{B}}
\newcommand{\bR}{\boldsymbol{R}}
\newcommand{\bM}{\boldsymbol{M}}
\newcommand{\bI}{\boldsymbol{I}}
\newcommand{\bC}{\boldsymbol{C}}
\newcommand{\bW}{\boldsymbol{W}}
\newcommand{\bw}{\boldsymbol{w}}
\newcommand{\bd}{\boldsymbol{d}}
\newcommand{\bT}{\boldsymbol{T}}
\newcommand{\bt}{\boldsymbol{t}}
\newcommand{\bZ}{\boldsymbol{Z}}
\newcommand{\bX}{\boldsymbol{X}}
\newcommand{\bz}{\boldsymbol{z}}
\newcommand{\by}{\boldsymbol{y}}
\newcommand{\br}{\boldsymbol{r}}
\newcommand{\bp}{\boldsymbol{p}}
\newcommand{\bb}{\boldsymbol{b}}
\newcommand{\bZero}{\boldsymbol{0}}
\newcommand{\bOne}{\boldsymbol{1}}
\]
\bookmarksetup{startatroot}
\chapter{Mass imputation}\label{mass-imputation}
\section{Motivation and assumptions}\label{motivation-and-assumptions-1}
This method relies on framework, where imputed values of the outcome
variables are created for whole probability sample (\(S_B\)). In this
case we treat big-data sample (\(S_A\)) as a training dataset, which is
used to build an imputation model. The mass imputation approach for
inference with non-probability samples makes use of model-based
prediction methods, but it opens the door for more flexible methods as
well. We consider parametric (e.g.~regression models) and non-parametric
(nearest neighbor algorithm) methods for this problem. General framework
consists of building a model based on the \(S_A\) sample and for each
\(i \in S_B\) calculate imputed value.
\section{Model-based methods}\label{model-based-methods}
This method is based on parametric model on sample \(S_A\) in the form
of
\[
\begin{equation}
\mathbb{E}\left(y_i \mid \bx_i\right) = m\left(\bx_i, \bbeta_{0}\right)
\end{equation}
\]
for some unknown \(\bbeta_{0}\) and known function \(m(\cdot)\). The
specification of m-function typically follows the mean function for
generalized linear models. If \(\by\) is continous, we can use linear
regression model with
\(m\left(\boldsymbol{x}_i, \bbeta_{0}\right) = \bx_i^{T} \bbeta_0\). If
\(\by\) is binary, one can use logistic regression model and let
\(m\left(\boldsymbol{x}_i, \bbeta_{0}\right) = \frac{\exp\left( \bx_i^{T} \bbeta_0\right)}{\exp\left( \bx_i^{T} \bbeta_0\right) + 1}\).
If \(\by\) represents count data, we can use log-linear model, where
\(m\left(\boldsymbol{x}_i, \bbeta_{0}\right) = \exp\left(\bx_i^{T} \bbeta_0\right)\).
Basing on this approach we can obtain another approach for population
mean estimator. It is worth noting that this time we rely on known
design weights and imputation model for units from probability samples.
\[
\begin{equation}
\frac{1}{\hat{N}^{\mathrm{B}}} \sum_{i \in \mathcal{S}_{\mathrm{B}}} d_i^{\mathrm{B}} m\left(\boldsymbol{x}_i, \hat{\bbeta}\right)
\end{equation}
\] Theoretical calculations lead to the following variance of the
estimator, where the second part is variance of the widely-known
Horvits-Thompson population mean estimator, which is implemented in the
R \texttt{survey} package.
\[
\text{var}\left(\hat{\mu}_{MI}\right) = \text{var}_A + \text{var}_B
\] The \(\text{var}_A\) can be estimated by \[
\text{var}_A = \frac{1}{n_A} \sum_{i \in S_A} \hat{e}_i^2 \left(\bx_i^{T} \hat{c}\right)^2,
\] where
\(\hat{e_i} = y_i - m\left(\boldsymbol{x}_i, \hat{\bbeta}\right)\) and
\(\hat{c} = \left\{\frac{1}{n_A} \sum_{i \in S_A} \dot{m}\left(\boldsymbol{x}_i, \hat{\bbeta}\right) \bx_i^T \right\}^{-1} N^{-1} \sum_{i \in S_B} d_i^B \bx_i\).
Respectively \(\text{var}_B\) can be estimated by \[
\hat{\text{var}}_B = \frac{1}{N^2} \sum_{i \in \mathcal{S}_{\mathrm{B}}} \sum_{j \in \mathcal{S}_{\mathrm{B}}} \frac{\pi_{i j}^{\mathrm{B}}-\pi_i^{\mathrm{B}} \pi_j^{\mathrm{B}}}{\pi_{i j}^{\mathrm{B}}} d_i^B m\left(\boldsymbol{x}_i, \hat{\bbeta}\right) d_j^B m\left(\boldsymbol{x}_j, \hat{\bbeta}\right)
\]
\section{Nearest neighbor imputation}\label{nearest-neighbor-imputation}
On the other hand we can applied non-parametric method to this problem,
such as nearest neighbor algorithm, that is, find the closest matching
unit from sample \(S_B\) based on the \(\bx\) values and use the
corresponding \(\by\) value from this unit as the imputed value.
\subsection{Assumptions}\label{assumptions}
\subsection{Model}\label{model}
Procedure contains two steps
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
for each \(i \in S_B\) find the nearest neighbor from sample \(S_A\).
\item
Calculate the nearest neighbor imputation estimator of \(\mu_y\) \[
\begin{equation}
\hat{\mu}_\mathrm{nn}=\frac{1}{N} \sum_{i \in S_B} d_i^B y_{i(1)} .
\end{equation}
\]
\end{enumerate}
This methods can provide robust results, but suffers from so called
curse of dimensionanlity. For \(p > 1\) asymptotic bias of the estimator
is not negligible (Yang and Kim, 2020). Variance of an estimator
We have \[
V_{\mathrm{nni}}=\lim _{n \rightarrow \infty} \frac{n}{N^2} E\left[\operatorname{var}_p\left\{\sum_{i \in S_B} d_i^B g\left(y_i\right)\right\}\right] .
\]
which can be estimated by \[
\hat{\text{var}}_{\mathrm{nni}}=\frac{n}{N^2} \sum_{i \in S_A} \sum_{j \in S_A} \frac{\pi_{i j}-\pi_i \pi_j}{\pi_i \pi_j} \frac{y_{i(1)}}{\pi_i} \frac{y_{j(1)}}{\pi_j}
\]
\section{K-nearest neighbor
imputation}\label{k-nearest-neighbor-imputation}
Steps
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
For each unit \(i \in S_B\) find k-nearest neighbors from sample
\(S_A\). Impute the \(\by\) value for unit \(i\) by
\(\hat{\mu}\left(\mathbf{x}_i\right)=k^{-1} \sum_{j=1}^k y_{i(j)}\).
\item
Calculate k-nearest neighbor imputation estimator of \(\mu_y\) \[
\hat{\mu}_{\mathrm{knn}}=\frac{1}{N} \sum_{i \in S_B} d_i^B \hat{\mu}\left(\mathbf{x}_i\right) .
\]
\end{enumerate}
Variance of an estimator
We have
\[
\text{var}_{\mathrm{knn}}=\lim _{n \rightarrow \infty} \frac{n}{N^2}\left(E\left[\operatorname{var}_p\left\{\sum_{i \in S_B} d_i^B \mu\left(\bx_i\right)\right\}\right]+E\left\{\frac{1-\pi_A(\bx)}{\pi_A(\bx)} \sigma^2(\bx)\right\}\right),
\] where \(\sigma^2(\bx)=\operatorname{var}\{y \mid \bx\}\) and
\(\pi_A(\bx) = P\left(R_i=1 \mid \boldsymbol{x}\right)\)
\bookmarksetup{startatroot}
\chapter{Doubly robust methods}\label{doubly-robust-methods}
The IPW and MI estimators are sensible on misspecified models for
propensity score and outcome variable respectively. For this purpose so
called doubly-robust methoods, which take into account these problems,
are presented. It is quite simple idea of combination propensity score
and imputation models during inference, but in the first part of this
chapter we present model which is based directly on the DR estimator.
\section{Bias minimization technique}\label{bias-minimization-technique}
This model is derived from the form of the bias of doubly robust
estimator. We consider set of estimating equations, for which we want to
find regression parameters (\(\btheta, \bbeta\)). Shu Yang, Jae Kwang
Kim and Rui Song proposed this method with logistic regression for
selection model. As before our goal is to expand this approach. At the
beginning let us derive bias of the estimator. We have
\[
\begin{aligned}
bias(\hat{\mu}_{DR}) = & \mathbb{E}\left\{\hat{\mu}_{DR} - \mu\right\} \\ = & \mathbb{E}\left[ \frac{1}{N} \sum_{i=1}^N \left\{\frac{R_i^A}{\pi_i^A \left(\bx_i^{\mathrm{T}} \btheta \right)} - 1\right\} \left\{y_i - \operatorname{m}\left( \bx_i^{\mathrm{T}} \bbeta\right)\right\} \right] \\ + & \mathbb{E}\left[ \frac{1}{N} \sum_{i=1}^N \left(R_i^B d_i^B - 1\right) \operatorname{m}\left( \bx_i^{\mathrm{T}} \bbeta \right)\right]
\end{aligned}
\] Since we actually care about minimizing the square of the bias, let's
calculate its derivative against the parameter vector. \[
\begin{aligned}
\frac{\partial \operatorname{bias}(\hat{\mu}_{DR})^2}{\partial \left(\bbeta^{\mathrm{T}}, \btheta^{\mathrm{T}}\right)^{\mathrm{T}}} = 2 \operatorname{bias}(\hat{\mu}_{DR}) J(\theta, \beta),
\end{aligned}
\] where \(J(\theta, \beta)\) is internal derivative and depends on the
model for outcome variable and propensity score. In the basic setting
with propensity score modelling by logistic regression we have following
system of equations to solve \[
\begin{equation}
\begin{aligned}
J(\theta, \beta)=\left(\begin{array}{c}
J_1(\theta, \beta) \\
J_2(\theta, \beta)
\end{array}\right)=\left(\begin{array}{c}
\sum_{i=1}^N R_i^A\left\{\frac{1}{\pi\left(\boldsymbol{x}_i, \boldsymbol{\theta}\right)}-1\right\}\left\{y_i-m\left(\boldsymbol{x}_i, \boldsymbol{\beta}\right)\right\} \boldsymbol{x}_i \\
\sum_{i=1}^N \frac{R_i^A}{\pi\left(\boldsymbol{x}_i, \boldsymbol{\theta}\right)} \frac{\partial m\left(\boldsymbol{x}_i, \boldsymbol{\beta}\right)}{\partial \bbeta} - \sum_{i \in \mathcal{S}_{\mathrm{B}}} d_i^{\mathrm{B}} \frac{\partial m\left(\boldsymbol{x}_i, \boldsymbol{\beta}\right)}{\partial \bbeta}
\end{array}\right)
\end{aligned}
\end{equation}
\] where \(m\left(\boldsymbol{x}_i, \boldsymbol{\beta}\right)\) is
working model for outcome variable, for example in linear regression
case we have \[
m\left(\boldsymbol{x}_i, \boldsymbol{\beta}\right) = \bx_i^{T} \bbeta
\] and \[
\frac{\partial m\left(\boldsymbol{x}_i, \boldsymbol{\beta}\right)}{\partial \bbeta} = \bx_i.
\] For complementary log-log model we have \[
\begin{equation}
J(\theta, \beta)=\left(\begin{array}{c}
J_1(\theta, \beta) \\
J_2(\theta, \beta)
\end{array}\right)=\left(\begin{array}{c}
\frac{1}{N} \sum_{i=1}^N R_i^A\left\{\frac{1 - \pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)}{\pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)^2} \exp(\bx_i^{\mathrm{T}} \btheta)\right\}\left\{y_i-m\left(\bx_i^{\mathrm{T}} \beta\right)\right\} \bx_i \\
\frac{1}{N} \sum_{i=1}^N\left\{\frac{R_i^A}{\pi_i^A\left(\bx^{\mathrm{T}}\theta\right)}-d_i^B R_i^B\right\} \frac{\partial m\left(\bx_i^{\mathrm{T}} \beta\right)}{\partial \beta}
\end{array}\right)
\end{equation}
\] and probit model
\[
\begin{equation}
J(\theta, \beta)=\left(\begin{array}{c}
J_1(\theta, \beta) \\
J_2(\theta, \beta)
\end{array}\right)=\left(\begin{array}{c}
\frac{1}{N} \sum_{i=1}^N R_i^A\frac{\dot{\pi_i^A}\left(\bx_i^{\mathrm{T}} \btheta \right)}{\pi_i^A\left(\bx_i^{\mathrm{T}} \btheta \right)^2} \left\{y_i-m\left(\bx_i^{\mathrm{T}} \beta\right)\right\} \bx_i \\
\frac{1}{N} \sum_{i=1}^N\left\{\frac{R_i^A}{\pi_i^A\left(\bx^{\mathrm{T}}\theta\right)}-d_i^B R_i^B\right\} \frac{\partial m\left(\bx_i^{\mathrm{T}} \beta\right)}{\partial \beta}
\end{array}\right)
\end{equation}
\]
Goal is to solve following system of equations \[
J(\theta, \beta)=\bZero
\]
\section{Population mean estimator and its
properties}\label{population-mean-estimator-and-its-properties-1}