Showing posts with label Biostatistics. Show all posts
Showing posts with label Biostatistics. Show all posts

Sunday, March 4, 2012

Estimating Cox Model parameters with and without coxph function from survival package


Reading data


library(survival)
data(veteran)
time.var <- veteran[,3] 
status.var <- veteran[,4] 
covariate.matrix <- veteran[,c(1,5:8)] 
covariate.names <- names(veteran[,c(1,5:8)])
data <- cbind.data.frame(time.var,status.var,covariate.matrix)



Kaplan-Meier and Nelson-Aalen estimates with and without survfit function from survival package

Data reading:


rm(list=ls(all=TRUE)) # wipe out everything else
require(survival)
data = aml[aml$x == "Maintained",]
data

Wednesday, January 26, 2011

Biostatistics and R

Biostatistics is mainly statistics for clinical and epidemiological studies that studies the occurrence of illness (morbidity), death (mortality) in a point of time or in a course of time and finds various models and estimates of risks (probability of that event occurrence).