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) ,col=2) panel.qqmath(x, y , distribution=function(p) qt(p,df=20) ,pch=".",cex=2) } ) means. Espacially that this function call qqmath( ~val|ind,data = xx ,distribution = function(p){ qt(p,df=20)} ,ylab="Sample Quatinles" ,xlab="Theoretical Quantiles" ) with the same data is working. Thanks in advance for suggestions. Eryk [[alternative HTML version deleted]]
Witold Wolski wrote:> 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) > ,col=2) > panel.qqmath(x, y > , distribution=function(p) qt(p,df=20) > ,pch=".",cex=2) > } > ) > > means. Espacially that this function call > > qqmath( ~val|ind,data = xx > ,distribution = function(p){ qt(p,df=20)} > ,ylab="Sample Quatinles" > ,xlab="Theoretical Quantiles" > ) > > with the same data is working. > > Thanks in advance for suggestions. > > Eryk >Hi, Eryk, The function panel.qqmath does not take an argument "y". Here's a complete example (which you should have supplied): library(lattice) set.seed(1) xx <- data.frame(ind = factor(rep(1:4, each = 100))) xx$val <- rt(400, 20) qt2 <- function(p) qt(p, df = 20) qqmath(~val | ind, data = xx, distribution = qt2, ylab = "Sample Quantiles", xlab = "Theoretical Quantiles", panel = function(x) { panel.qqmathline(x, distribution = qt2, col = 2) panel.qqmath(x, distribution = qt2, pch=".", cex = 2) }) --sundar P.S. Please (re-)read the posting guide. If you get an error in your script, tell us what it is. And provide an complete example (the posting guide gives guidelines here). Quite often I solve my own problem in the process of coming up with an example I'd like to post to R-help.
On 5/25/06, Witold Wolski <wewolski at gmail.com> wrote:> Hi, > > Don't have a clue what teh following error messageWhat's the error message? In any case, you seem to have wrong expectations about what panel.qqmath does, and in particular what arguments it accepts (this changed a few versions back). See help(panel.qqmath). Deepayan> 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) > ,col=2) > panel.qqmath(x, y > , distribution=function(p) qt(p,df=20) > ,pch=".",cex=2) > } > ) > > means. Espacially that this function call > > qqmath( ~val|ind,data = xx > ,distribution = function(p){ qt(p,df=20)} > ,ylab="Sample Quatinles" > ,xlab="Theoretical Quantiles" > ) > > with the same data is working.