Skip to content

Commit 3385e72

Browse files
committed
minor
1 parent 4999802 commit 3385e72

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

R/gmwmx2_new.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ gmwmx2_new_no_missing <- function(X = NULL, y = NULL, model = NULL, omega = NULL
123123
return(out)
124124
}
125125

126-
#' Print method for gmwmx2_fit
126+
#' Print method for a \code{gmwmx2_fit} object
127127
#'
128128
#' Displays a table of regression coefficients with standard errors and
129129
#' summarizes the fitted stochastic model with estimated parameters.

vignettes/estimate_linear_models_with_dependent_errors.Rmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ linear combination of its elements.
6868

6969
The variance-covariance matrix of the estimated regression parameters
7070
$\hat{\boldsymbol{\beta}}$ is then obtained as:
71+
7172
\begin{equation}
72-
(\mathbf{X}^T \mathbf{X})^{-1} \mathbf{X}^T {\boldsymbol{\Sigma}}(\hat{\boldsymbol{\gamma}}) \mathbf{X} (\mathbf{X}^T \mathbf{X})^{-1}
73-
\end{equation}.
73+
(\mathbf{X}^T \mathbf{X})^{-1} \mathbf{X}^T {\boldsymbol{\Sigma}}(\hat{\boldsymbol{\gamma}}) \mathbf{X} (\mathbf{X}^T \mathbf{X})^{-1}.
74+
\end{equation}
7475

7576
This vignette is a detailed, self-contained simulation walkthrough that showcases
7677
`gmwmx2_new()` for an arbitrary design matrix `X` and response vector `y`. We build the

vignettes/estimate_linear_models_with_dependent_errors_and_missing_observations.Rmd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,36 @@ the presence of missing observations. Consider the model defined as:
1818
Missingness is modeled by a binary process \(\mathbf{Z} \in \{0,1\}^n\) with
1919
\(Z_i = 1\) indicating an observation and \(Z_i = 0\) a missing observation. The missingness process is independent of
2020
$\mathbf{Y}$ and follows the definition:
21+
2122
\begin{equation}
2223
Z_i =
2324
\begin{cases}
2425
Z_{i-1}, & \text{with probability } \rho, \\
2526
W_i \sim \mathrm{Bernoulli}(\mu(\bm{\vartheta})), & \text{with probability } 1-\rho,
2627
\end{cases}
2728
\end{equation}
29+
2830
with expectation $\mu(\boldsymbol{\vartheta}) = \mathbb{E}[Z_i] \in (0, 1]$ for
2931
all $i \in \{1, \ldots, n\}$, with covariance matrix
3032
$\boldsymbol{\Lambda}(\boldsymbol{\vartheta}) = \operatorname{var}\left(\mathbf{Z}\right)
3133
\in \mathbb{R}^{n\times n}$ whose structure is assumed known up to the
3234
parameter vector $\boldsymbol{\vartheta} \in \boldsymbol{\Upsilon} \subset \mathbb{R}^k$.
3335
The observed series is
36+
3437
\[
3538
\tilde{\mathbf{Y}} = \mathbf{Y} \odot \mathbf{Z}.
3639
\]
3740

3841
The design matrix with rows zeroed out for missing observations
3942
can be written as \(\tilde{\mathbf{X}} = \left(\mathbf{Z} \otimes \mathbf{1}^T\right) \odot \mathbf{X}\).
4043
The least‑squares estimator based on observed data is
44+
4145
\[
4246
\hat{\boldsymbol{\beta}} =
4347
\left(\tilde{\mathbf{X}}^T \tilde{\mathbf{X}}\right)^{-1}\tilde{\mathbf{X}}^T \tilde{\mathbf{Y}},
4448
\]
4549
and we compute residuals
50+
4651
\(\hat{\boldsymbol{\varepsilon}} = \tilde{\mathbf{Y}} - \tilde{\mathbf{X}}\hat{\boldsymbol{\beta}}\).
4752

4853
We then estimate the parameters of the missingness process via maximum
@@ -66,7 +71,7 @@ $\hat{\boldsymbol{\beta}}$ is then obtained as:
6671
\begin{equation}
6772
\mu(\hat{\boldsymbol{\vartheta}})^{-2}(\mathbf{X}^{T}\mathbf{X})^{-1}
6873
\mathbf{X}^{T} \boldsymbol{\Sigma}(\hat{\boldsymbol{\gamma}}, \hat{\boldsymbol{\vartheta}})
69-
\mathbf{X} (\mathbf{X}^{T}\mathbf{X})^{-1}
74+
\mathbf{X} (\mathbf{X}^{T}\mathbf{X})^{-1}.
7075
\end{equation}
7176

7277

0 commit comments

Comments
 (0)