search for: chatfield

Displaying 20 results from an estimated 27 matches for "chatfield".

2009 Apr 30
3
Curved arrows
I'm trying to draw an arrow with a curved shaft on the graph as a straight one looks messy on a detailed graph. I've looked in arrows but it doesn't seem to give an option. larrows doesn't look much more promising. I had a look in the archive and couldn't find anything. Any thoughts? Thanks Paul -- View this message in context:
2010 Jan 25
3
Paste expression in graph title
This was my initial attempt at creating a title on a graph of the R squared value: x<-rnorm(10) y<-rnorm(10) plot(x,y, main=paste(expression(R^2)," = ",round(summary(lm(y~ x))$r.squared, digits=3), sep="")) I've read various other posts that say expression needs to be taken outside the paste, but I can't seem to get it work as the following fails plot(x,y,
2007 Apr 06
1
Orphaned ncvar? (PR#9603)
...would be great to find out > just how > to get libraries recognized in the documentation, ... or for there > to be binaries. > > If you have notes within the .tgz files, I have not found those. > > Please, help ! ;-) > regards, Bob C > > > > > Dr. Robert Chatfield > Earth Sciences, MS 245-5 > NASA Ames Research Center > Moffett Field, CA 94035 USA > > Ph: 650-604-5490 FAX 650-604-3625 > > http://geo.arc.nasa.gov/sgg/chatfield > [[alternative HTML version deleted]]
2010 Jun 09
2
Read in dataset without saving it
A simple question - I have a small dataset to read in and want to copy and paste part from Excel and paste it into an R script file without creating more files saving it as a .txt/.csv and then reading that in. I want to read in 3 columns e.g. 1 2.5 3.4 1 2.3 3.1 1 2.6 3.9 2 2.9 2.8 2 2.6 2.9 2 2.7 2.9 3 2.3 3.3 3 2.4 3.0 3 2.7 3.2 I thought I could use scan() but don't know how to extend it
2006 May 18
1
Function (x) as consecutive values
....fun(1:4) This code returns 'aa' as 1 4 9 16, but I'd like it to return aa as 1 5 14 30 taking into consideration that I've just calculated aa for x=1. Aside from using loops, is there not a simple way of telling R to work out x for consecutive values? thanks Paul Chatfield Send instant messages to your online friends http://uk.messenger.yahoo.com [[alternative HTML version deleted]]
2006 Mar 23
2
Default lag.max in ACF
Hi, The default value for lag.max in ACF implementation is 10*log10(N) There several publications recommending setting lag.max to: - N/4 (Box and Jenkins, 1970; Chatfield, 1975; Anderson, 1976; Pankratz, 1983; Davis, 1986; etc.) - sqrt(N)+10 (Cryer, 1986) - 20<=N<=40 (Brockwell and Davis) Why R uses 10*log10(N) as a default? Please, give me a reference to a book or article where the recommendation for using lag.max=10*log10(N) is proposed and explained....
2010 Apr 09
3
NAs are not allowed in subscripted assignments
I'm trying to assign NAs to values that satisfy certain conditions (more complex than shown below) and it gives the right result, but breaks the loop having done the first one viz: new<-c(rep(5,4),6) for (i in 1:6) {new[new[i]>5.5][i]<-NA} gives the correct result, though an error message appears which causes a break if it's in a loop. If I can get rid of the error message and
2010 Sep 22
1
Referencing factor name
Simple problem - I want the ylab to automatically pick up x1 rather than having to define x1 in the plot statement. x1<-c(1.2,2,3);x2<-c(1,2.1,2.6) y<-x1 plot(1:3,y, ylab="x1") There must be a way of accessing the name x1 somehow, but unfortunately I don't know how to search for it. Any help would be great, -- View this message in context:
2009 Nov 04
1
Patterned shading in ggplot
Am trying to produce a graph which prints out well in black and white using ggplot2. I have the following example set up nicely, but want to shade the red bars in one pattern and the blue in another so they print out clearly. I tried changing colours to 1 light, 1 dark, but then the overlapping colour looks virtually identical to the darker one. I noted the option density in barplot, but
2005 Dec 21
1
How do I edit the x-axis on a time series plot?
I am merely trying to reproduce Figure 1.2 of Chris Chatfield's 6th edition of his The Analysis of Time Series: An Introduction (page 2). The S-PLUS code is on pages 305-306. I am almost there but I am having a heck of a time trying to modify and change the x-axis per the book. The book shows the x-axis with 10 tick marks, correctly positioned, and l...
2010 Jul 06
1
information reduction-database management question
If you redefine your NAs as below to be detected as some arbitrary large number, then the code should work through. Any 5's left in your dataset can be replaced just as easily by NAs again. Not elegant, but effective. site <- c("s1", "s1", "s1", "s2","s2", "s2") pref <- c(1, 2, 3, 1, 2, 3) R1 <- c(NA, NA, 1, NA,NA,NA) R2
2006 Jun 28
1
Reporting ppr fits and using them externally.
...ade a second analysis with sphered data, and run arbitrary subsets to assess contributions of spline fits along the various directions, and computed correlations with fitted and (fitted+residual) data. Maybe there's a more standard approach we're missing. Thanks for your advice! Bob Chatfield / NASA Ames Research Center
2008 Aug 05
2
Opening R from Tinn without setting directory each time
Hi - I can access R from Tinn-R by going to Options->Main->Application/R and setting the search path, but each time I exit Tinn-R I have to redefine the search path. Is there no way of fixing that directory as default? I have installed R under its default directory C:/Program Files/R/R-2.7.1 and Tinn under a variety of different places to try to rectify the problem though currently under
2008 Sep 21
1
Multiple plots per window
Hi all, I'm currently working through "The Analysis of Time Series" by Chris Chatfield. In order to also get a better understanding of R, I play around with the examples and Exercises (no homework or assignement, just selfstudy!!). Exercise 2.1 gives the following dataset (sales figures for 4 week intervals): > sales2.1.dataframe 1995 1996 1997 1998 1 153 133 145 111 2...
2006 Oct 02
1
CCF and ACF
...lations of series 'X', by lag -2 -1 0 1 2 -0.139 0.593 -0.377 -0.382 0.116 > sum(x[1:9]*y[2:10])/sqrt(sum(x^2)*sum(y^2)) [1] 0.5930216 > sum(x[2:10]*y[1:9])/sqrt(sum(x^2)*sum(y^2)) [1] -0.3822885 from a quick survey on textbooks (Brockwell and Davis, Chatfield, Fuller) it looks like different authors use different conventions so that I think that it would be nice to clarify this in the documentation. Ciao Simone > R.version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status...
2009 Oct 07
2
Plotting 1 covariate, 3 factors
I'm interested in plotting a y with an x factor as the combination of 2 factors and colour with respect to a third, which the code below does with interaction.plot(). However, this is because I redefine the x to be 1 factor. Is there a way of getting it to plot without redefining it, and ideally to not join up the lines BETWEEN levels a and b, but just join those between after and before for
2008 Oct 28
1
acf(): meaning of the blue horizontal lines
Hello, what are they meaning? It could be something that would show a threshhold above which the result is indicating different meanings then just random noise. But there is no description on the definition of those lines, so it means nothing, if it is not clearly defined. Where can I find a detailed definiton? Ciao, Oliver
2009 Jun 12
1
Snap axes to origin rather than around it
I'm trying to plot a graph where the axes go through 0,0, rather than around it combined with a box round the graph, so x<-0:10;y<-0:10 plot(x,y) gives me a box but doesn't go through the point 0,0, but stays at a distance. In trying to circumvent this problem, I wrote plot(x,y) axis(1, pos=c(0,0));axis(2,pos=c(0,0)) which gives me axes that go through the origin, but then I
2009 Aug 10
1
Statistician Needed
Hello, I've come up with some challenges with my process that are a bit too complicated for the mailing list. Is there anyone out there, preferably a real "statistician", who is willing to consult with me via phone/email for a few hours. I'm happy to pay you for your time. Thanks, -Noah
2010 Oct 21
1
All other variables in upper scope arg for stepAIC
Hi - I am trying to substitute for "the_other_y" in the code below. I want y2 and y3 to be there when i is 1, y1 and y3 to be there when i is 2 and y1 and y2 to be there when i is 3. I'm sure it's to do with what format the data should be in and I've tried alldata[,-i], but it fits all the columns of alldata except i rather than each column one at a time. I've tried