\begin{algorithm}
\caption{Penalized G-estimation algorithm}\label{penG.algorithm}
\begin{algorithmic}[1]
\Procedure{penalizedG}{$\vec A, \vec H, \vec Y, \lambda$,\,corstr,\,$\kappa$} %Put comment if you want: \Comment{The g.c.d. of a and b}
    \State Compute $E(\vec A_i|\vec H_i)$ for $i=1,\ldots,n$ \Comment{logistic regression on the pooled data}
    \State $\vec\theta^{\text{up}} \gets \{\sum_{i=1}^n\vec D_i^\top(\vec H_i\;\;\vec A_i\cdot\vec H_i)\}^{-1}\sum_{i=1}^n\vec D_i^\top \vec Y_i$ \Comment{univariate unpenalized G-estimator}
    \ForAll{$\lambda \in (\lambda_{max}, \ldots, \lambda_{min})$} %\Comment{We have the answer if r is 0}
        \State Initialize: $t = 0$, $\vec\theta^0 \gets \vec\theta^{\text{up}}$
            \Repeat
                \State $\vec e_i \gets \vec Y_i - (\vec H_i\;\;\vec A_i\cdot\vec H_i)\vec\theta^t$ for $i=1,\ldots,n$%\Comment{comment}
                \State Compute $\sigma^t$ and $\alpha^t$ under corstr using \ref{moment.method} \Comment{method of moments estimator}
                \State Compute $\hat{\vec V}_i$  according to corstr for $i=1,\ldots,n$ \Comment{$\hat{\vec V}_i=\hat{\vec V}$ $\forall i$ if $J$ is fixed}
                \State Compute $\vec S^{\text{eff}}(\vec\theta^t)$ using (\ref{form})
                \State Compute $\vec H_n(\vec\theta^t)$ and $\vec E_n(\vec\theta^t)$ using (\ref{eq.Hn}) and (\ref{eq.En}), respectively.
                \State Update $\vec\theta^{t}$ according to (\ref{update.penalizedG}) and obtain $\vec\theta^{t+1}$
                \State $t \gets t+1$
            \Until{$||\vec\theta^{t} - \vec\theta^{t-1}|| < \kappa$}\Comment{we set $\kappa=10^{-4}$}
        \State $\tilde{\vec\theta}_\lambda \gets \vec\theta^t$, $\tilde{\sigma}_\lambda \gets \sigma^t$, and $\tilde{\alpha}_\lambda \gets \alpha^t$
        \State Compute $\text{DRIC}_{\lambda}$ according to (\ref{dric})
    \EndFor
    \State $\tilde{\vec\theta} \gets \tilde{\vec\theta}_\lambda^*$ such that $\tilde{\vec\theta}_\lambda^*$ corresponds to the minimum of $\text{DRIC}_{\lambda}$
    \State \textbf{return} $\tilde{\vec\theta}$
\EndProcedure
\end{algorithmic}
\end{algorithm}

\begin{algorithm}
\caption{Penalized G-estimation algorithm}\begin{algorithmic}
[1]
\Procedure{penalizedG}{$\vec A, \vec H, \vec Y, \lambda$,\,corstr,\,$\kappa$} %Put comment if you want: \Comment{The g.c.d. of a and b}
\State Compute $E(\vec A_i|\vec H_i)$ for $i=1,\ldots,n$ \Comment{logistic regression on the pooled data}
\State $\vec\theta^{\text{up}} \gets \{\sum_{i=1}^n\vec D_i^\top(\vec H_i\;\;\vec A_i\cdot\vec H_i)\}^{-1}\sum_{i=1}^n\vec D_i^\top \vec Y_i$ \Comment{univariate unpenalized G-estimator}
\ForAll{$\lambda \in (\lambda_{max}, \ldots, \lambda_{min})$} %\Comment{We have the answer if r is 0}
\State Initialize: $t = 0$, $\vec\theta^0 \gets \vec\theta^{\text{up}}$
\Repeat
\State $\vec e_i \gets \vec Y_i - (\vec H_i\;\;\vec A_i\cdot\vec H_i)\vec\theta^t$ for $i=1,\ldots,n$%\Comment{comment}
\State Compute $\sigma^t$ and $\alpha^t$ under corstr using \ref{moment.method} \Comment{method of moments estimator}
\State Compute $\hat{\vec V}_i$ according to corstr for $i=1,\ldots,n$ \Comment{$\hat{\vec V}_i=\hat{\vec V}$ $\forall i$ if $J$ is fixed}
\State Compute $\vec S^{\text{eff}}(\vec\theta^t)$ using (\ref{form})
\State Compute $\vec H_n(\vec\theta^t)$ and $\vec E_n(\vec\theta^t)$ using (\ref{eq.Hn}) and (\ref{eq.En}), respectively.
\State Update $\vec\theta^{t}$ according to (\ref{update.penalizedG}) and obtain $\vec\theta^{t+1}$
\State $t \gets t+1$
\Until{$||\vec\theta^{t} - \vec\theta^{t-1}|| < \kappa$}\Comment{we set $\kappa=10^{-4}$}
\State $\tilde{\vec\theta}_\lambda \gets \vec\theta^t$, $\tilde{\sigma}_\lambda \gets \sigma^t$, and $\tilde{\alpha}_\lambda \gets \alpha^t$
\State Compute $\text{DRIC}_{\lambda}$ according to (\ref{dric})
\EndFor
\State $\tilde{\vec\theta} \gets \tilde{\vec\theta}_\lambda^*$ such that $\tilde{\vec\theta}_\lambda^*$ corresponds to the minimum of $\text{DRIC}_{\lambda}$
\State \textbf{return} $\tilde{\vec\theta}$
\EndProcedure
\end{algorithmic}
\end{algorithm}
{
    "title": "penalized g-estimation for effect modifier selection in a structural   nested mean model for repeated outcomes",
    "id": "2402.00154",
    "abstract": "effect modification occurs when the impact of the treatment on an outcome varies based on the levels of other covariates known as effect modifiers. modeling of these effect differences is important for etiological goals and for purposes of optimizing treatment. structural nested mean models (snmms) are useful causal models for estimating the potentially heterogeneous effect of a time-varying exposure on the mean of an outcome in the presence of time-varying confounding. a data-driven approach for selecting the effect modifiers of an exposure may be necessary if these effect modifiers are a priori unknown and need to be identified. although variable selection techniques are available in the context of estimating conditional average treatment effects using marginal structural models, or in the context of estimating optimal dynamic treatment regimens, all of these methods consider an outcome measured at a single point in time. in the context of an snmm for repeated outcomes, we propose a doubly robust penalized g-estimator for the causal effect of a time-varying exposure with a simultaneous selection of effect modifiers and use this estimator to analyze the effect modification in a study of hemodiafiltration. we prove the oracle property of our estimator, and conduct a simulation study for evaluation of its performance in finite samples and for verification of its double-robustness property. our work is motivated by and applied to the study of hemodiafiltration for treating patients with end-stage renal disease at the centre hospitalier de l'universit\\'e de montr\\'eal. we apply the proposed method to investigate the effect heterogeneity of dialysis facility on the repeated session-specific hemodiafiltration outcomes.",
    "categories": "stat.me",
    "doi": "",
    "created": "2024-01-31",
    "updated": "2024-02-16",
    "authors": [
        "ajmery jaman",
        "guanbo wang",
        "ashkan ertefaie",
        "mich\u00e8le bally",
        "ren\u00e9e l\u00e9vesque",
        "robert w. platt",
        "mireille e. schnitzer"
    ],
    "affiliation": [],
    "url": "https://arxiv.org/abs/2402.00154"
}
{
    "ToxicityFilter": {
        "text_to_toxicity_attributes": {
            "bibliography.bib": {
                "toxicity_score": 0.007916619,
                "severe_toxicity_score": 0.00084877014,
                "identity_attack_score": 0.0021273769,
                "insult_score": 0.0069713728,
                "profanity_score": 0.013029462,
                "threat_score": 0.0066151097,
                "sexually_explicit_score": 0.00896453,
                "flirtation_score": 0.28916705
            },
            "main.tex": {
                "toxicity_score": 0.011497946,
                "severe_toxicity_score": 0.0011634827,
                "identity_attack_score": 0.0038292783,
                "insult_score": 0.0075128763,
                "profanity_score": 0.015079016,
                "threat_score": 0.007547205,
                "sexually_explicit_score": 0.012562137,
                "flirtation_score": 0.19652963
            },
            "main.bbl": {
                "toxicity_score": 0.012314741,
                "severe_toxicity_score": 0.0012016296,
                "identity_attack_score": 0.0041067624,
                "insult_score": 0.007797878,
                "profanity_score": 0.015181494,
                "threat_score": 0.007586042,
                "sexually_explicit_score": 0.011264639,
                "flirtation_score": 0.20508216
            }
        },
        "reason": null
    }
}
{
    "num_done": {
        "figure": 0,
        "algorithm": 2,
        "plot": 0
    }
}
{
    "NonTrivialRenderingFilter": {
        "white_pixels_ratio": 92.48792751874008,
        "hash": "002f8f86839f8f3f",
        "most_frequent_color_ratio": 92.48792751874008
    }
}