Displaying 4 results from an estimated 4 matches for "ageb".
Did you mean:
age
2016 Apr 21
0
Data reshaping with conditions
...sB<-count_ind[as.logical(match(svdatstr[row,type_ind],"B",0))]
svdatstr[row,"maxB"]<-max(svdatstr[row,indicesB])
AltB<-svdatstr[row,indicesA][svdatstr[row,indicesA]<svdatstr[row,"maxB"]]
svdatstr[row,"x"]<-paste(AltB,collapse=",")
AgeB<-svdatstr[row,indicesA][svdatstr[row,indicesA]>=svdatstr[row,"maxB"]]
svdatstr[row,"y"]<-paste(AgeB,collapse=",")
}
svdatstr[,c("id","name","maxB","x","y")]
Jim
On Thu, Apr 21, 2016 at 2:23 PM, sri vathsan...
2009 Jun 25
2
crr - computationally singular
...gna,eega,th1a,th2a,stype1a,stype2a,stype3a,pgu1a,pgu2a,log(agea),firstinta/1000,totsezbasea)
> fita <- crr(snearma$with.Withtime,csaea,covaea,failcode=2,cencode=0)
and in case b:
> covaeb <- cbind(sexb,fshb,fdrb,nsignb,eegb,th1b,th2b,stype1b,stype2b,stype3b,stype4b,stype5b,pgu1b,pgu2b,(ageb/10)^(-1),firstintb,log(totsezbaseb))
> fitb <- crr(snearmb$with.Withtime,csaeb,covaeb,failcode=2,cencode=0)
csaea and csaeb are the censoring indicators for a and b respectively
which equal 1 for the event of interest, 2 for the competing risks
event and 0 otherwise.
Can anyone suggest a re...
2016 Apr 21
2
Data reshaping with conditions
Hi Jim,
Thanks for your time. But somehow this code did not help me to achieve my
expected output.
Problems: 1) x, y are coming as logical rather than values as I mentioned
in my post
2) The values that I get for Max A and Max B not correct
3) It looks like a pretty big data, but I just need to
concatenate the values with a comma, the final output will be a character
2016 Apr 20
0
Data reshaping with conditions
Hi sri,
As your problem involves a few logical steps, I found it easier to
approach it in a stepwise way. Perhaps there are more elegant ways to
accomplish this.
svdat<-read.table(text="Count id name type
117 335 sally A
19 335 sally A
167 335 sally B
18 340 susan A
56 340 susan A
22 340 susan B
53 340 susan B
135 351 lee A
114 351 lee A
84 351 lee A
80 351 lee A
19 351 lee A
8 351 lee A