Last data update: 2014.03.03

R: Regression Analysis for Time-Invariant Coefficients
asynchTIR Documentation

Regression Analysis for Time-Invariant Coefficients

Description

Estimation of regression models for sparse asynchronous longitudinal observations with time-invariant coefficients.

Usage

asynchTI(data.x, data.y, kType = "epan", lType = "identity", bw = NULL, 
         nCores = 1, ...)

Arguments

data.x

A data.frame of covariates. The structure of the data.frame must be {patient ID, time of measurement, measurement(s)}. Patient IDs must be of class integer or be able to be coerced to class integer without loss of information. Missing values must be indicated as NA. All times will automatically be rescaled to [0,1].

data.y

A data.frame of response measurements. The structure of the data.frame must be {patient ID, time of measurement, measurement}. Patient IDs must be of class integer or be able to be coerced to class integer without loss of information. Missing values must be indicated as NA. All times will automatically be rescaled to [0,1].

kType

An object of class character indicating the type of smoothing kernel to use in the estimating equation. Must be one of {"epan", "uniform", "gauss"}, where "epan" is the Epanechnikov kernel and "gauss" is the Gaussian kernel.

lType

An object of class character indicating the type of link function to use for the regression model. Must be one of {"identity","log","logistic"}.

bw

If provided, bw is an object of class numeric or a numeric vector containing the bandwidths for which parameter estimates are to be obtained. If NULL, an optimal bandwidth will be determined using an adaptive selection procedure. The range of the bandwidth search space is taken to be 2*(Q3 - Q1)*n^-0.7 to 2*(Q3 - Q1)*n^-0.3, where Q3 is the 0.75 quantile and Q1 is the 0.25 quantile of the pooled sample of measurement times for the covariate and response, and n is the number of patients. See original reference for details of the selection procedure.

nCores

A numeric object. For auto-tune method, the number of cores to employ for calculation. If nCores > 1, the bandwidth search space will be distributed across the cores using parallel's parLapply.

...

Ignored.

Details

For lType = "log" and lType = "logistic", parameter estimates are obtained by minimizing the estimating equation using optim() with method="Nelder-Mead"; all other arguments take their default values.

For lType = "identity", parameter estimates are obtained using solve().

Value

A list is returned. If bandwidths are provided, each element of the list is a matrix, where the ith row corresponds to the ith bandwidth of argument “bw" and the columns correspond to the model parameters. If the bandwidth is determined automatically, each element is a named vector calculated at the optimal bandwidth.

betaHat

The estimated model coefficients.

stdErr

The standard error for each coefficient.

zValue

The estimated z-value for each coefficient.

pValue

The p-value for each coefficient.

If the bandwidth is determined automatically, two additional list elements are returned:

optBW

The estimated optimal bandwidth for each coefficient.

minMSE

The mean squared error at the optimal bandwidth for each coefficient.

Author(s)

Hongyuan Cao, Donglin Zeng, Jason P. Fine, and Shannon T. Holloway

References

Cao, H., Zeng, D., and Fine, J. P. (2015) Regression Analysis of sparse asynchronous longitudinal data. Journal of the Royal Statistical Society: Series B, 77, 755-776.

Examples


  data(asynchDataTI)

  res <- asynchTI(data.x = TI.x, 
                  data.y = TI.y,
                  bw = c(0.05, 0.03),
                  kType = "epan", 
                  lType = "identity")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(AsynchLong)
Loading required package: compiler
Loading required package: parallel

AsynchLong was developed in support of IMPACT, a comprehensive research
program that aims to improve the health and longevity of people by
improving the clinical trial process. To learn more about our 
research and available software visit www.impact.unc.edu. 


> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AsynchLong/asynchTI.Rd_%03d_medium.png", width=480, height=480)
> ### Name: asynchTI
> ### Title: Regression Analysis for Time-Invariant Coefficients
> ### Aliases: asynchTI
> 
> ### ** Examples
> 
> 
>   data(asynchDataTI)
> 
>   res <- asynchTI(data.x = TI.x, 
+                   data.y = TI.y,
+                   bw = c(0.05, 0.03),
+                   kType = "epan", 
+                   lType = "identity")
Bandwidth:  0.05 
       estimate     stdErr   z-value       p-value
beta0 0.4660857 0.06381595  7.303593  2.801827e-13
beta1 1.4808378 0.06848575 21.622568 1.101734e-103

Bandwidth:  0.03 
       estimate     stdErr   z-value       p-value
beta0 0.4620238 0.06691476  6.904661  5.032349e-12
beta1 1.4803441 0.06966119 21.250628 3.252833e-100

> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>