Displaying 20 results from an estimated 2000 matches similar to: "Help With Custom QQ Plot"
2013 Jun 22
1
Superpose two QQ-plots (gamma distribution) with, lattice function qqmath()
David, Duncan,
> Hi
>
> Following on David's rate argument
>
> try (with modifications of pch and grid)
>
> rate <- 1/4
> shape = 8
> rate = c(rep(1/4,100),rep(1/3,100))
I don't think the problem is related to the rate argument, which can
well be vectorized, as is the case for a number of arguments in distrib
functions in R (note that you are redefining it
2005 Sep 28
1
Problem with memory footprint of qq plot generated with lattice
Dear R helpers,
I generate a qq plot using the following function call.
qqmath(~val|ind,data=xx
,distribution=function(p) qt(p,df=19)
,ylab="Sample Quatinles"
,xlab="Theoretical Quantiles"
,aspect=1
,prepanel = prepanel.qqmathline
,panel=function(x,y)
{
panel.qqmathline(y, distribution=function(p) qt(p,df=19),col=2)
2009 Sep 17
2
QQ plotting of various distributions...
Hello!
I am trying with this question again:
I would like to test few distributional assumptions for some behavioral
response data. There are few theories about true distribution of those
data, like: normal, lognormal, gamma, ex-Gaussian
(exponential-Gaussian), Wald (inverse Gaussian) etc. The best way would
be via qq-plot, to show to students differences. First two are trivial:
qqnorm(dat$X)
2006 May 25
2
qqmath - Lattice error
Hi,
Don't have a clue what teh following error message
generated by this function call:
qqmath( ~val|ind,data = xx
,distribution = function(p){ qt(p,df=20)}
,ylab="Sample Quatinles"
,xlab="Theoretical Quantiles"
,panel=function(x,y)
{
panel.qqmathline(y
, distribution=function(p) qt(p,df=20)
2009 May 27
1
Changing point color/character in qqmath
Having solved this problem, I am posting this so that the next time I search
for how to do this I will find an answer...
Using qqmath(..., groups=num) creates a separate qq distribution for each
group (within a panel). Using the 'col' or 'pch' argument does not
(usually) work because panel.qqmath sorts the data (but not 'col' or 'pch')
before plotting. Sorting
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
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
2007 Jan 23
1
How to generate 'minor' ticks in lattice (qqmath)
Dear group,
I tried to generate labels for every second tick in lattice (qqmath).
Version: 0.14-16
Date: 2006/12/01
R version 2.4.1 (2006-12-18)
An example:
library(lattice)
numy=100
y=runif(numy,min=0,max=1)
sig=0.05
numsig=length(which(y<sig))
tck.no=11 # number of ticks
tcks=1:tck.no
labl=as.character(0.1*tcks-0.1) # label for all ticks
labl[seq(2,tck.no-1,2)]="" # delete
2012 May 17
3
New Eyes Needed to See Syntax Error
One of many scripts to produce 4 lattice plots on one page keeps throwing
an error. I've tried manipulating the file to eliminate the error, but have
not been able to do so. The error is:
> source('bicarb.R')
Error in source("bicarb.R") : bicarb.R:15:1: unexpected symbol
14: 15: hco33
^
The 'h' is in column 0 so the caret would be column -1, but it's
2009 Oct 09
1
subsetting key on qqmath
Dear R list,
The code below puts qq-plots for two of three groups on the one
plot. However the legend includes all three groups, ie the auto.key
ignores the subset instruction. Is there an easy way to get around
this, so that only those groups plotted are included in the legend?
y1<-rnorm(100); y2<-rnorm(100)+1; y3<-rnorm(100)+2; y<-c(y1,y2,y3)
2001 Nov 29
2
text in qqmath
Hello,
I can't seem to make qqmath plot text.
v <- rnorm(8)
qqmath(~v) # this is ok, but
qqmath(~v, panel=function(x, y) {
points(x, y)
text(0, 0, 'print me', cex=2)})
isn't ok.
The axis frame is printed properly (ie, as in
qqmath(~v)), but neither 'print me' nor the points
show up on the graph. I can, however, see the upper
half of the word 'me' in the
2008 May 06
2
Lattice problems / cannot load lattice
Hi,
My problem is simple: since having updated the lattice package, I cannot
load lattice anymore. If I type in the command 'library(lattice)' the
loading fails with the following message:
--- cut here ---
Error in library.dynam(lib, package, package.lib) :
shared library 'lattice' not found
In addition: Warning messages:
1: In loadNamespace(package, c(which.lib.loc,
2006 Oct 11
1
panel-dependent distribution in qqmath
In qqmath, how would one go about having 'distribution' change with
panel.number? I've tried
set.seed(1)
mydata <- data.frame(ind = factor(rep(2:4, each = 100)))
mydata$val <- rt(300, df=rep(2:4, each = 100))
plot<-qqmath(~ val | ind,
layout=c(3,1),
data = mydata,
prepanel = function(x, distribution, ...) {
2009 Apr 10
1
using more plotting area for a lattice plot
Hi Group,
For the plot below, are there other ways I can use more of the
plotting space. I've tweaked the parameters I know of.
I could also put the plot titles inside the plot if there is a way to
do that. Thanks for your input. Regards, Juliet
p1 <- runif(1000) # sample data
qp1 <- qqmath(~ -log(p1), data = as.data.frame(p1), distribution =
2010 Apr 15
2
Consistent behaviour of for-loop
First my excuses if I keep bugging everyone in this list, but I am a
newbie, and tend to find some behaviour that looks unexpected to me; and
I would really appreciate to be pointed to some location that allows me
to understand more about this software. Here is my next question:
> par(mfrow=c(1,1))
> qqnorm(rnorm(20))
> qqmath(rnorm(20))
> par(mfrow=c(3,4))
> for(i in
2007 Mar 06
1
The plot of qqmath
Hello,
I would like to inlude the Q-Q plot by "qqmath" into a panel with other
plots, say, using par(mfrow=c(1,2)). How can this be done given that
"qqmath" refreshes the plotting window and there seems to be no series
coming out of it?
Thanks
Serguei
[[alternative HTML version deleted]]
2008 Aug 28
1
error in packet 1
Hello,
I'm Giovanni from ROMA..
I can't find a solution for the error:
"error using packet 1
the y field is not specified and it has not a default value"
(this is my traslation from italian language)
The code is:
pc<- qqmath(~valori,
distribution=function(p) qweibull(p,beta,alpha),
prepanel = prepanel.qqmathline,
panel = function(x, y) {
2004 Jun 10
2
Lattice::qqmath -- groups option question
Does the 'groups' option on qqmath just color the points differently in the main distribution or does it actually overlay separate quantile plots for each subset? I would like to be able to do the latter.
--Rich
Richard Kittler
AMD TDG
408-749-4099
2009 Sep 04
3
Applying qqmath using gamma distribution...
Hello ALL!
Can anyone tell me how to specify qqmath() function with distribution
qgamma?
In help it is bit vague how to pass shape and scale parameters for gamma.
Thank you in advance. Best,
PM
2003 Oct 04
1
How to use panel.qqmathline?
Dear R users:
How can I use panel.qqmathline, in package lattice, to add
straight lines onto the plots generated by qqmath?
I read help pages of qqmath, panel.qqmathline, xyplot, ...,
but just can't one example that shows how to make it work.
For example,
> data(sleep)
> qqnorm(~ extra | group, data=sleep, aspect=1)
how can I use panel.qqmathline?
Thanks very much for your help,