Skip to content

filled.contour - plot.axes

6 messages · Andy Bunn, Mohamed A. Kerasha, Paul Gilbert +2 more

#
Hi all, Sorry for what might be a trivial issue. However, I am
completely flummoxed!

I'm making a filled contour plot for a publication. It's a continuous
wavelet transform should anybody care. The problem I'm having is
correctly demarking the ticks on the y axis. I have a matrix that has
100 columns. Every 10th column represents a power of 2. So: 
col[10] <- 2 
col[20] <- 4
col[30] <- 8

and so on until col[100] <- 2^10

I'm having trouble scaling my plot accordingly. Can anybody help? I
imagine that one uses the plot.axes argument but I'm having trouble
figuring out how to do it. The matrix is already a log scale so the
ticks and numbers are evenly spaced by 10.

Thanks in advance, Andy

Example:
junk.mat <- matrix(rnorm(12800), 128, 100)
xYears <- 1:nrow(junk.mat)
yPeriod <- 1:ncol(junk.mat)

filled.contour(xYears, 
               yPeriod,
               junk.mat,
               color = terrain.colors)
#?             plot.axes = { axis(2, seq(??))}


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Hi all,

Does any one know if there is Kalman Filter code or library in R.

Thanks,

Mohamed.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
"Mohamed A. Kerasha" wrote:
In addition to the code in package ts there is multivariate Kalman
filter and smoother code in the dse bundle on CRAN. See

 help(l.SS, package=dse1)

or the Users' Guide. (I believe there is also Kalman filter code in one
or two other packages.)

Paul Gilbert
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
1 day later
#
Dear list readers,

This question is concerned with the use of the chisq.test() in R.
A test was conducted to determine the difference between 2 samples A and 
B. Column I consisted of correct and incorrect assessment of  30 matched 
pairs (AA or BB) , whereas column II consisted of correct and incorrect 
assessment of  30 unmatched pairs (AB or BA). This example is given in a 
book on the sensory evaluation techniques. The author's did not use 
Yate?s correction for continuity  in their analysis of the data.
I am trying to decide whether Yate?s correction for continuity should be 
used when analysing a 2x2 contigency table using the chi-square test. I 
have found conflicting views in literature with some people for and 
others against.  The analysis with or without Yate?s correction gives 
conflicting results.

 > x <- matrix(c(17, 13, 9, 21), nc = 2)
 > chisq.test(x,correct = TRUE)

        Pearson's Chi-squared test with Yates' continuity correction

data:  x
X-squared = 3.3258, df = 1, p-value = 0.0682

 > chisq.test(x,correct = F)

        Pearson's Chi-squared test

data:  x
X-squared = 4.3439, df = 1, p-value = 0.03714

 >

The same data analysed using Fisher's exact test is similar to the 
chi-square with Yate?s correction
 > fisher.test(x)

        Fisher's Exact Test for Count Data

data:  x
p-value = 0.06728
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
  0.9354766 10.1716022
sample estimates:
odds ratio
  2.992580

I suppose looking at the results, the correct conclusion should be taken 
using the correction for continuity. In fact, the statistics books I 
have read suggest the use of  Yate?s correction for continuity. (for 
example, Nonparametric statistics - Sidney Siegel and John Castellan 1988)

I would like to hear anyone's view on this, especially statisticians.


Thanks in advance

Peter
----------------------------------
ISR-Porto

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Wed, 20 Nov 2002 21:51:56 +0000
Peter Ho <peter at fe.up.pt> wrote:

            
In general you use Yates' correction if you want the results to be conservative as with Fisher's "exact" test.  I generally use the chi-square test without continuity correction.  The price of "exact" tests (those that guarantee the type I error is no greater than a set value) is conservatism.  I prefer tests that get closest to the target alpha value even if they exceed it a little bit on occasion.

This kind of question would be slightly more appropriate for the sci.stat.consult Usenet news group.
#
Thanks for the reply Frank.

I will in future send these types of questions to sci.stat.consult 
Usenet news group, of which I was not previously aware of.
The interersting point about the two results, is the fact that the null 
hypothesis is not rejected using Yate's correction, but is rejected 
without Yate's correction. at 5% level of significance. I guess this 
will be better answered in sci.stat.consult .

Thanks again

Peter
----------------------------
ISR-Porto
Frank E Harrell Jr wrote:

            
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._