search for: inftim

Displaying 4 results from an estimated 4 matches for "inftim".

Did you mean: inftime
2011 Apr 01
2
Cox Proportional Hazards model with a time-varying covariate
...8  33 1 C 3 20 339  24 0 C 3 11   340  12 1 C 3  .   341  27 1 C 4 18 342   2 1 C 4  .   343  -6 0 C 4  .   344 -20 1 C 4  . 345  14 0 C 3  .   346   3 1 C 3  . ")   vitclear <- data.frame(scan(connection, na.strings=".",   list(PAT=0, RSPTIM=0, TRT=0, CENTER="", DENS=0, INFTIM=0)))   #RSPTIM = time (wks) from randomization to response (censored if negative) #TRT    = 1 for Hyalurise, TRT = 0 for Saline #CENTER = study center (A, B, or C) #DENS   = 3, 4 for Grade 3 or 4, respectively #INFTIM = time (wks) from randomization to onset of infection complications   vitclear$ST...
2011 Nov 29
3
Problem in log
Hi all I have a function of log defined by y = log(1- exp(-a)), when exp(-a) is greater, 1, it produce NaN. How can I remove this in R? [[alternative HTML version deleted]]
2011 Nov 16
2
Error in random walk Metroplis-hasting
Hi R community, I have some data set and construct the likelihood as follows likelihood <- function(alpha,beta){ lh<-1 d<-0 p<-0 k<-NULL data<-read.table("epidemic.txt",header = TRUE) attach(data, warn.conflicts = F) k <-which(inftime==1) d <- (sqrt((x-x[k])^2+(y-y[k])^2))^(-beta) p<-1 - exp(-alpha*d) for(i in 1:100){ if(i!=k){ if(inftime[i]==0){ lh<-lh*(1-p[i]) } if(inftime[i]==2){ lh<-lh*p[i] } } } r...
2011 Jun 13
0
Setting up counting process data for survival analysis
...8 33 1 C 3 20 339 24 0 C 3 11 340 12 1 C 3 . 341 27 1 C 4 18 342 2 1 C 4 . 343 -6 0 C 4 . 344 -20 1 C 4 . 345 14 0 C 3 . 346 3 1 C 3 . ") vitclear <- data.frame(scan(connection, na.strings=".", list(PAT=0, RSPTIM=0, TRT=0, CENTER="", DENS=0, INFTIM=0))) head(vitclear) connection <- textConnection(" PAT RSPTIM CENS TRT DENS CENTER T1 T2 INFCTN 101 2 0 1 3 A 0 2 0 101 4 0 1 3 A 2 4 0 101 6 0 1 3 A 4 6 0 101 7 0 1 3 A 6 7 0 101 8 0 1 3 A 7 8 0 101 9 0 1 3 A 8 9 0 101 11 0 1 3 A 9 11 0 101 12 0 1 3 A 11 12 0 101 13 0 1 3 A 12 13 0 101 1...