Re: [R] Plotting Coxph model with an interaction.

2021-05-20 Thread Gerrit Eichner
Hi, John, it should work the same way as without interaction (but make sure to use the fitted object "coxfit", not just "fit" in our call of survfit, and note that age*rx already expands to age + rx + age:rx so that age + rx is redundant in your formula): coxfit <- coxph(Surv(futime, fustat) ~ a

Re: [R] Plotting Coxph model with an interaction.

2021-05-20 Thread Bert Gunter
Perhaps this might be useful: https://rpubs.com/tf_peterson/interactionplotDemo 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 Thu, May 20, 2021 at 10:29 AM S

[R] Plotting Coxph model with an interaction.

2021-05-20 Thread Sorkin, John
Colleagues, I hope someone can tell me how to plot a cox model that contains an interaction term. I know that plot(survfit(. . . . )) can be used to plot a Cox model, i.e.. coxfit <- coxph(Surv(futime, fustat) ~ age+rx, data = ovarian) plot(survfit(fit, newdata=data.frame(age=60,rx=2))) but

[R] Error in identifying correlated metrics

2021-05-20 Thread Neha gupta
Hello everyone While I am working to identify the correlated metrics on my data, I am getting the following error? My data has no missing or Inf values as all other operations (model training etc) could be done without any errors. Error in hclust(as.dist(1 - abs(cor(data, method = cor_method))),

Re: [R] Incomplete violin chart representation

2021-05-20 Thread Mahmood Naderan-Tahan
Yes it seems that it need more than 2 points to create the shape. Thanks Regards, Mahmood From: Kevin Thorpe Sent: Thursday, May 20, 2021 1:38:32 PM To: Mahmood Naderan-Tahan Cc: R Help Mailing List Subject: Re: [R] Incomplete violin chart representation My gu

Re: [R] Incomplete violin chart representation

2021-05-20 Thread Kevin Thorpe
My guess would be there are only 2 observations contributing to that third plot, which is probably not enough to show anything else. -- Kevin E. Thorpe Head of Biostatistics, Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana S

[R] Incomplete violin chart representation

2021-05-20 Thread Mahmood Naderan-Tahan
Hi I use the following command to create a violin chart p <- ggplot(mydata, aes(x=BENCH, y=V)) + geom_violin(trim=FALSE) + geom_dotplot(binaxis='y', stackdir='center', dotsize=0.6) + scale_y_continuous(trans = scales::pseudo_log_trans(base = exp(1))) However, in the output one of them are

Re: [R] Help in modifying code to extract data from url

2021-05-20 Thread Jim Lemon
Hi Bhaskar, If you are using read.table or similar, see the "fill=" argument. Jim On Thu, May 20, 2021 at 9:54 AM Bhaskar Mitra wrote: > > Hello Everyone, > > I am trying to extract data from a url. The codes work well when the > data structure is as follows: > > X Y > 1 2 > 1 5 > 1 6 > 1 7 > 3

[R] [Rd] R 4.1.0 is released

2021-05-20 Thread Peter Dalgaard
The build system rolled up R-4.1.0.tar.gz (codename "Camp Pontanezen") this morning. This is a major update, notably containing the new native pipe operator "|>" and shorthand inline functions "\(x) x+1". The list below details the changes in this release. You can get the source code from