Re: [R] how to combine uncertainty and weighting in spearman correlation?

2020-06-21 Thread Abby Spurdle
I need to fix my mistakes, from earlier this morning. The sums should be over densities, so: fh (X, Y) = [fh1 (X1, X1) + fh2 (X2, Y2) + ... + fhn (Xn, Yn)] / n fh (X, Y) = w1*fh1 (X1, X1) + w2*fh2 (X2, Y2) + ... + wn*fhn (Xn, Yn) assuming the weights sum to 1 If simulated data is used, then

Re: [R] how to combine uncertainty and weighting in spearman correlation?

2020-06-21 Thread Abby Spurdle
Just realised the above notation may be a bit misleading. Because I was thinking in terms of simulated data. On Mon, Jun 22, 2020 at 10:00 AM Abby Spurdle wrote: > > Hi Frederick, > > I glanced at the webpage you've linked. > (But only the top three snippets). > > This is what I would call the s

Re: [R] how to combine uncertainty and weighting in spearman correlation?

2020-06-21 Thread Abby Spurdle
Hi Frederick, I glanced at the webpage you've linked. (But only the top three snippets). This is what I would call the sum of random variables. (X, Y) = (X1, X1) + (X2, Y2) + ... + (Xn, Yn) The example makes the mistake of assuming that the Xs are normally distributed, and each of the Ys are fro

Re: [R] chaining closure arguments on-the-fly

2020-06-21 Thread Duncan Murdoch
On 21/06/2020 11:37 a.m., Benjamin Tyner wrote: On 6/20/20 5:04 PM, Duncan Murdoch wrote: I think you effectively did that in your original post (all but encapsulating the expression in a function), so yes, it's possible. However, it's a really bad idea.  Why use non-standard evaluation when sta

Re: [R] Load svg, eps or png into graphics device?

2020-06-21 Thread Paul Murrell
Hi Do you mean you want to reduce *system requirements* ? I'm not sure you have many options. Looking at the plantuml output format options, there is ... png via 'png', which requires libpng svg via 'grImport2', which requires 'rsvg', which requires librsvg2 eps via 'grImport', which requir

Re: [R] Error in "plot(aov.object)" after upgradation to R-4.0.0 and R-4.0.1 for given R-Script-Example

2020-06-21 Thread Akhilesh Singh
Dear Peter, Thanks for your reply, and pointing out my mistake of misspelling in 'Permanganate' variable. However, it couldn't be detected because the same code, with misspelled variable at factor declaration level, ran successful ly till I upgraded to R-4.0.0 and later to R-0.1. I am sure the b

Re: [R] chaining closure arguments on-the-fly

2020-06-21 Thread Benjamin Tyner
On 6/20/20 5:04 PM, Duncan Murdoch wrote: I think you effectively did that in your original post (all but encapsulating the expression in a function), so yes, it's possible. However, it's a really bad idea.  Why use non-standard evaluation when standard evaluation is fine?  Standard evaluation

[R] how to combine uncertainty and weighting in spearman correlation?

2020-06-21 Thread Frederik Feys
Hello everyone At the moment I put a lot of attention in the uncertainty of my analyzes. I want to do a spearman correlation that takes into account the uncertainty in my observations and has weighting. uncertainty of observations: I came across this excellent blog that proposes a bootstrap fu

Re: [R] Error in "plot(aov.object)" after upgradation to R-4.0.0 and R-4.0.1 for given R-Script-Example

2020-06-21 Thread peter dalgaard
This is fallout from the stringsAsFactors changes. You have 'Permanganate' as a character vector and it runs afoul of this code aterms <- attributes(terms(x)) dcl <- aterms$dataClasses[-aterms$response] facvars <- names(dcl)[dcl %in% c("factor", "ordered")] which does not include 'Pe