similar to: Question about summing to zero

Displaying 20 results from an estimated 9000 matches similar to: "Question about summing to zero"

2012 Mar 01
4
problem with sum function
Hi! I'm running R version 2.13.0 (2011-04-13) Platform: i386-pc-mingw32/i386 (32-bit) When i type in the command: sum(c(-0.2, 0.8, 0.8, -3.2, 1.8)) R returns the value: -5.551115e-17 Why doesn't R return zero in this case? There shouldn't be any rounding error in a simple sum. Thanks, Mark
2006 Jan 12
0
bug in qr.coef() and (therefore) in qr.solve (PR#8476)
[I thought I'd submitted this bug report some time ago, but it's never showed up on the bug tracking system, so I'm submitting again.] qr.solve() gives incorrect results when dealing with complex matrices or with qr objects that have been computed with LAPACK=TRUE, whenever the b argument has more than one column. This bug flows from qr.coef(), which has a similar problem. I believe
2010 Oct 27
1
return NA instead zero when summing over an empty range?
Dear R users, the colSums function from the base package returns zero if there are no values in a range to be summed over (after removing missing values with na.rm = TRUE). Is there some way to make it return NA in that case just like colMeans does? Or any other function or some good way to achieve that? Any ideas are be welcome. Regards, Martin Ivanov
2012 Feb 10
1
making multiple lines using qqplot
Hi Everyone, I want to make 3 lines on the same graph (not as subplots, all in the same window, one on top of each other) and I want them to be quantile-quantile plots (qqplot). Essentially, I am looking for the equivalent of Matlab's "hold on" command to use with qqplot. I know I can use 'points' or 'lines', but these do not give me a qqplot (only appear to work
2003 Apr 29
4
thick plot lines
Dear People, In a qqplot I am doing, I get lines/points that are very thick. I've tried setting the lwd variable to 0.1, but it doesn't seem to have any effect. Also, I have set the value of lty to dashed, but I still get dots. The command looks like qqplot(cdf.inv(seq(0,1,length=size),theta,pos,len),empmargdistvec(len,theta,pos,size), xlim=c(-theta,theta), ylim=c(-theta,theta),
2009 Nov 02
7
qqplot
Hi, We could use qqplot to see how two distributions are different from each other. To show better how they are different (departs from the straight line), how is it possible to plot the straight line that goes through them? I am looking for some thing like qqline for qqnorm. I thought of abline but how to determine the slope and intercept? Best wishes, Carol
2010 Jun 24
4
Simple qqplot question
I am a beginner in R, so please don't step on me if this is too simple. I have two data sets datax and datay for which I created a qqplot qqplot(datax,datay) but now I want a line that indicates the perfect match so that I can see how much the plot diverts from the ideal. This ideal however is not normal, so I think qqnorm and qqline cannot be applied. Perhaps you can help? Ralf
2010 Feb 16
1
OT: computing percentage changes with negative and zero values?
Dear all I need to compute percentage changes of my data, but unfortunately they contain both negative and zero values, and I am quite confused on how to proceed. Searching the internet I found that many people ran into similar issues, with no obvious solution available. The last couple of weeks I've been playing with all the data transformations that I could think of. Below I will expose on
2006 Feb 06
2
qqplot
Hello, I would like to use qqplot() to compare two experimental distributions. But I do not understand how qqplot() compute quantiles. In fact, quantile() do not return the same results. Thank you for your help. Vincent.
1999 Aug 31
1
Suggestion for qqplot() improvement
>>>>> On Tue, 31 Aug 1999 14:57, Werner Stahel <stahel@stat.math.ethz.ch> said: WSt> Here is a suggestion. It seems that qqplots, comparing a sample WSt> to a distribution other than the normal, are not explicitly WSt> available in S or R. I found (in S-plus / Trellis it is, see below) WSt> qqplot(y, rt(300, df = 5)) WSt> as an
2011 Mar 25
1
multiple plots with QQplot of PerformanceAnalytics
Hi All, I am trying to plot 4 graphs on to 1 page using layout(...), or par(mfcol = c(...)); with the function QQplot from the package PerformanceAnalytics. The problem is that, no matter what order I use, it only plots 3 graphs on to 1 page and the last QQplot is shunted to the next page. Also, this only happens to the QQplot, i.e. there is no problem with 4 Histograms. set.seed(1033) data
2009 Feb 08
2
how to make this qq plot in lattice and/or ggplot2
Hi Group, Here is some data. p <- runif(1000) # sample data groups <- rep(c(1,2),each=500) #conditioning variable mydata <- cbind(p,groups) n <- length(p) u <- (1:n)/(n + 1) # uniform distribution reference for qqplot logp <- -log(p,base=10) logu <- -log(u,base=10) qqplot(logp,logu) How can I make the above qqplot in lattice and/or ggplot2. The sample is uniform, and I take
2001 Jan 05
1
pairs(NxK_Matrix,panel=qqplot) (PR#803)
Full_Name: Matthias von Davier Version: 1.2.0 OS: linux Submission from: (NULL) (144.81.31.148) pairs(NxK_Matrix,panel=qqplot) produces a message Error in pairs.default(NxK_Matrix,panel=qqplot) : The panel function made a new plot best regards and a happy new year -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read
2009 Dec 23
2
how to create normal qqplot with the 95% confidence interval
hi everyone! season's greetings! is there any way that i can create a normal qqplot showing, aside from the qqline, the 95% confidence limits? thank you very much.. happy holidays! -- View this message in context: http://n4.nabble.com/how-to-create-normal-qqplot-with-the-95-confidence-interval-tp977727p977727.html Sent from the R help mailing list archive at Nabble.com.
2011 Nov 16
2
outlier identify in qqplot
Dear Community, I want to identify outliers in my data. I don't know how to use identify command in the plots obtained. I've gone through help files and use mahalanobis example for my purpose: NormalMultivarianteComparefunc <- function(x) { Sx <- cov(x) D2 <- mahalanobis(x, colMeans(x), Sx) plot(density(D2, bw=.5), main="Squared Mahalanobis distances, n=nrow(x),
2005 Feb 25
4
Temporal Analysis of variable x; How to select the outlier threshold in R?
For a financial data set with large variance, I'm trying to find the outlier threshold of one variable "x" over a two year period. I qqplot(x2001, x2002) and found a normal distribution. The latter part of the normal distribution did not look linear though. Is there a suitable method in R to find the outlier threshold of this variable from 2001 and 2002 in R?
2007 Mar 23
2
Fitting a line to a qqplot's points?
I've made some normal plots of my data using qqplot, and now I would like to fit a line to the points on the plot and check the correlation coefficient to have a more objective measure of how straight the line is. Is there a simple way of doing that? (I'm still pretty new to R.) Thanks, --Paul -- Paul Lynch Aquilent, Inc. National Library of Medicine (Contractor)
2012 Nov 29
1
QQplot
Hi! <http://r.789695.n4.nabble.com/file/n4651293/qq.png> We are stuck with a problem considering the qqplot of a dataset. We are trying to discover what kind of distribution this is. We already tried to normal, exponential or the logaritmical distribution but none of those are able to solve our problem. Is there someone able to tell us what kind deformation we should try? (I'm
2012 Nov 04
1
95% Q-Q Plot error message
Can someone please help with the error message below? Warning messages: 1: Not plotting observations with leverage one: 7 2: Not plotting observations with leverage one: 7 > print(qqPlot(fit),envelop=.95); Error in model.frame.default(formula = Y ~ X - 1, drop.unused.levels = TRUE) : variable lengths differ (found for 'X') In addition: Warning message: In matrix(yhat, n, reps) :
2012 Jul 10
2
The following object(s) are masked from ‘package:stats’
My apologies in advance as this seem like an easy thing to fix. I am quite new to using R. I am doing my thesis at the moment and I am trying to use the extremes package. However, when I try to access it I get this message: The following object(s) are masked from ?package:stats?: > library( extRemes) Loading required package: tcltk Loading Tcl/Tk interface ... done Loading required package: