#The commands below assume that

#? 1) the melanoma data set has been stored ?in the dataframe "melanoma"

#? 2) the survival library has been attached (cf. the R commands to practical exercise 3)

#? 3) the addreg package has been sourced (see under computing for instructions)

 

 

# Fit an additive regression model for gender,

# plot the cumulative regression functions,

# and display a summary (including test statistics):

addreg.mel<- addreg(Surv(lifetime,status==1)~sex, data=melanoma)

plot(addreg.mel)

summary(addreg.mel)

 

# Fit an additive regression model for gender, thickness and ulceration

# plot the cumulative regression functions,? and display a summary:

addreg.mel<- addreg(Surv(lifetime,status==1)~sex+ thickn+ulcer, data=melanoma)

plot(addreg.mel)

summary(addreg.mel)