search for: qqmath

Displaying 20 results from an estimated 45 matches for "qqmath".

Did you mean: math
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)...
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...
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 the data before calling qqmath will...
2012 May 17
3
New Eyes Needed to See Syntax Error
...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 presented as column 1. The file, bicarb.R is: hco31 <- qqmath(~ HCO3 | factor(basin), data = surfchem.cast, main = 'Bicarbonate (Raw)', prepanel = prepanel.qqmathline, panel = function(x, ...) { panel.qqmathline(x, ...) panel.qqmath(x, ...) }) hco32 <- qqmath(~ log10(HCO3 | factor(basin), data = surfchem.cast, main = 'Bica...
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
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 = m...
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
2013 Jun 22
1
Superpose two QQ-plots (gamma distribution) with, lattice function qqmath()
...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 as a vector above). > x = rgamma(200,shape,rate) > groups = gl(2,100,200,labels=LETTERS[1:2]) > dat = data.frame(x=x, gp=groups) > > qqmath(~ x, data = dat, > groups = gp, > pch = 20, > type = c("p","g"), > distribution = function(x) qgamma(x,shape,rate), > panel = function(x,groups,...) { > panel.qqmath(x,groups, ...) > }...
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]]
2012 May 15
1
Lattice: Add abline to Single Value qqmath() Plot
...and I'm trying various transformations to see if any would be appropriate to use. The lattice book (fig. 3.10) shows a 2-sample Q-Q plot with an abline but the code for the figure does not include the line. I'd appreciate a pointer to a reference on how to add an abline to a one-sample qqmath() plot in lattice. Rich
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)]="...
2010 Apr 15
2
Consistent behaviour of for-loop
...eryone 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 1:12)qqnorm(rnorm(20)) Until here everything works as expected, and the last line prints 12 samples of qqnorm. However, > for(i in 1:12)qqmath(rnorm(20)) is doing nothing at all. As I wrote, I'd really appreciate the understand where this...
2009 Oct 09
1
subsetting key on qqmath
...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) fact=factor(c(rep(1,100),rep(2,100),rep(3,100))) require(lattice) qqmath(~y,groups=fact,auto.key=list(corner=c(0,1)),subset=fact!=2) Many thanks, John Field ========================= John Field Consulting Pty Ltd 10 High Street, Burnside SA 5066 Australia Phone 08 8332 5294 or 0409 097 586 Fax 08 8332 1229 Email JohnField at ozemail.com.au -------------- next par...
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 = qexp,main="A",xlab="",ylab="") qp2 <- qqmath(~ -log(p1), data = as.data.frame(p1), distribution = qexp,main="B",xlab="",ylab="") qp3 <- qqmath(~ -log(p1), data = as.data.frame(p1),...
2011 Feb 04
0
switching y-axis to x-axis for qqmath
This is the qqmath example from the lattice package. I added the scales to the example. I would like to switch the axis and not sure how? Meaning I would like the "height" on the x-axis and the probability on the y-axis. Will you show me the correct syntax for this switch thanks. qqmath(~ height | voice.p...
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) { panel.grid() panel.qqmathline(y, distribution = function(p) qweibull(p,beta,alpha)) panel.qqmath(x, y) },...
2008 Dec 06
0
about qqmath, thanks!
Dear collegues, Is there anyone who ever used qqmath(). Actually, I want to know the distribution of the dependent varible. It's a count number, so it should be poisson or negative binomial distribution. But how could I use R to get the ë and á? Or to demonstrate the distribution to be negative binomial ? I tried my best to find the examples b...
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...
2010 Feb 13
1
Highlighting points in a quantile plot for different values of a second column
Hello, I have the following data frame, using lattice and qqmath, how do I display the quantile plot (e.g distribution = qunif), but highlight the f==TRUE and f==FALSE differently? library(lattice) pp <- function(n) ((1:n)-0.5)/n x=data.frame(x=runif(20),f=sapply(runif(20),function(r) r>0.5)) I would like a single curve, the following example displays t...
2010 May 26
1
Is possible a mini-plot into a big plot with Lattice?
Hello, I want to do with Lattice functions (qqmath, histogram) a figure like this below. n <- 1000 x <- rnorm(n) qqnorm(x); qqline(x) op <- par(fig=c(.02,.5,.5,.98), new=TRUE) hist(x, xlab="", ylab="", main="", axes=FALSE) box() par(op) Is possible? Thanks. Walmes Zeviani. _____________________...