Re: [R] qqplot for binomial distribution

2017-05-11 Thread Ashim Kapoor
Dear All, when I do : set.seed(123) expected_distribution<-rbinom(1000,100,.05) #Without jitter qqplot(jitter(expected_distribution),count1_vector, xlab="Expected distribution",ylab="Observed values") qqline(count1_vector,distribution = function(probs) { qbinom(probs, size=100, prob=0.05) },co

Re: [R] qqplot for binomial distribution

2017-04-19 Thread Ashim Kapoor
Dear Boris, Many thanks, Ashim On Tue, Apr 18, 2017 at 7:56 PM, Boris Steipe wrote: > As per the help pages, the data samples are expected in the second > argument, "y". > > So try > qqplot(rbinom(n=100, size=100, p=0.05), count1_vector) > > ... and then plot your qqline() > > Alternatively,

Re: [R] qqplot for binomial distribution

2017-04-18 Thread Boris Steipe
As per the help pages, the data samples are expected in the second argument, "y". So try qqplot(rbinom(n=100, size=100, p=0.05), count1_vector) ... and then plot your qqline() Alternatively, try qqline(count1_vector, distribution = function(probs) { qbinom(probs, size=100, prob=0.05)

Re: [R] qqplot for binomial distribution

2017-04-17 Thread Ashim Kapoor
Dear Boris, Thank you for your reply. > dput(count1_vector) c(5, 6, 4, 4, 6, 5, 4, 5, 3, 7, 5, 5, 3, 4, 8, 6, 10, 2, 4, 6, 8, 4, 4, 6, 8, 5, 6, 3, 7, 9, 4, 7, 5, 7, 3, 4, 5, 2, 11, 7, 8, 5, 5, 6, 3, 2, 3, 5, 9, 6, 5, 6, 7, 3, 10, 7, 6, 4, 9, 5, 7, 3, 7, 3, 2, 3, 4, 5, 10, 4, 5, 5, 6, 7, 4, 8, 7,

Re: [R] qqplot for binomial distribution

2017-04-17 Thread Boris Steipe
That's not how qqline() works. The line is drawn with respect to a _reference_distribution_ which is the normal distribution by default. For the binomial distribution, you need to specify the distribution argument. There is an example in the help page that shows you how this is done for qchisq()

Re: [R] qqplot for binomial distribution

2017-04-17 Thread Ashim Kapoor
Dear Boris, Okay and Thanks. Best, Ashim On Mon, Apr 17, 2017 at 6:45 PM, Boris Steipe wrote: > Moreover, setting the seed once, then evaluating two functions means you > are sampling from the same distributions, but you do in fact have different > values. Outliers in the rarefied tails of the

Re: [R] qqplot for binomial distribution

2017-04-17 Thread Boris Steipe
Moreover, setting the seed once, then evaluating two functions means you are sampling from the same distributions, but you do in fact have different values. Outliers in the rarefied tails of the distribution may lie quite considerably off the expected diagonal. Try set.seed(123) qqplot(rbinom(n

Re: [R] qqplot for binomial distribution

2017-04-17 Thread Ashim Kapoor
Dear Spencer, Okay. Many thanks. My next query is how do I use qqline? When I try > qqline(rbinom(n=100,size=100,p=.05)) I don't get the line in the right place. Best Regards, Ashim On Mon, Apr 17, 2017 at 6:31 PM, Spencer Graves < spencer.gra...@effectivedefense.org> wrote: > > > On 2017-04

Re: [R] qqplot for binomial distribution

2017-04-17 Thread Spencer Graves
On 2017-04-17 7:58 AM, Ashim Kapoor wrote: Dear All, set.seed(123) qqplot(rbinom(n=100,size=100,p=.05), rbinom(n=100,size=100,p=.05) ) I expect to see 1 clear line,but I don't. What am I misunderstanding? The distribution is discrete, and points are superimposed. Try the following:

[R] qqplot for binomial distribution

2017-04-17 Thread Ashim Kapoor
Dear All, set.seed(123) qqplot(rbinom(n=100,size=100,p=.05), rbinom(n=100,size=100,p=.05) ) I expect to see 1 clear line,but I don't. What am I misunderstanding? Best Regards, Ashim [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] qqplot: bar outline colour?

2016-12-19 Thread Ulrik Stervbo
Hi Dagmar, I hope this code below does what you want. I use two data.frames. One is for the tiles and one is for the lines to show changes in state. The 'reduce_entries' function is the heart of things and can probably be improved. Ulrik library(ggplot2) library(lubridate) library(dplyr) librar

[R] qqplot: bar outline colour?

2016-12-19 Thread Dagmar
Dear all, Apearantly noone in this great mailing list could help me with my problem a couple of days ago. As I still struggle with part of the problem I try to explain my problem differently: # This is my example data: exdatframe <- data.frame(Name=c("Ernie","Ernie","Ernie", "Leon","Leon

[R] qqPlot vs qqcomp

2015-12-18 Thread mohsen hs via R-help
Hello all I am using the following two commands and get two completely different qq plots while meanlog and sdlog are almost the same. Any help is highly appreciated.  dev.new() ; qqPlot(serving, dist = "lnorm", estimate.params = TRUE, add.line = TRUE) fitln <- fitdist(serving, "lnorm") dev.new(

Re: [R] QQplot

2012-11-29 Thread FJ M
here: http://www-cdf.fnal.gov/physics/statistics/notes/cdf6820_pearson4.pdf GL, Frank Chicago > Date: Thu, 29 Nov 2012 07:03:28 -0800 > From: michaelverbi...@msn.com > To: r-help@r-project.org > Subject: [R] QQplot > > Hi! > <http://r.7

[R] QQplot

2012-11-29 Thread Nathan
Hi! 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

Re: [R] QQplot normally distributed

2012-06-20 Thread Noor.v.d.Assem
Hi See the file http://www.mijnbestand.nl/Bestand-6ZPTBYDLBZQI.txt here . That file contains the results of a study on breathing resistance in children with asthma and children with cystic fibrosis to investigate wheter there is a relationship between breathing resistance and length in each of th

Re: [R] QQplot normally distributed

2012-06-20 Thread Noor.v.d.Assem
Hi, So in my example, I can say that the data comes from a moderate normal distribution because the points more at the right lay straight to a straight line, then the points at the left. Please a confirmation here. But what is the information above (that the data is from a normal distribution) say

Re: [R] QQplot normally distributed

2012-06-19 Thread Liviu Andronic
Dear Özgür On Wed, Jun 20, 2012 at 7:37 AM, Özgür Asar wrote: > Why do you prefer robust methods in the example of Noor and why you need > exact normality here? > The idea is that when you do hypothesis testing to check whether a given distribution is normal, the results are rarely informative:

Re: [R] QQplot normally distributed

2012-06-19 Thread Özgür Asar
>Hi, >So in my example, I can say that the data comes from a moderate normal distribution because the points more at the >right lay straight to a straight line, then the points at the left. Please a confirmation here. >But what is the information above (that the data is from a normal distribution)

Re: [R] QQplot normally distributed

2012-06-19 Thread Özgür Asar
Dear Liviu , Why do you prefer robust methods in the example of Noor and why you need exact normality here? Ozgur -- View this message in context: http://r.789695.n4.nabble.com/QQplot-normally-distributed-tp4633819p4633919.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] QQplot normally distributed

2012-06-19 Thread John Fox
Dear Kjetil, Simulated point-wise confidence envelopes are available from qqPlot() only for studentized residuals from linear and generalized linear models. For an independent sample of observations, the confidence envelopes produced by qqPlot() are based on the standard errors of the order sta

Re: [R] QQplot normally distributed

2012-06-19 Thread Kjetil Halvorsen
Or uou can try library(car) ?qqPlot use that with argument simulate=TRUE, which will give a simulated envelope around the curve for comparison. Kjetil On Tue, Jun 19, 2012 at 9:30 AM, Özgür Asar wrote: > Hi, > > Try boxplot for outliers. > > To decide whether they influence significantly, try

Re: [R] QQplot normally distributed

2012-06-19 Thread Noor.v.d.Assem
Hi, But what are the functions of the outliers on the left and right? Does they influence the normal distribution? -- View this message in context: http://r.789695.n4.nabble.com/QQplot-normally-distributed-tp4633819p4633823.html Sent from the R help mailing list archive at Nabble.com. _

[R] QQplot normally distributed

2012-06-19 Thread Noor.v.d.Assem
Hi folks, I have some data where I have to investigate with a suitable QQ-plot wheter or not the measurement erros are normally distributed. The distributed data are form the residuals of a lineair regression, that can be considered as aproximations of the actuel measurement errors. This is the gr

Re: [R] QQplot normally distributed

2012-06-19 Thread Liviu Andronic
On Tue, Jun 19, 2012 at 12:42 PM, Özgür Asar wrote: > Following a straight line indicates less evidence towards non-normality. But > QQ-Plot is an exploratory tool. > > You can confirm your ideas obtained from the QQ-Plot via noramlity tests > such as Shapiro-Wilk test. > Hmm, some gurus on this

Re: [R] QQplot normally distributed

2012-06-19 Thread Özgür Asar
Hi, Try boxplot for outliers. To decide whether they influence significantly, try confirmatory normality tests. Ozgur -- View this message in context: http://r.789695.n4.nabble.com/QQplot-normally-distributed-tp4633819p4633830.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] QQplot normally distributed

2012-06-19 Thread Özgür Asar
Hi, Following a straight line indicates less evidence towards non-normality. But QQ-Plot is an exploratory tool. You can confirm your ideas obtained from the QQ-Plot via noramlity tests such as Shapiro-Wilk test. See shapiro.test under stats package and nortest package. Ozgur -- View this mes

[R] qqplot for count data

2011-09-01 Thread Jean-Christophe BOUËTTÉ
Dear list, I just tried to do the same thing, and did not find anything on a weighted qqplot. My weights are actually counts (positive integers). Here is a modification of qqplot, following Duncan Murdoch's suggestion. Any feedback would be welcome! Thanks, Jean-Christophe weighted.qqplot <- func

Re: [R] qqplot

2009-11-02 Thread John Fox
Dear Carol, > -Original Message- > From: carol white [mailto:wht_...@yahoo.com] > Sent: November-02-09 4:04 PM > To: 'Peter Flom'; John Fox > Cc: r-h...@stat.math.ethz.ch; 'Yihui Xie' > Subject: RE: [R] qqplot > > Thanks for all you

Re: [R] qqplot

2009-11-02 Thread carol white
graphical presentation like five number, mean and sd as suggested, or boxplot would have been more suited to be used. thanks for your advices, --- On Mon, 11/2/09, John Fox wrote: > From: John Fox > Subject: RE: [R] qqplot > To: "'Peter Flom'" > Cc: r-h...@stat.math

Re: [R] qqplot

2009-11-02 Thread Peter Flom
Peter Ehlers wrote > >That's not what qqline() does and for good reason - it treats >x and y asymmetrically. > >But qqline() is a very simple function, using the quartiles >as also suggested by John. Here's a modified version that >should work for Carol: > >qqline2 <- function (x, y, ...) >{ >

Re: [R] qqplot

2009-11-02 Thread Peter Flom
John Fox wrote > >I assumed that Carol wanted to compare the shapes of the distributions and >to adjust for differences in centre and spread. To put a line through the >quartiles or to base a line on the medians and IQRs is more robust than >using the means and sds. > Hi John Indeed it is. It al

Re: [R] qqplot

2009-11-02 Thread John Fox
age- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Peter Flom > Sent: November-02-09 11:57 AM > To: carol white; Yihui Xie > Cc: r-h...@stat.math.ethz.ch > Subject: Re: [R] qqplot > > carol white wrote > > >So the c

Re: [R] qqplot

2009-11-02 Thread Peter Ehlers
Peter Flom wrote: David Winsemius wrote I always assumed that the intercept was zero and the slope = unity. y <- rt(200, df = 5) qqnorm(y); qqline(y, col = 2) qqplot(y, rt(300, df = 5)) abline(0, 1, col="red") Suppose you have the following x <- rnorm(500) y <- 500*(x + runif(500, 0,1)

Re: [R] qqplot

2009-11-02 Thread Peter Flom
carol white wrote >So the conclusion is that abline(0,1) should always be used and if it doesn't >go through the qqplot, the two distributions are not similar? I think it depends what you mean by "similar". E.g., if you mean "are both of these distributions (e.g.) normal?" then abline(0,1) is

Re: [R] qqplot

2009-11-02 Thread Peter Flom
David Winsemius wrote >I always assumed that the intercept was zero and the slope = unity. > > y <- rt(200, df = 5) > qqnorm(y); qqline(y, col = 2) > qqplot(y, rt(300, df = 5)) > abline(0, 1, col="red") > Suppose you have the following x <- rnorm(500) y <- 500*(x + runif(500, 0,1)) qqplot(x,

Re: [R] qqplot

2009-11-02 Thread carol white
So the conclusion is that abline(0,1) should always be used and if it doesn't go through the qqplot, the two distributions are not similar? Thanks --- On Mon, 11/2/09, Yihui Xie wrote: > From: Yihui Xie > Subject: Re: [R] qqplot > To: "carol white" >

Re: [R] qqplot

2009-11-02 Thread Yihui Xie
8   0.427  -0.605   -0.066  -0.283 >  -0.599   0.348  -0.693    0.284  -0.436 >   -0.519   0.081  -0.590    0.678  -1.095 >    0.009  -0.253  -0.940    0.526   1.623 > > > --- On Mon, 11/2/09, David Winsemius wrote: > >> From: David Winsemius >> Subject: Re: [R]

Re: [R] qqplot

2009-11-02 Thread carol white
1.623 --- On Mon, 11/2/09, David Winsemius wrote: > From: David Winsemius > Subject: Re: [R] qqplot > To: "carol white" > Cc: r-h...@stat.math.ethz.ch > Date: Monday, November 2, 2009, 8:17 AM > > On Nov 2, 2009, at 10:40 AM, carol white wrote: > > &g

Re: [R] qqplot

2009-11-02 Thread John Fox
John > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of carol white > Sent: November-02-09 10:40 AM > To: r-h...@stat.math.ethz.ch > Subject: [R] qqplot > > Hi, > We could use qqplot to see how two distributions are

Re: [R] qqplot

2009-11-02 Thread David Winsemius
On Nov 2, 2009, at 10:40 AM, carol white wrote: 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

[R] qqplot

2009-11-02 Thread carol white
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

[R] QQplot

2009-03-02 Thread kayj
Hi All, this might be an easy question but I do not know how to find R-squared for a QQplot when doing linear regression? -- View this message in context: http://www.nabble.com/QQplot-tp22288218p22288218.html Sent from the R help mailing list archive at Nabble.com. _