naive_se {CIEE}R Documentation

Naive standard error estimates

Description

Function to obtain naive standard error estimates for the parameter estimates of the get_estimates function, under the GLM or AFT setting for the analysis of a normally-distributed or censored time-to-event primary outcome.

Usage

naive_se(setting = "GLM", Y = NULL, X = NULL, K = NULL, L = NULL,
  C = NULL)

Arguments

setting

String with value "GLM" or "AFT" indicating whether standard error estimates are obtained for a normally-distributed ("GLM") or censored time-to-event ("AFT") primary outcome Y.

Y

Numeric input vector for the primary outcome.

X

Numeric input vector for the exposure variable.

K

Numeric input vector for the intermediate outcome.

L

Numeric input vector for the observed confounding factor.

C

Numeric input vector for the censoring indicator under the AFT setting (must be coded 0 = censored, 1 = uncensored).

Details

Under the GLM setting for the analysis of a normally-distributed primary outcome Y, naive standard error estimates are obtained for the estimates of the parameters \alpha_0, \alpha_1, \alpha_2, \alpha_3, \alpha_4, \alpha_{XY} in the models

Y = \alpha_0 + \alpha_1 \cdot K + \alpha_2 \cdot X + \alpha_3 \cdot L + \epsilon_1, \epsilon_1 \sim N(0,\sigma_1^2)

Y^* = Y - \overline{Y} - \alpha_1 \cdot (K-\overline{K})

Y^* = \alpha_0 + \alpha_{XY} \cdot X + \epsilon_2, \epsilon_2 \sim N(0,\sigma_2^2),

using the lm function, without accounting for the additional variability due to the 2-stage approach.

Under the AFT setting for the analysis of a censored time-to-event primary outcome, bootstrap standard error estimates are similarly obtained of the parameter estimates of \alpha_0, \alpha_1, \alpha_2, \alpha_3, \alpha_4, \alpha_{XY} from the output of the survreg and lm functions.

Value

Returns a vector with the naive standard error estimates of the parameter estimates.

Examples


dat <- generate_data(setting = "GLM")
naive_se(setting = "GLM", Y = dat$Y, X = dat$X, K = dat$K, L = dat$L)


[Package CIEE version 0.1.1 Index]