-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathsrs_diff_est.Rd
More file actions
49 lines (46 loc) · 1.82 KB
/
srs_diff_est.Rd
File metadata and controls
49 lines (46 loc) · 1.82 KB
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loo_subsample.R
\name{srs_diff_est}
\alias{srs_diff_est}
\title{Difference estimator with simple random sampling without replacement.}
\usage{
srs_diff_est(y_approx, y, y_idx)
}
\arguments{
\item{y_approx}{(numeric) \code{n} approximated values.}
\item{y}{(numeric) \code{m<n} subsampled values.}
\item{y_idx}{(integerish) The index of \code{y} in \code{y_approx}.}
}
\value{
A named list containing numeric values:
\itemize{
\item \code{y_hat}: estimated mean of \eqn{y} (Eq 7),
\item \code{v_y_hat}: variance of the mean estimate (Eq 8), and
\item \code{hat_v_y}: estimated variance of \eqn{y} (Eq 9).
}
}
\description{
The difference estimator \code{srs_diff()} estimates
the expectation \eqn{n E[y]} when we have \eqn{n} approximate values \eqn{\tilde{y}_i},
\eqn{i = 1, \ldots, n} and \eqn{m < n} accurate values \eqn{y_j}, \eqn{j \in \mathcal{S}},
where \eqn{m} is the subsample size and \eqn{\mathcal{S}} is
a simple random subsample without replacement. The original
approach is by Cochran (1977) and we follow the equations 7--9 by
Magnusson et al. (2020).
}
\details{
In Magnusson et al. (2020) Eq (9) first row, the second \code{+} should
be a \code{-}; Supplementary Material Eq (6) has this correct.
As \code{srs_diff_est()} in the \code{loo} package is used for \eqn{n E[y]}, there is
a proportional difference of \eqn{1/n} compared to the paper.
}
\references{
Magnusson, M., Riis Andersen, M., Jonasson, J. and Vehtari, A. (2020).
Leave-One-Out Cross-Validation for Model Comparison in Large Data.
In \emph{Proceedings of the 23rd International Conference on Artificial
Intelligence and Statistics (AISTATS)}, PMLR 108:341-351.
Cochran, W. G. (1977). \emph{Sampling Techniques, 3rd Edition}. John Wiley.
}
\seealso{
\code{\link[=loo_subsample]{loo_subsample()}}
}