Hi fellow RMark users,
Is there a ANODEV function in RMark? I'm able to calculate the R-squared but I would like to get the F-statistics and P-values too.
Thanks for all the help.
jlaake wrote:No.
nesmonde wrote:jlaake wrote:No.
How come?
cooch wrote:. In the case of the 'classic' GUI, Gary has also added a number of other features (e.g., simulation tools)...
# get info on model with time-dependent survival
devtime = phitpt$results$lnl
npartime = phitpt$results$npar
# get info on model with constant survival
devct = phipt$results$lnl
nparct = phipt$results$npar
# test each covariate:
stat = rep(NA,12)
df1 = rep(NA,12)
df2 = rep(NA,12)
for (i in 1:12){
name = paste('phix',i,sep="")
devco = get(name)$results$lnl
nparco = get(name)$results$npar
num = (devct - devco)/(nparco-nparct)
den = (devco - devtime)/(npartime-nparco)
stat[i] <- num/den
df1[i] <- nparco-nparct
df2[i] <- npartime-nparco
}
# calculate p-value
pval = 1-pf(stat,df1,df2)
stat # F statistic
df1 # n.df
df2 # d.sf
pval # p-value
Users browsing this forum: No registered users and 1 guest