Search results

  1. gianmarco

    peeling the onion: plotting only the inner 95% of 1000 cumulative frequency curves

    @Dason: thanks indeed for your help, which has been much appreciated. As a token of my good will in trying to solve my problems by myself (at the best of my R programming skills), I am pasting below a sligthly modified version of the function, in which I added the expected CFD and, instead of...
  2. gianmarco

    Matt Whiteny U test Vs T test

    "The permutation test is useful even if we plan to use the two-sample t test. Rather than relying on Normal quantile plots of the two samples and the central limit theorem, we can directly check the Normality of the sampling distribution by looking at the permutation distribution. Permutation...
  3. gianmarco

    Question about chi-square test and single columns

    Apologies if I go back to the very core of your main question, but I do not fully understand the reason why you may want to "modify" the chi-sq test when it actually proves fit to your situation. What I mean is that chi-sq test is meant to test if a significant association exists between the...
  4. gianmarco

    peeling the onion: plotting only the inner 95% of 1000 cumulative frequency curves

    I will try to provide more details and reproducible examples to hopefully get further help. I am going to provide link to two .rtf files; I tried to paste the two datasets here, but there seems to be a 1000 words limitation. I have a set of distances; each value is the distance of a given point...
  5. gianmarco

    peeling the onion: plotting only the inner 95% of 1000 cumulative frequency curves

    Hello @Dason, I went through the code today but I seem I have hard times to adapt it to my situation. Would you mind to help me to sort out things? In particular, where I am stuck is in the first part of your suggested code; what bit(s) of your code would correspond to my observed data, and...
  6. gianmarco

    peeling the onion: plotting only the inner 95% of 1000 cumulative frequency curves

    Dason: thanks for the code. However, I get an error upon running this: lower <- apply(out, 2, quantile, probs = .025) All goes smooth until I hit that line. Any idea? Does it work for you?
  7. gianmarco

    peeling the onion: plotting only the inner 95% of 1000 cumulative frequency curves

    @Dason: thanks for your reply. First of all, I wasn't so clear in my thread when I said about only keeping the middle 95%. In effect, I would like to just leave two curves representing the two "boundaries" (lower and upper) of the envelope. That said, do you have any suggestion as to how to...
  8. gianmarco

    peeling the onion: plotting only the inner 95% of 1000 cumulative frequency curves

    Hello, I am playing around with the function below, which (using the dataset appended further below) produces the attached plot. The functions requires the rgeos and spatstat packages. I put some comments to the code to explain what it is actually going on. To get the plot use: advNNa(springs)...
  9. gianmarco

    Question about chi-square test and single columns

    I do not understand why you want to do that? Do you know in which context chi-sq test is used and which question it actually aims to address?
  10. gianmarco

    testing the association between points and any of the points belonging to another set of point: am I approaching it correctly?

    I come up with the approach on the basis of O'Sallivan-Unwin, "Geographic Information Analysis", 2010, p. 104, who say: Now, my main issue is whether I am right in thinking that, while for equal-sized polygons (quadrats) p=1/x, for unequal-sized polygons p=size of each quadrat relative to the...
  11. gianmarco

    testing the association between points and any of the points belonging to another set of point: am I approaching it correctly?

    Hello, I am trying to put togheter an R function to test if points in a given area tend to occur closer to any point belonging to another set of point, or if they are distributed irrepsective of the distance from the latter. I would like to have some feedback on the method I applied, especially...
  12. gianmarco

    function trows an error at first, but runs smoothly after being copy/pasted

    I think I solved the issue. It seems it was indeed a conflict between packages and related functions. My workaround has been: 1) to make R load first some packages whose functions are used in my function; 2) within my function, specifying the package to which each used function belongs (using...
  13. gianmarco

    function trows an error at first, but runs smoothly after being copy/pasted

    yes, yes, I see. No, it is not on GitHub; I came across the error after adding 2 new functions....
  14. gianmarco

    function trows an error at first, but runs smoothly after being copy/pasted

    Any suggestion on how can I produce that, considering that that would entail making the package available to others here? In other words, how can I share the package here without putting it on GitHub first? You know, my knowledge on those topics is not extensive :-(
  15. gianmarco

    making R computing large factorials

    Thanks Greta. For the time being, I would like to stick with Dason's suggestion and using the pbinom(). So, given the parameters I have cited in the quotation in one of my earlier posts, is the way I am plugging the parameters in correct? pbinom(observed number of points within polygons...
  16. gianmarco

    making R computing large factorials

    @GretaGarbo: just trying to reproduce in R the points-in-polygons test to which I was referring in my first post. See the quoted text and the attached image.
  17. gianmarco

    making R computing large factorials

    Greta, I think I need the cumulative distribution; note what follows (copied from my earlier thread, emphasis mine): So, if I have x events (points), at the best of my (limited) understanding I need the cumulative prob for events from 1 to x.
  18. gianmarco

    function trows an error at first, but runs smoothly after being copy/pasted

    I am building a new version of a package of mine, and I came across a strange behavior of a function. This poped up after I made some change to the code. If I install the package (using, as usual, library(GmAMisc)) and run a function, an error is returned: If I visualize the code, copy and...
  19. gianmarco

    making R computing large factorials

    Thank you for the hint, it looks way simpler! May I ask you to give me some help in adapting that function to to my context? I have made some web search after your suggestion, and I realized that perhaps pbinom() should be used. Now, what I am trying to implement is what follows, which is after...