search for: ppoint

Displaying 20 results from an estimated 81 matches for "ppoint".

Did you mean: point
1998 Sep 03
2
ppoints
When I look at ppoints I see: ppoints<-function (x) { n <- length(x) if (n == 1) n <- x (1:n - 0.5)/n } However Venables & Ripley (2nd ed, p 165) say ppoints() should return (i-1/2)/n for n>=11; (i-3/8)/(n+1/4) for n<=10. The version below should work as described: ppoints<-function (x) { n...
2005 Jan 19
1
ppoints (PR#7538)
Dear r-bugs, Whilst playing with ppoints I discovered that when one uses it directly, occasional NA's in a vector also become data fractions: ppoints(c(1,2,NA,4)) Would it be a good idea to add a warning message as in: ppoints <- function (n, a = ifelse(n <= 10, 3/8, 1/2)) { if(any(is.na(n))) warning("'n' c...
2000 Dec 11
1
qqline (PR#764)
I think qqline does not do exactly what it is advertised to do ("`qqline' adds a line to a normal quantile-quantile plot which passes through the first and third quartiles."). Consider the graph: tmp <- qnorm(ppoints(10)) qqnorm(tmp) qqline(tmp) The line (which I expected go through all the points), has a slightly shallower slope than does the points plotted by qqnorm. I think the problem is that qqline bases its line on the relationship between the quartiles in the data and the large sample expected quartil...
2008 Sep 15
0
how to calculate PPCC?
...is the probability function that best fits a set of data. I wrote them based in this response: /http://tolstoy.newcastle.edu.au/R/help/03b/1714.html/ I extracted the relevant segment of the link above: //> PPCC <- function(shape, scale, x) { # only for weibull / + x <- sort(x) + pp <- ppoints(x) + cor( qweibull(pp, shape=shape, scale=scale), x)} / I clearly read, "/only for weibull"/ however I wrote similar functions for /normal, exponential, poisson, and lognormal. / Could someone says me if these functions are correct? Are there other ways to estimate the correlation coe...
2004 Aug 23
0
you won't be disa~ppointed!
Es dknet1 stringreduction qkang I tried to be thin while I failed still.Though I make myself believe every kind of weight-loss meds and bvy them,they just don't work at all.Before I was disappointed and wanted to give up,this site came to me and saved me from terrible ---Linda WT Syr Juox http://p.jn.sublunary1132nx.com/f74m/ Experience had given him implicit confidence in the powers of the electrical instrument whose unseen forces carried him so swiftly and surely, and while the tiny,...
2012 May 11
1
identify() doesn't return "true" numbers
...ntify(X)) invisisble(X) } qqplot.mv.interactive <- function (data, xlim=NULL, ylim=NULL) { x <- as.matrix(data) # n x p numeric matrix center <- colMeans(x) # centroid n <- nrow(x); p <- ncol(x); cov <- cov(x); d <- mahalanobis(x,center,cov) # distances qqInteractive(qchisq(ppoints(n),df=p),d, # ppoints(n) makes a sequence from 0 to 1. with stepsize 1/n main="QQ Plot Assessing Multivariate Normality", # qchisq() makes a chi squared distribution function for the given probabilities in ppoints(n) and degress of freedom df ylab="M...
2007 Jun 19
2
Function -return value
...two parameters in parab. parameter <- function(v) { v1 <- v[v>mean(v)+0.5*sd(v)] v2 <- v[v<mean(v)-0.5*sd(v)] alpha=min(v1) beta=max(v2) para <- fitgpd(v1,alpha, method="pwmu")$param parab <- fitgpd((-v2), (-beta), method="pwmu")$param v1.fit <- qgpd(ppoints(v1, a=0.5), alpha, para[1], para[2]) v2.fit <- qgpd(ppoints((-v2), a=0.5), (-beta), para[1], para[2]) alpha beta para parab } tapply(variable, list(a, b),parameter) I would be grateful if anyone can give me some advice. Many thanks -- View this message in context: http://www.nabble.com/Fun...
2006 Apr 13
2
Plotting positions in qqnorm?
Do you know of a reference that discusses alternative choices for plotting positions for a normal probability plot? The documentation for qqnorm says it calls ppoints, which returns qnorm((1:m-a)/(m+1-2*a)) with "a" = ifelse(n<=10, 3/8, 1/2)? The help pages for qqnorm and ppoints just refer to Becker, Chambers and Wilks (1988) The New S Language (Wadsworth & Brooks/Cole), and I couldn't find any discussion of this. I seem to recall...
2006 Mar 02
2
Bug/Wishlist: 'partial' in 'sort' and 'quantile' (PR#8650)
Hi, This is essentially a reposting of http://tolstoy.newcastle.edu.au/R/devel/05/11/3305.html which had no responses, and the behaviour reported there persists in r-devel as of yesterday. (1) sort() with non-null partial > x = rnorm(100000) > keep = as.integer(ppoints(10000) * 100000) > system.time(sort(x)) [1] 0.05 0.00 0.04 0.00 0.00 > system.time(sort(x, partial = keep)) [1] 52.04 0.02 52.08 0.00 0.00 This is perhaps not strictly a bug, but taking approximately 1000 times longer to do a subset of the work seems pointless at best. (2) quantile.defa...
1999 Aug 31
1
Suggestion for qqplot() improvement
...o datasets of *different* length, rather than anything else) WSt> I would prefer WSt> n <- length(y) WSt> qqplot(qt((1:n)/(n+1), df=5), y, xlab='quantiles', ylab='data') yes, for comparison with a theoretical distribution. Maybe even qqplot(qt(ppoints(n), df=5), y, xlab='quantiles of t(* ,df=5)', ylab='data') WSt> and this could be shortened to WSt> qqplot(y, distribution='t', df=5) WSt> with an easy extension of the function. I found: Trellis in S-plus has qqmath(formula, distr...
2009 Mar 11
1
Ggplot2: saving a grid with multiple plots
...e a figure on the screen with multiple plots in it. Something like the example below. When I save that with ggsave(), only the last plot gets saved (pPath in the example) instead of the entire figure. Any suggestions how I can save this kind of figures automated? Thanks, Thierry library(ggplot2) pPoint <- qplot(unemploy/pop, psavert, data=economics) pPath <- qplot(unemploy/pop, psavert, data=economics, geom="path") grid.newpage() pushViewport(viewport(layout = grid.layout(2, 1))) print(pPoint, vp = viewport(layout.pos.row = 1, layout.pos.col = 1)) print(pPath, vp = viewport(layout...
2007 Feb 08
1
the plotting position of theoretical quantile for qqnorm
Hello, I have a doubt about the plotting position of the theoretical quantile for the qqnorm command in R. Let F be the theoretical distribution of Y, we observed a sample of size n, y1,y2, ..., yn. We then sort it and comspare these empirical quantiles to the expected ones from F. For the plotting poition, there are several options: 1. i/(n+1) 2. (i-.375)/(n+.25) 3. (i- .3175)/ (n + .365) etc.
2009 Jul 01
0
The step before interfacing to GRASS
Dear all, A very basic terrain calculated as a matrix from Spatial Points Patterns: #interpolate using the akima package library(akima) terrain=interp(ppoints$x,ppoints$y,ppoints$marks,xo=x0,yo=y0, linear=F) > class(terrain) [1] "list" > class(terrain$x) #these are the x-coord i.e: [1...1000] [1] "numeric" > class(terrain$y)#these are the y-coord i.e: [1...1000] [1] "numeric" > class(terrain$z)#these are the he...
2001 Jul 02
2
Shapiro-Wilk test
Hi, does the shapiro wilk test in R-1.3.0 work correctly? Maybe it does, but can anybody tell me why the following sample doesn't give "W = 1" and "p-value = 1": R> x<-1:9/10;x [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 R> shapiro.test(qnorm(x)) Shapiro-Wilk normality test data: qnorm(x) W = 0.9925, p-value = 0.9986 I can't imagine a sample being
2007 Jun 09
1
What ECDF function?
...e ((1:n)-0.5)/n After investigation I found there're different definition of ECDF (note "i" is the rank): * Kaplan-Meier: i/n * modified Kaplan-Meier: (i-0.5)/n * Median Rank: (i-0.3)/(n+0.4) * Herd Johnson i/(n+1) * ... Furthermore, similar expressions are used by "ppoints". So, 2.1 For P-P plot, what shall I use? 2.2 In general why should I prefer one kind of CDF over another one? (Note: this issue might also apply to Q-Q plot, infact qqnorm use ppoints instead of ecdf) Thank you very much!! Sincerely, -- Marco
2003 Aug 06
1
probability plot correlation coefficient
As a newbie to R, I'm still rather at a loss for finding information (the commands names can be rather arcane)so I'm just posting my question: I would like to estimate the shape coefficient of diverse distributions (Weibull, gamma and Tukey-Lambda specifically, but other could be of interest) - Does R have a PPCC utility to estimate such parameter?(maximum value of correlation coef)
2009 Sep 17
2
QQ plotting of various distributions...
...fferences. First two are trivial: qqnorm(dat$X) qqnorm(log(dat$X)) Then, things are getting more "hairy". I am not sure how to make plots for the rest. I tried gamma with: qqmath(~ X, data=dat, distribution=function(X) qgamma(X, shape, scale)) Which should be the same as: plot(qgamma(ppoints(dat$X), shape, scale), sort(dat$X)) Shape and scale parameters I got via mhsmm package that has gammafit() for shape and scale parameters estimation. Am I on right track? Does anyone know how to plot the rest: ex-Gaussian (exponential-Gaussian), Wald (inverse Gaussian)? Thanks, PM
2002 Jan 08
0
chi square and mahalanobis
.... Each measure is the outcome of a nuclear magnetic resonance experiment, so each of the 169 points has the same unit. As I want to do some multivariate calibration using these data, I checked whether some multivariate outliers existed. I calculated Mahalanobis distances and did a qqplot(qchisq(ppoints(382),169),XMaha) where XMaha contained my Mahalanobis distances. The points on my QQ plot were nicely aligned onto a y=x line, so no outliers. For some reasons I need to scale my data set so as that each measure has the same initial point, i.e. the first point of each measure must be 1. To be c...
2003 Jul 18
2
Probability plotting with R
Hello, Our professor asked us to do probability plotting using weibull paper, exponential paper, normal, log-normal paper, etc. I know I can create Q-Q plot for normal dist. and see if all te points are on one line. How do I go about other distributions? I tried generating different samples and use the general qq function. However, I could not do it since I don't know the population
2004 Apr 06
2
percentile-percentile plot
Hi, Is there a function that does percentile-percentile plot. I do not mean the qqplot. I need to plot the percentiles rather than points themselves. I am hoping for a plot that tells me that the x percentile of one data set corresponds to the y percentile of the other. for example a point on the plot of (.5, .2) will tell me that the 50th percentile of the first data and the 20th percentile of