MEM_X_hat: Get MEM substitution for (generalized) linear regression with...

View source: R/MEM_X_hat.R

MEM_X_hatR Documentation

Get MEM substitution for (generalized) linear regression with one functional covariate with measurement error.

Description

The function to get the data of \hat X_i(t) using the mixed model based measurement error bias correction method proposed by Luan et al. See ME.fcRegression_MEM

Usage

MEM_X_hat(
  data.W,
  method = c("UP_MEM", "MP_MEM", "average"),
  d = 3,
  family.W = c("gaussian", "poisson"),
  smooth = FALSE
)

Arguments

data.W

A 3-dimensional array, represents W, the measurement of X. Each row represents a subject. Each column represent a measurement (time) point. Each layer represents an observation.

method

The method to construct the substitution X. Available options: 'UP_MEM', 'MP_MEM', 'average'.

d

The number of time points involved for MP_MEM (default and miniumn is 3).

family.W

Distribution of W given X, Available options: "gaussian", "poisson".

smooth

Whether to smooth the substitution of X. Default is FALSE.

Value

A numeric value matrix of \hat X_i(t).

References

Luan, Yuanyuan, et al. "Scalable regression calibration approaches to correcting measurement error in multi-level generalized functional linear regression models with heteroscedastic measurement errors." arXiv preprint arXiv:2305.12624 (2023).

Examples

data(MECfda.data.sim.0.1)
X_hat = MEM_X_hat(data.W = MECfda.data.sim.0.1$W,
                  method = 'UP_MEM',
                  family.W = "gaussian")


MECfda documentation built on April 3, 2025, 10:07 p.m.