Package Actigraphy. R topics documented: January 15, Type Package Title Actigraphy Data Analysis Version 1.3.

Similar documents
Package ordibreadth. R topics documented: December 4, Type Package Title Ordinated Diet Breadth Version 1.0 Date Author James Fordyce

Package p3state.msm. R topics documented: February 20, 2015

Package prognosticroc

Package ega. March 21, 2017

Package speff2trial. February 20, 2015

Package ORIClust. February 19, 2015

Package rvtdt. February 20, rvtdt... 1 rvtdt.example... 3 rvtdts... 3 TrendWeights Index 6. population control weighted rare-varaints TDT

Package xseq. R topics documented: September 11, 2015

Package wally. May 25, Type Package

Package cssam. February 19, 2015

Package singlecase. April 19, 2009

Package citccmst. February 19, 2015

Package appnn. R topics documented: July 12, 2015

Package AbsFilterGSEA

ivlewbel: Uses heteroscedasticity to estimate mismeasured and endogenous regressor models

Linear Regression in SAS

Package mediation. September 18, 2009

Package frailtyhl. February 19, 2015

Package propoverlap. R topics documented: February 20, Type Package

Package HAP.ROR. R topics documented: February 19, 2015

Package CTT. February 4, 2018

Package CompareTests

Package cancer. July 10, 2018

Package mdsdt. March 12, 2016

R documentation. of GSCA/man/GSCA-package.Rd etc. June 8, GSCA-package. LungCancer metadi... 3 plotmnw... 5 plotnw... 6 singledc...

Package nopaco. R topics documented: April 13, Type Package Title Non-Parametric Concordance Coefficient Version 1.0.

Package inctools. January 3, 2018

dataset1 <- read.delim("c:\dca_example_dataset1.txt", header = TRUE, sep = "\t") attach(dataset1)

Package tumgr. February 4, 2016

Package inote. June 8, 2017

Package QualInt. February 19, 2015

Package influence.me

Application of Local Control Strategy in analyses of the effects of Radon on Lung Cancer Mortality for 2,881 US Counties

Package ClusteredMutations

Reveal Relationships in Categorical Data

Package clust.bin.pair

Package MethPed. September 1, 2018

Package EpiEstim. R topics documented: February 19, Version Date 2013/03/08

Package longroc. November 20, 2017

Package noia. February 20, 2015

Data Exploration and Visualization

Package GANPAdata. February 19, 2015

CRITERIA FOR USE. A GRAPHICAL EXPLANATION OF BI-VARIATE (2 VARIABLE) REGRESSION ANALYSISSys

Package xmeta. August 16, 2017

Package bionetdata. R topics documented: February 19, Type Package Title Biological and chemical data networks Version 1.0.

Package Interpol. R topics documented: February 19, Type Package. Title Interpolation of amino acid sequences. Version

5 To Invest or not to Invest? That is the Question.

BIOL 458 BIOMETRY Lab 7 Multi-Factor ANOVA

Diurnal Pattern of Reaction Time: Statistical analysis

Package BCRA. April 25, 2018

Package flowtype. R topics documented: July 18, Type Package. Title Phenotyping Flow Cytometry Assays. Version

Package seqdesign. April 27, Version 1.1 Date

Package medicalrisk. August 29, 2016

Package diggitdata. April 11, 2019

Package ICCbin. November 14, 2017

Solution to Series 1

Lab 4 (M13) Objective: This lab will give you more practice exploring the shape of data, and in particular in breaking the data into two groups.

Normal Q Q. Residuals vs Fitted. Standardized residuals. Theoretical Quantiles. Fitted values. Scale Location 26. Residuals vs Leverage

The SAS SUBTYPE Macro

A Handbook of Statistical Analyses Using R. Brian S. Everitt and Torsten Hothorn

Package PELVIS. R topics documented: December 18, Type Package

QPM Lab 9: Contingency Tables and Bivariate Displays in R

Midterm Exam ANSWERS Categorical Data Analysis, CHL5407H

User Guide. Association analysis. Input

Package ExactCIdiff. February 15, 2013

Stat 13, Lab 11-12, Correlation and Regression Analysis

Multilevel data analysis

Migraine Dataset. Exercise 1

Package sbpiper. April 20, 2018

Statistical Methods for Wearable Technology in CNS Trials

Package MSstatsTMT. February 26, Title Protein Significance Analysis in shotgun mass spectrometry-based

Package PROcess. R topics documented: June 15, Title Ciphergen SELDI-TOF Processing Version Date Author Xiaochun Li

Multiple Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University

SubLasso:a feature selection and classification R package with a. fixed feature subset

Package SAMURAI. February 19, 2015

Journal: Nature Methods

Package RNAsmc. December 11, 2018

Package msgbsr. January 17, 2019

Supplementary Online Content

1. Objective: analyzing CD4 counts data using GEE marginal model and random effects model. Demonstrate the analysis using SAS and STATA.

Package labstats. December 5, 2016

Package TEQR. R topics documented: February 5, Version Date Title Target Equivalence Range Design Author M.

Package NarrowPeaks. August 3, Version Date Type Package

Multivariate dose-response meta-analysis: an update on glst

Package BUScorrect. September 16, 2018

LESSON: Error bars and measures of dispersion

Package preference. May 8, 2018

STAT 135 Introduction to Statistics via Modeling: Midterm II Thursday November 16th, Name:

Package ncar. July 20, 2018

List of Figures. List of Tables. Preface to the Second Edition. Preface to the First Edition

Lab 8: Multiple Linear Regression

Chapter 5. Describing numerical data

Ward Headstrom Institutional Research Humboldt State University CAIR

Package TFEA.ChIP. R topics documented: January 28, 2018

Using SPSS for Correlation

NORTH SOUTH UNIVERSITY TUTORIAL 2

CSDplotter user guide Klas H. Pettersen

Preliminary Report on Simple Statistical Tests (t-tests and bivariate correlations)

GlobalAncova with Special Sum of Squares Decompositions

Journal of Statistical Software

Transcription:

Type Package Title Actigraphy Data Analysis Version 1.3.2 Date 2016-01-14 Package Actigraphy January 15, 2016 Author William Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez Maintainer Berkley Shands <rpackages@biorankings.com> Depends R (>= 2.14.0), fda Imports SDMTools Suggests lattice Functional linear modeling and analysis for actigraphy data. License Apache License (== 2.0) LazyLoad yes NeedsCompilation no Repository CRAN Date/Publication 2016-01-15 18:53:16 R topics documented: Actigraphy-package..................................... 2 act_29pt........................................... 2 act_8pt............................................ 3 cat_flm_plot......................................... 3 clinic_29pt_ahi....................................... 5 clinic_29pt_bmi....................................... 5 clinic_8pt.......................................... 6 cont_flm_plot........................................ 6 fda.matchid......................................... 7 fda.smoothdata....................................... 9 flm_cate........................................... 10 weekday........................................... 11 Index 12 1

2 act_29pt Actigraphy-package Functional Actigraphy Data Analysis Implements functional linear modeling and analysis for actigraphy data Details Please refer to the directory "Actigraphy/doc" for an additional tutorials and a document containing the code for the figures in the referenced paper. The paper can be downloaded from the Journal of Circadian Rhythms website. Author(s) William D. Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez References 1. "Measuring the Impact of AHI and Obesity on Circadian Activity Patterns Using Functional Linear Modeling of Actigraphy Data," Jia Wang, Amy Licis, Elena Deych, Jimin Ding, Jennifer McLeland, Cristina Toedebusch, Tao Li, Hong Xian, Stephen Duntley, and William Shannon. act_29pt Data Set Containing a One Day Average of Actigraph Data for 29 Subjects A data set containing a one day(1440 minutes) of actigraph data for 29 subjects. data(act_29pt) Format A data frame that consists of 30 columns; the first column refers to the time indices of one day by minute from midnight to midnight. The following 29 columns contain the actigraph data of 29 subjects with column names being the subject IDs.

act_8pt 3 act_8pt Data Set Containing a One Day Average of Actigraph Data for 8 Subjects Format A data set containing a one day(1440 minutes) of actigraph data for 8 subjects. data(act_8pt) A data frame that consists of nine columns; the first column refers to the time indices of one day by minute from midnight to midnight. The following eight columns contain the actigraph data of eight subjects with column names being the subject IDs. cat_flm_plot Plot Functional Linear Model Analysis Results of a Categorical Type This function produce either one or two plots: An effect of a categorical (factor) covariate on activity values by time and potentially the F-test for the effect of the categorical covariate. cat_flm_plot(smoothdata, matchresults, flmresults, ftest, nperm, lb, xat, varname, col, ylim, L, xlab="time", ylab="activity") Arguments smoothdata matchresults flmresults ftest nperm lb xat varname col List output from the fda.smoothdata function List output from the matchid function. List output from the flm_cate function. A logic value indicating whether to implement F test or not. F test will be implement if ftest is TRUE. The number of permutations for the F-test. X axis labels. X axis label positions. Name of categorical covariate. Colors for levels of the predictor.

4 cat_flm_plot ylim L xlab ylab Y axis limits for activity plot. The length of the time points. The label for the x-axis. The label for the y-axis. Value One plot of the estimated group means and a possible second plot of the F-test results. Author(s) William D. Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez Examples data(act_29pt) data(clinic_29pt_ahi) colnames(act_29pt) <- sub("x", "", colnames(act_29pt)) data <- as.matrix(act_29pt[,-1]) ahi <- clinic_29pt_ahi ahi$ahicat <- as.factor(ifelse(ahi$ahi >= 0 & ahi$ahi <= 5, 1, ifelse(ahi$ahi > 5 & ahi$ahi <= 15, 2, ifelse(ahi$ahi > 15 & ahi$ahi <= 30, 3, ifelse(ahi$ahi > 30, 4, 0))))) matchidb <- fda.matchid(data, ahi[,-2], "factor", c("normal", "mild", "moderate", "severe")) FDcatahi <- fda.smoothdata(matchidb) L <- nrow(data) lb <- c("midnight", "6AM", "Noon", "6PM", "Midnight") xat <- c(0, L/4, L/2, 3*L/4, L) geftfdcatahi <- flm_cate(fdcatahi) predy <- as.vector(geftfdcatahi$freg$yhatfdobj$y) xlim <- c(0, L) ylim <- c(min(predy), max(predy) + 100) cat.flm.results <- cat_flm_plot(fdcatahi, matchidb, geftfdcatahi, TRUE, 5, lb, xat, "AHI", 1:4, ylim, L)

clinic_29pt_ahi 5 clinic_29pt_ahi Data Set Containing AHI(Apnea Hypopnea Index) Information from 29 Subjects A data set containing the AHI(Apnea Hypopnea Index) values(continuous) for 29 subjects. data(clinic_29pt_ahi) Format A data frame consisting of two columns. The first column contains the numeric IDs and the second column contains the AHI information of the 29 subjects. clinic_29pt_bmi Data Set Containing BMI(Body Mass Index) Information from 29 Subjects A data set containing the BMI(Body Mass Index) values(continuous) for 29 subjects. data(clinic_29pt_bmi) Format A data frame consisting of two columns. The first column contains the numeric IDs and the second column contains the BMI of the 29 subjects.

6 cont_flm_plot clinic_8pt Data Set Containing AHI(Apnea Hypopnea Index) Information from 8 Subjects Format A data set containing the AHI(Apnea Hypopnea Index) values(categorical) for 8 subjects. data(clinic_8pt) A data frame that consists of two columns. The first contains the numeric IDs and the second column contains the AHI information for 8 subjects. cont_flm_plot Plot Functional Linear Model Analysis Results of a Continuous Type This function produces two plots: An effect of a continuous covariate on activity values by time and the F-test for the effect of the continuous covariate. cont_flm_plot(smoothdata, matchresults, flmresults, xlim, ylim, ftest, nperm, lb, xat, legendx, legendy, L, xlab="time", ylab="activity") Arguments smoothdata matchresults flmresults xlim ylim ftest nperm lb xat legendx List output from the fda.smoothdata function. List output from the matchid function. List output from the flm_cate function. X axis limits for activity plot. Y axis limits for activity plot. A logic value indicating whether to implement F test or not. F test will be implement if ftest is TRUE. The number of permutations for the F-test. X-axis labels. X axis label positions. X axis position of the left edge of the legend box.

fda.matchid 7 legendy L xlab ylab Y axis position of the upper edge of the legend box. The length of the time points. The label for the x-axis. The label for the y-axis. Value One plot of the estimated group means and a possible second plot of the F-test results. Author(s) William D. Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez Examples data(act_29pt) data(clinic_29pt_ahi) colnames(act_29pt) <- sub("x", "", colnames(act_29pt)) data <- as.matrix(act_29pt[,-1]) matchid <- fda.matchid(data, clinic_29pt_ahi, "contin") FDcont <- fda.smoothdata(matchid) L <- nrow(data) lb <- c("midnight", "6AM", "Noon", "6PM", "Midnight") xat <- c(0, L/4, L/2, 3*L/4, L) geftfdcont <- flm_cate(fdcont) predy <- as.vector(geftfdcont$freg$yhatfdobj$y) xlim <- c(0, L) ylim <- c(min(predy), max(predy) + 100) legendx <- 0 legendy <- max(predy) - 100 cont.flm.results <- cont_flm_plot(fdcont, matchid, geftfdcont, xlim, ylim, TRUE, 10, lb, xat, legendx, legendy, L) fda.matchid Match IDs from Clinical and Actigraph Data A function used to match actigraphy data and clinical covariates by subject IDs and return a list of the data combined by IDs. Only the subjects with both actigraphy and covariate data will be returned by this function.

8 fda.matchid fda.matchid(mat, acov, type, grouplab) Arguments mat acov type grouplab A data frame with the rows being the time and the columns being the activity, with the column names being the subjects. A two column data frame that contains only subject IDs and a covariate of interest, respectively. A string specifying either "contin" for continuous and "factor" for categorical covariates. A vector of names of the categories if type is TRUE. Details Note: Only the subjects with both actigraphy and covariate data will be returned by this function. Value A list consisting of two components as follows: mat cov A matrix where rows represent the time, columns are the samples, and the column names are the subjects. A two column matrix that contains the actigraphy data and clinical covariates. Author(s) William D. Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez Examples data(act_29pt) data(clinic_29pt_ahi) colnames(act_29pt) <- sub("x", "", colnames(act_29pt)) data <- as.matrix(act_29pt[,-1]) ### Example 1: Continuous Covariate matchida <- fda.matchid(data, clinic_29pt_ahi, "contin") ### Example 2: Categorical Covariate ahi <- clinic_29pt_ahi ahi$ahicat <- as.factor(ifelse(ahi$ahi >= 0 & ahi$ahi <= 5, 1, ifelse(ahi$ahi > 5 & ahi$ahi <= 15, 2, ifelse(ahi$ahi > 15 & ahi$ahi <= 30, 3, ifelse(ahi$ahi > 30, 4, 0))))) matchidb <- fda.matchid(data, ahi[,-2], "factor", c("normal", "mild", "moderate", "severe"))

fda.smoothdata 9 fda.smoothdata Functional Actigraphy Data Smoothing This function produces functional actigraphy data from matrix actigraphy data. fda.smoothdata(data, basistype="fourier", nbasis=9, norder=4) Arguments data Details Value basistype A list consisting of the following two components: data$mat A matrix where rows represent the time, columns are the samples, and the column names are the subjects. data$cov A two column matrix that contains the actigraphy data and clinical covariate. A string specifying either "Fourier" and "bspline". nbasis The number of basis functions to be used for functional data. Default value is 9. norder The order of the bspline basis functions. Default value is 4. Note: The output of function fda.matchid can be directly used as the input for this argument. If the data is a categorical covariate A list consisting of two components as follows: fd cov A fdsmooth data object containing the functional data (see function smooth.basis in the package fda for details). An object that is the same as the argument data$cov. Author(s) William D. Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez Examples data(act_29pt) data(clinic_29pt_ahi) colnames(act_29pt) <- sub("x", "", colnames(act_29pt)) data <- as.matrix(act_29pt[,-1])

10 flm_cate matchid <- fda.matchid(data, clinic_29pt_ahi, "contin") FDcont <- fda.smoothdata(matchid) ### Smooth the Results ts.plot(predict(fdcont$fd$fd, c(1:1440)), main="smoothed Activity Data") flm_cate Functional Linear Model Analysis A function that does functional linear model analysis. flm_cate(fd, basistype="fourier", nbasis=9, norder=4) Arguments FD basistype nbasis norder The list from the function fda.smoothdata. A string specifying either "fourier" and "bspline". The number of basis functions to be used for functional linear model analysis. Default value is 9. an integer specifying the order of b-splines, which is one higher than their degree. The default of 4 gives cubic splines. Value A list consisting of three components as follows: freg fregstd A fregress fit object containing the intercept and coefficient functions (check function fregress for details) A list containing the standard error functions of the intercept and coefficient functions. Author(s) William D. Shannon, Tao Li, Hong Xian, Jia Wang, Elena Deych, Carlos Gonzalez Examples data(act_29pt) data(clinic_29pt_ahi) colnames(act_29pt) <- sub("x", "", colnames(act_29pt)) data <- as.matrix(act_29pt[,-1]) matchid <- fda.matchid(data, clinic_29pt_ahi, "contin")

weekday 11 FDcont <- fda.smoothdata(matchid) geftfdcont <- flm_cate(fdcont) weekday Data Set Containing Five Weekdays of Actigraph Data for One Subject Format A data set containing five weekdays of actigraph data for one subject. data(weekday) A data frame that consists of three columns; the first column is the weekday indices, the second column contains the indices of time in minutes from midnight to midnight, and the third contains the actigraph data.

Index Topic datasets act_29pt, 2 act_8pt, 3 clinic_29pt_ahi, 5 clinic_29pt_bmi, 5 clinic_8pt, 6 weekday, 11 Topic package Actigraphy-package, 2 act_29pt, 2 act_8pt, 3 Actigraphy (Actigraphy-package), 2 Actigraphy-package, 2 cat_flm_plot, 3 clinic_29pt_ahi, 5 clinic_29pt_bmi, 5 clinic_8pt, 6 cont_flm_plot, 6 fda.matchid, 7 fda.smoothdata, 9 flm_cate, 10 weekday, 11 12