Hi,
I wanted to understand exactly how acf and pacf works, so I tried to
calculate ac and pac manually. For ac, I used the standard acf formula:
acf(k) = sum(X(t)-Xbar)(X(t-k)-Xbar))/sum(X(t)-Xbar)^2. But for pac, I could
not figure out how to calculate it by hand. I understand that in both R and
Hi,
I noticed that whenever I ran acf or pacf, the plot generated by R always
includes two horizontal blue doted lines. Furthermore, these two lines are
not documented in the acf documentation. I don't know what they are for, but
it seems that they are important. Could someone tell me what they
.
Eric
On 4/27/07, tom soyer [EMAIL PROTECTED] wrote:
Hi,
I noticed that whenever I ran acf or pacf, the plot generated by R
always
includes two horizontal blue doted lines. Furthermore, these two lines
are
not documented in the acf documentation. I don't know what
Thanks Gabor!!
On 4/12/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 4/12/07, tom soyer [EMAIL PROTECTED] wrote:
What should I do for weekly and daily data series? Are there functions
similar to yearmon() for other time intervals? I see that there is a
built-in yearqtr() function
Hi,
I have time series data stored in csv files (see below for an example of the
data). I understand that in order to analyze my data in R, I need to first
transform it into a ts object. Howeve, I could not find an example on how
exactly to do that. Is ts the only function I need? What are the
come R does not recognize z as a ts object? It is a ts object, isn't it?
On 4/12/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 4/12/07, tom soyer [EMAIL PROTECTED] wrote:
Hi,
I have time series data stored in csv files (see below for an example of
the
data). I understand that in order
Oh yes, I forgot. Thanks!!
On 4/12/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 4/12/07, tom soyer [EMAIL PROTECTED] wrote:
Thanks Gabor!
I think your example works, but check this out:
as.ts(z)
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1921 19.0 18.4
Gabor,
What should I do for weekly and daily data series? Are there functions
similar to yearmon() for other time intervals? I see that there is a
built-in yearqtr() function for quarterly data, but that's it.
Thanks!
On 4/12/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 4/12/07, tom
Hi,
I have two questions about ccf. 1) does it return correlation value for each
lag? The documentation states the following: The lag is returned and
plotted in units of time, and not numbers of observations. There are
printand subsetting methods for objects of class
acf . Does this mean only lag
Hi,
I am using ccf but I could not figure out how to calculate the actual lag in
number of periods from the returned results. The documentation for ccf
says:The lag is returned and plotted in units of time. What does units of
time mean? For example:
x=ldeaths
x1=lag(ldeaths,1)
Thanks Jim, Brian, and Petr. I found a non-number, ., in my CSV file that
prevented R from reading the data correctly. Once I got rid of it, R works
fine. Thanks!
On 11/1/06, Jim Lemon [EMAIL PROTECTED] wrote:
tom soyer wrote:
Hi,
I have a CSV file with two columns; the first column
Hi,
I have a CSV file with two columns; the first column is date, second column
is numbers. I used read.csv() to load the file into the variable temp.
Somehow, R could not recognize my numbers as double. Instead, it thinks
these numbers are integer even though they all have decimal points (isn't
Hi,
I noticed that as.Date() could not convert date string to date type if the
dates are very old. For example, if the date string is 1-Mar-50, then
as.Date() would convert this to 2050-03-01, NOT 1950-03-01. This seems
to be the behavior of as.Date() for dates older than 1969-1-1, and it is not
Thanks Marc and Gabor for the clarification.
On 10/29/06, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 10/29/06, Marc Schwartz [EMAIL PROTECTED] wrote:
On Sun, 2006-10-29 at 10:31 -0600, tom soyer wrote:
Hi,
I noticed that as.Date() could not convert date string to date type
Thanks Peter. That make sense.
On 22 Oct 2006 09:26:27 +0200, Peter Dalgaard [EMAIL PROTECTED]
wrote:
tom soyer [EMAIL PROTECTED] writes:
Thanks Marc and Gregor for the detailed explanation. You are right, the
masking is potentially dangerous. Since R is object oriented, I am
surprised
Hi,
I noticed that max(x) returns the maximum value of a vector, but the
function doesn't give the user the option of retrieving the row index number
instead. If I used max(x) to find the maximum value of vector x, then is
there a function I can use to find the index number, or row name, of the
Thanks John! I got it.
On 10/21/06, John Kane [EMAIL PROTECTED] wrote:
--- tom soyer [EMAIL PROTECTED] wrote:
Hi,
I noticed that max(x) returns the maximum value of a
vector, but the
function doesn't give the user the option of
retrieving the row index number
instead. If I used
Hi,
Sometime when I attach a dataset, R gives me the following
message/warning:The following object(s) are masked from package:datasets:
column_name. Does anyone know what it means? Since it seems that the
dataset was attached and I could manipulate the data from the dataset
without problems, I
-21 at 18:43 -0500, tom soyer wrote:
Hi,
Sometime when I attach a dataset, R gives me the following
message/warning:The following object(s) are masked from
package:datasets:
column_name. Does anyone know what it means? Since it seems that the
dataset was attached and I could manipulate
try prop.table()
On 10/21/06, ronggui [EMAIL PROTECTED] wrote:
Maybe _CrossTable_ in gmodels package is what you want.
2006/10/22, Larry White [EMAIL PROTECTED]:
-- apologies if this is a dup - i got a bounce saying the message was
unprocessed.
Is there a straightforward way to get
Harding [EMAIL PROTECTED] wrote:
On 19-Oct-06 tom soyer wrote:
Hi,
I looked up the help file on sample(), but didn't find the
info I was looking for.
When sample() is used to resample from a distribution, e.g.,
bootstrap, how does it do it? Does it use an uniform distribution,
e.g
Hi,
I am trying to get R to return just the slope of a linear regression line,
but it seems that R has to return both the slope and the name of the slope.
For example,
a=coef(lm(y~miles))
a
(Intercept) miles
360.3778 -7.2875
names(a)
[1] (Intercept) miles
a[1]
(Intercept)
Grothendieck [EMAIL PROTECTED] wrote:
Using the builtin BOD data frame:
as.vector(coef(lm(demand ~ Time, BOD)))[2]
On 10/21/06, tom soyer [EMAIL PROTECTED] wrote:
Hi,
I am trying to get R to return just the slope of a linear regression
line,
but it seems that R has to return both
PROTECTED] On Behalf Of tom soyer
Sent: Saturday, October 21, 2006 1:00 AM
To: Gabor Grothendieck
Cc: r-help
Subject: Re: [R] help with coef
Gabor,
Thanks for the code example, but it seems that BOD is not needed. I still
don't understand what is going on with the data structure returned
Hi,
I looked up the help file on sample(), but didn't find the info I was
looking for.
When sample() is used to resample from a distribution, e.g., bootstrap, how
does it do it? Does it use an uniform distribution, e.g., runif(), or
something else? And, when the help file says:sample(x)
Hi,
I have the following data in two columns. The first column is the date, the
second is data.
Date Data
3-Jan-95 459.21
4-Jan-95 459.13
5-Jan-95 460.73
6-Jan-95 460.38
9-Jan-95 460.67
10-Jan-95 460.9
11-Jan-95 461.68
12-Jan-95 461.64
13-Jan-95 461.64
16-Jan-95 465.97
17-Jan-95 469.38
18-Jan-95
to
learn more about dates.
On 10/18/06, tom soyer [EMAIL PROTECTED] wrote:
Hi,
I have the following data in two columns. The first column is the date,
the
second is data.
Date Data
3-Jan-95 459.21
4-Jan-95 459.13
5-Jan-95 460.73
6-Jan-95 460.38
9-Jan-95 460.67
10-Jan-95
Hi,
I am new to R and I have been trying it out. I ran into a problem with the
plot() function. Below is my code:
d - read.table(c:/test/sp.txt,header=0)
spval - d[,2]
plot(spval,type=l)
Warning messages:
1: graphical parameter type is obsolete in: plot.window(xlim, ylim, log,
asp, ...)
2:
some
sample data with which we can reproduce the error?
On 16/10/06, tom soyer [EMAIL PROTECTED] wrote:
Hi,
I am new to R and I have been trying it out. I ran into a problem with
the
plot() function. Below is my code:
d - read.table(c:/test/sp.txt,header=0)
spval - d[,2]
plot
at 10:54 -0500, tom soyer wrote:
Hi David and Duncan,
Thanks for the reply. I am using R-2.4.0 for windows. All I am trying to
do
is follow an online tutorial (
http://www.onlamp.com/pub/a/onlamp/2005/11/17/r_for_statistics.html)
step by
step. spval is just an array of numbers. I also
30 matches
Mail list logo