CC.Missing: Estimate latent covariates and coefficients of interest

Description Usage Arguments Value

View source: R/ConfounderCorrection_WithMissing.R

Description

Estimate latent covariates and estimate/do inference on the coefficients of interest in a multivariate linear model with stabilized inverse probability weighting (sIPW) using estimated missingness mechansim.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
CC.Missing(
  Y,
  X,
  Z = NULL,
  K = NULL,
  Miss.Mech,
  ind.samples = NULL,
  max.miss.perp = 0.5,
  max.miss.image = 0.5,
  BH.min = NULL,
  method = c("sIPW", "IPW"),
  include.updates = T,
  est.Beta = T,
  return.nuis = F,
  refine.C = F,
  p.refine.both = F,
  return.all = F,
  return.mu = F
)

Arguments

Y

a p x n data matrix of log2-transformed metabolite intensities, where p = #of metabolites and n = #of samples. Missing values should be left as NA.

X

a n x d matrix of covariates of interest (i.e. disease status).

Z

a n x r matrix of observed nuisance covariates (i.e. the intercept, observed technical factors, etc.)

K

The number of latent covariates (i.e. C is a n x K matrix). If unspecified, it is estimated using sva::num.sv applied to the metabolites with complete data.

Miss.Mech

The missingness mechansim object returned by EstimateMissing.

ind.samples

A logical or numeric vector of samples to be considered in the analysis. For example, if disease status were only measured in a subset of the patients, this would be the samples with a recorded disease status. Default is no missing samples.

max.miss.perp

Maximum fraction of missing data a metabolite is allowed to have to be used to calculate the part of C perpendicular to X. Defaults to 0.5.

max.miss.image

Maximum fraction of missing data a metabolite is allowed to have to be used to calculate the part of C in the image of X. Defaults to 0.5.

est.Beta

A logical indicating whether or not to estimate/do inference on coefficients of interest. If F, only the latent covariates are estimated. Default, and recommended value, is T.

Value

A list

C.iter

The estimate of the n x K matrix of latent covariates.

Beta.iter

The estimate of the p x d matrix of coefficients of interest.

p.t.iter

The p x d matrix of p-values for the coefficients of interest.

Var.beta.iter

A length p list of the d x d estimates for Var(Beta.iter)

t.iter

A p x d matrix of t-statistics, defined as Beta.iter/SE(Beta.iter)

p.f.iter

A length p vector of F-statistic p-values for the null hypothesis that X has no effect on metabolite intensity. It is only returned if d > 1.

L

The estimate of the p x K matrix of coefficients for the latent covariates.

Beta.naive

The estimate of the p x d matrix of coefficients of interest that ignores C. This should ONLY be used for comparison.

p.t.naive

The p x d matrix of p-values for the coefficients of interest that ignore C. This should ONLY be used for comparison.


chrismckennan/MetabMiss documentation built on March 1, 2020, 10:03 p.m.