Learn R Programming

acc (version 1.2.4)

aee: Creates an aee object

Description

Creates an aee object for semiparametric regression with augmented estimating equation.

Usage

aee(ID, time, minutes)

Arguments

ID
Individual identifier
time
Observation time
minutes
Minutes of physical activity

Value

psDF
A data frame, part of original input data frame with variable "ID", "time" and "count"
timeGrid
Ordered distinct observation times in the set of all observation times
panelMatrix
a matrix representation of panel count data, one row per subject, one column per time point in "timeGrid"

References

Wang, X. and Yan, J. (2011). Fitting semiparametric regressions for panel count survival data with an R package spef. Computer Methods and Programs in Biomedicine, 104, 278-285.

Wang, X., Ma, S., and Yan, J. (2013). Augmented estimating equations for semiparametric panel count regression with informative observation times and censoring time. Statistica Sinica, 23, 359-381.

Examples

Run this code
## Not run: 
# data(NHANES)
# # Example of analyzing NHANES data 
# # Example 1: Not adjusted for sampling weights
# nhanesToFit <- NHANES[ which(NHANES$mvpaMinutes!=0), ]
# formula <- aee(ID, Day, mvpaMinutes) ~ Age+raceBi+VO2max+Gender
# fitted1 <- aeefit(formula=formula, data=nhanesToFit) 
# summary(fitted1)
# 
# # Example 2: Adjusted for sampling weights
# data(weight)
# nhanesToFit <- NHANES[ which(NHANES$mvpaMinutes!=0), ]
# nhanesUnique <- nhanesToFit[!duplicated(nhanesToFit$ID),]
# weightUnique <- merge(nhanesUnique, weight, by="ID")
# selProb=(1/weightUnique$weight)
# formula <- aee(ID, Day, mvpaMinutes) ~ Age+raceBi+VO2max+Gender
# fitted2 <- aeefit(formula=formula, data=nhanesToFit, weight = selProb) 
# summary(fitted2)
# ## End(Not run)

Run the code above in your browser using DataLab