Commit d11ec0db authored by mabrook's avatar mabrook
Browse files

updates to ATCG data

parent 50ca7e52
Pipeline #3234 passed with stage
in 20 seconds
Package: actg
Type: Package
Title: Data from the AIDS Clinical Trial Group (ACTG) Study
Version: 0.1.0
Version: 0.2.0
Author: Sara Levintow and Alan Brookhart
Maintainer: <>
Description: This package contains data on 1,156 patients from the ACTG study 320, which compared a combination of three antiretroviral drugs against a pair.
......@@ -10,7 +10,20 @@ use_data_raw()
# Reading in ACTG data set
# Review variables and make sure data read in correctly
......@@ -21,22 +34,28 @@ actg$stop<-ifelse(actg$stop=="."," ",actg$stop)
# Creating event time and censoring time variables
actg$Y <- ifelse(actg$delta==1,actg$days,NA) #Y is time of event (AIDS or death)
actg$C1 <- ifelse(actg$drop==1,actg$days,NA) #C1 is time of censoring due to drop-out
actg$C2 <- ifelse(actg$delta==0 & actg$drop==0,actg$days,NA) #C2 is time of censoring not due to drop-out
actg$y <- ifelse(actg$delta==1, actg$days, NA) #Y is time of event (AIDS or death)
actg$drop_out <- ifelse(actg$drop==1, actg$days, NA) #C1 is time of censoring due to drop-out
actg$censor <- ifelse(actg$delta==0 & actg$drop == 0, actg$days, NA) #C2 is time of censoring not due to drop-out
# Treatment (art) as a factor variable
actg$art_f <- factor(actg$art,levels = c(0,1), labels = c("Dual therapy","Triple therapy"))
actg$art <- factor(actg$art, levels = c(0, 1), labels = c("Dual therapy", "Triple therapy"))
# IDU as a factor variable
actg$idu <- factor(actg$idu, levels = c(0, 1), labels = c("No", "Yes"))
# Race as a factor variable
actg$race <- with(actg,hispanic*1+black*2)
actg$race <- factor(actg$race,levels = c(0,1,2), labels = c("White","Black", "Hispanic"))
actg$race <- factor(actg$race,levels = c(0,1,2), labels = c("White", "Black", "Hispanic"))
# Race as a factor variable
actg$karnofsky <- factor(ifelse(actg$karnofsky_score < 90, 0, 1), levels = c(0, 1),
labels = c("Score < 90", "Score >= 90"))
# Sex as a factor variable
actg$sex <- factor(actg$male,levels = c(0,1), labels = c("Female","Male"))
actg$sex <- factor(actg$male,levels = c(0,1), labels = c("Female", "Male"))
# Deleting indicators of outcome and drop-out
# Deleting indicators of outcome and drop-out and other variables
actg$male <- NULL
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment