Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread PIKAL Petr
Hallo Bernard I did not follow all emails in this thread but it seems to me that your request is similar to Bioconductor packages dealing with Flow Cytometry data. Especially flowViz package is designed to visualise such data. Cheers Petr > -Original Message- > From: R-help On Behalf

Re: [R] aggregate output to data frame

2019-03-27 Thread Jim Lemon
Hi Cyrus, Try this: pcr<-data.frame(Ct=runif(66,10,20),Gene=rep(LETTERS[1:22],3), Type=rep(c("Std","Unkn"),33),Rep=rep(1:3,each=22)) testagg<-aggregate(pcr$Ct,c(pcr["Gene"],pcr["Type"],pcr["Rep"]), FUN=function(x){c(mean(x), sd(x), sd(x)/sqrt(sd(x)))}) nxcol<-dim(testagg$x)[2] newxs<-paste("x",1

[R] aggregate output to data frame

2019-03-27 Thread cir p via R-help
Dear users, i am trying to summarize data using "aggregate" with the following command: aggregate(pcr$Ct,c(pcr["Gene"],pcr["Type"],pcr["Rep"]),FUN=function(x){c(mean(x), sd(x), sd(x)/sqrt(sd(x)))}) and the structure of the resulting data frame is 'data.frame':66 obs. of  4 variables: $ Gen

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Jeff Newmiller
https://cran.r-project.org/web/views/Multivariate.html https://cran.r-project.org/web/views/ On March 27, 2019 4:05:31 PM PDT, Bernard Comcast wrote: >No - how do I access that? > >Bernard >Sent from my iPhone so please excuse the spelling!" > >> On Mar 27, 2019, at 6:57 PM, Jeff Newmiller > wr

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread peter dalgaard
You might be wishing for a contour plot of the density, labeled by the probability mass outside of each contour, but there is no general simple connection between density contours and the mass inside of them. You can work it out (I think) for elliptically contoured distributions, but I suspect t

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Bernard Comcast
No - how do I access that? Bernard Sent from my iPhone so please excuse the spelling!" > On Mar 27, 2019, at 6:57 PM, Jeff Newmiller wrote: > > I don't know. Have you looked at the Multivariate Task View? > >> On March 27, 2019 3:43:52 PM PDT, Bernard Comcast >> wrote: >> To follow on Jeff,

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Jeff Newmiller
I don't know. Have you looked at the Multivariate Task View? On March 27, 2019 3:43:52 PM PDT, Bernard Comcast wrote: >To follow on Jeff, is there a function to do 2-D (double) numerical >integration in R? > >Bernard >Sent from my iPhone so please excuse the spelling!" > >> On Mar 27, 2019, at 6

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Bernard Comcast
To follow on Jeff, is there a function to do 2-D (double) numerical integration in R? Bernard Sent from my iPhone so please excuse the spelling!" > On Mar 27, 2019, at 6:38 PM, Jeff Newmiller wrote: > > Regardless of how many dimensions you have for independent variables, the > density is one

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Jeff Newmiller
Regardless of how many dimensions you have for independent variables, the density is one-dimensional, and if you assume the density function has been determined (e.g. by kernel estimation or by a Gaussian copula) then if you integrate the density function along that dimension there will be uniqu

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Bernard Comcast
That thought had crossed my mind so thanks for that clarification Bert. i think you are correct and so the plot I am looking at must be doing something different than I was thinking. Thanks Bernard Sent from my iPhone so please excuse the spelling!" > On Mar 27, 2019, at 5:18 PM, Bert Gunter

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Bert Gunter
You are missing a crucial point. The reals are well ordered; higher dimensions are not. Therefore 2d quantile contours are not unique. Of course assuming I understand your query correctly. Bert On Wed, Mar 27, 2019, 13:55 Bernard McGarvey wrote: > If I understand correctly the ContourLines fu

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Bernard McGarvey
If I understand correctly the ContourLines function gives you the contour lines when you put in the data. But before this I need to data to put into that function. I think this is something like a 2D CDF of the data that then leads to the 2D quantiles but I am not 100% sure. What I am basically

Re: [R] [FORGED] Re: Quantile Density Contours

2019-03-27 Thread Paul Murrell
Are you looking for the contourLines() function ? Paul On 28/03/19 8:37 AM, Bernard McGarvey wrote: John, I have attached a pdf of the plot. Hopefully you can read this. If I understand correctly, this plot is basically the 2-D version of the 1-D quantile plot. Thanks Bernard McGarvey D

Re: [R] Quantile Density Contours

2019-03-27 Thread Bernard McGarvey
John, I have attached a pdf of the plot. Hopefully you can read this. If I understand correctly, this plot is basically the 2-D version of the 1-D quantile plot. Thanks Bernard McGarvey Director, Fort Myers Beach Lions Foundation, Inc. Retired (Lilly Engineering Fellow). > On March 27, 20

Re: [R] ref.df in mgcv gam

2019-03-27 Thread Susan Elias
Thank you, Dr. Wood, that is very helpful. Best, Susan On Wed, Mar 27, 2019 at 12:10 PM Simon Wood wrote: > These are a bit of a throwback really, and are not very useful - they > are reference degrees of freedom used in computing test statistic and > the p-values, but since the null distribu

Re: [R] ref.df in mgcv gam

2019-03-27 Thread Simon Wood
These are a bit of a throwback really, and are not very useful - they are reference degrees of freedom used in computing test statistic and the p-values, but since the null distributions are non-standard the reference DoF is not very interpretable. best, Simon On 27/03/2019 13:58, Susan Elia

[R] ref.df in mgcv gam

2019-03-27 Thread Susan Elias
Hello Group. Regarding degrees of freedom in GAM models fit by mgcv, I do understand the estimated df, but what does "ref.df" in the summary output mean? I didn't see an explanation in Wood (2017) or find it in the function code. The answer may be on page 222 of Wood SN. On p-values for smooth

Re: [R] Quantile Density Contours

2019-03-27 Thread John Kane
The figure did not get through. Perhaps try a pdf? On Tue, 26 Mar 2019 at 13:41, Bernard McGarvey wrote: > > I want to see if I can reproduce the plot below in R. If I understand it > correctly, i takes my bivariate data and creates quantile density contours. > My interpretation of these conto