Displaying 2 results from an estimated 2 matches for "trialnos".
Did you mean:
trialno
2017 Nov 07
0
Survfit when new data has only 1 row of data
...btained from negative binomial, and zero-inflated negative binomial models for the same data (albeit in a different format)
To my mind, and based on what I've read, the best way to do this is to use survfit. I want to make predictions for each individual, therefore, I have tried this code:
trialnos <- unique(bdat5$trialno)
prob0 <- function(ids,dataset,model,time){
probs <- rep(0,length(ids))
for(i in 1:length(ids)){
print(i)
sdata <- subset(dataset,trialno==ids[i])
sfit <- survfit(model,newdata=sdata)
probs[i] <-sum(summary(sfit,time)$surv)
}
return(probs)...
2008 Oct 28
3
Dose Profile
Hi Everyone,
I have data in a long format e.g. there is one row per patient but each
follow-up appointment is included in the row. So, a snippet of the data
looks like this:
TrialNo Drug Sex Rand Adate1 Date1 Dose1 Time1 Adate2 Date2 Dose2
Time2 B1001029 LTG M 15719 30/04/2003 15825 150 106 29/08/2003 15946 200
227 B1117003 LTG M 15734 30/04/2003 15825 200 91 03/09/2003 15951 250 217