similar to: what is the difference between survival analysis and logistic regression with a timing variable?

Displaying 20 results from an estimated 7000 matches similar to: "what is the difference between survival analysis and logistic regression with a timing variable?"

2006 May 01
3
RMagick question ?
I have a file rmg.rb: require ''RMagick'' include Magick cat = ImageList.new("prod.jpg") cat.display exit The file prod.jpg is in the same directory as this file above. I execute the following: ruby rmg.rb I get the following output: /usr/lib/ruby/1.8/RMagick.rb:1377:in `read'': unable to open image `'': No such file or directory:
2006 Apr 21
3
how to control the data type
Hello: I am generating a random number with rnorm(1). The generated number has 8 decimals. I don't want so many decimals. How to control the number of decimals in R? Thanks! Zhongmiao Wang
2010 Feb 02
2
Yield to Maturity using R
Dear R helpers,     Yesterday I had raised following query which was addressed by Mr Ellison. The query and the wonderful solution as provided by Mr. Ellison are as given below.    ## PROBLEM   I am calculating the 'Yield to Maturity' for the Bond with following characteristics.    Its a $1000 face value, 3 year bond with 10% annual coupon and is priced at 101. The yield to maturity can be
2006 Apr 20
1
A question about nlme
Hello, I have used nlme to fit a model, the R syntax is like fmla0<-as.formula(paste("~",paste(colnames(ldata[,9:13]),collapse="+"),"-1")) > fmla1<-as.formula(paste("~",paste(colnames(ldata[,14:18]),collapse="+"),"-1")) >
2016 Apr 19
2
Interquartile Range
Hi, I am trying to show an interquartile range while grouping values using the function ddply(). So my function call now is like groupedAll <- ddply(data ,~groupColumn ,summarise ,col1_mean=mean(col1) ,col2_mode=Mode(col2) #Function I wrote for getting the mode shown below
2016 Apr 19
0
Interquartile Range
Hi Michael, At a guess, try this: iqr<-function(x) { return(paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-") } .col3_Range=iqr(datat$tenure) Jim On Tue, Apr 19, 2016 at 11:15 AM, Michael Artz <michaeleartz at gmail.com> wrote: > Hi, > I am trying to show an interquartile range while grouping values using > the function ddply(). So my function
2016 Apr 19
5
Interquartile Range
That didn't work Jim! Thanks anyway On Mon, Apr 18, 2016 at 9:02 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Michael, > At a guess, try this: > > iqr<-function(x) { > return(paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-") > } > > .col3_Range=iqr(datat$tenure) > > Jim > > > > On Tue, Apr 19, 2016 at
2016 Apr 19
0
Interquartile Range
> That didn't work Jim! It always helps to say how the suggestion did not work. Jim's function had a typo in it - was that the problem? Or did you not change the call to ddply to use that function. Here is something that might "work" for you: library(plyr) data <- data.frame(groupColumn=rep(1:5,1:5), col1=2^(0:14)) myIqr <- function(x) {
2016 Apr 19
0
Interquartile Range
Are you aware that there *already is* a function that does this? ?IQR (also your "function" iqr" is just a character string and would have to be parsed and evaluated to become a function. But this is a TERRIBLE way to do things in R as it completely circumvents R's central functional programming paradigm). Cheers, Bert Bert Gunter "The trouble with having an open mind
2016 Apr 19
1
Interquartile Range
HI that did not work for me either. The value I got returned from that function was "<rounded mean> - <rounded mean>" :(. thanks for the reply through On Tue, Apr 19, 2016 at 10:34 AM, William Dunlap <wdunlap at tibco.com> wrote: > > That didn't work Jim! > > It always helps to say how the suggestion did not work. Jim's > function had a typo
2016 Apr 19
2
Interquartile Range
To be precise: paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-") is an expression that evaluates to a character string: "round(quantile(x,.25),0) - round(quantile(x,0.75),0)" no matter what the argument of your function, x. Hence return(paste(...)) will return this exact character string and never evaluates x. Cheers, Bert Bert Gunter "The
2016 Apr 19
0
Interquartile Range
NO NO -- I am wrong! The paste() expression is of course evaluated. It's just that a character string is returned of the form "something - something". I apologize for the confusion. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County"
2016 Apr 19
2
Interquartile Range
... and I'm getting another cup of coffee... -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Tue, Apr 19, 2016 at 10:30 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > NO NO -- I am wrong! The paste() expression is
2016 Apr 19
0
Interquartile Range
Oh thanks for that clarification Bert! Hope you enjoyed your coffee! I ended up just using the transform argument in the ddply function. It worked and it repeated, then I called a mode function in another call to ddply that summarised. Kinda hacky but oh well! On Tue, Apr 19, 2016 at 12:31 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > ... and I'm getting another cup of
2016 Apr 19
2
Interquartile Range
If you show us, not just tell us about, a self-contained example someone might show you a non-hacky way of getting the job done. (I don't see an argument to plyr::ddply called 'transform'.) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Apr 19, 2016 at 12:18 PM, Michael Artz <michaeleartz at gmail.com> wrote: > Oh thanks for that clarification Bert! Hope you enjoyed
2016 Apr 19
0
Interquartile Range
Hi, Here is what I am doing notGroupedAll <- ddply(data ,~groupColumn ,summarise ,col1_mean=mean(col1) ,col2_mode=Mode(col2) #Function I wrote for getting the mode shown below ,col3_Range=myIqr(col3) ) groupedAll <- ddply(data ,~groupColumn ,summarise
2016 Apr 20
2
Interquartile Range
Well, instead of your functions try: Mode <- function(x) { tabx <- table(x) tabx[which.max(tabx)] } and use R's IQR function instead of yours. ... so I still don't get why you want to return a character string instead of a value for the IQR; and the mode of a sample defined as above is generally a bad estimator of the mode of the distribution. To say more than that would
2016 Apr 20
0
Interquartile Range
Hi, Jumping into this thread mainly on the point of the mode of the distribution, while also supporting Bert's comments below on theory. If the vector 'x' that is being passed to this function is an integer vector, then a tabulation of the integers can yield a 'mode', presuming of course that there is only one unique mode. You may have to decide how you want to handle a
2016 Apr 20
2
Interquartile Range
Again, IQR returns two both a .25 and a .75 value and it failed, which is why I didn't use it before. Also, the first function just returns tha same value repeating. Since they are the same, before the second call, using the mode function is just a way to grab one value. I could have used average, min, max, they all would have returned the same thing. Mike On Tue, Apr 19, 2016 at 7:24 PM,
2017 Apr 07
3
Widescale clang-tidy (or similar) based cleanup
There have been some efforts recently to use clang-tidy or similar automated refactoring to make project-wide cleanups/improvements to the LLVM codebase that appear to me to be a bit out of character with the sort of changes & philosophies that have been applied in the past. I think there are a few issues at hand which I'll try to summarize: * Churn/blame-convenience: Previously, large