Displaying 8 results from an estimated 8 matches for "ldeath".
Did you mean:
death
2007 Nov 21
1
Different freq returned by spec.ar() and spec.pgram()
...o me like a bit of an
inconsistency -- but I would not be surprised if there is good
reasoning that justifies it that I am just not seeing right now. If we
use the lh data, the two methods return similar results:
> spectrum(lh, col = "blue")
> spec.ar(lh, add = TRUE)
But using the ldeaths data:
> spectrum(ldeaths, col = "blue")
> spec.ar(ldeaths, add = TRUE)
the resulting plots do not compare over the same frequency range. This
results because spec.ar defines frequency as
> freq <- seq.int(0, 0.5, length.out = n.freq)
whereas spec.pgram uses
> xfreq &l...
2007 Mar 29
1
ccf time units
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)
> results=ccf(x,x1)
> results
Autocorrelations of series 'X', by lag
-1.2500 -1.1667 -1.0833 -1.0000 -0.9167 -0.8333 -0.7500 -0.6667 -0.5833 -
0.5000
-0.297 0.011 0.380 0.651 0.738 0.664 0.392 -0.011 -0.383 -
0.618
-0.4167 -0.3333 -0.2500 -0.1...
2007 Nov 25
1
spec.pgram() - circularity of kernel
...cularity option? At the extremes,
values seem to result from kernel application to collections of high and low
frequencies. Related to this, shouldn't the frequency range shorten
according to the size of kernel used? My doubt came from reading
Diggle(1990) p105.
e.g.
data(lh)
x<-spec.pgram(ldeaths, detrend=T, taper=0)$freq
y<-spec.pgram(ldeaths, kernel("modified.daniell", c(6,6)), detrend=T,
taper=0)$freq
x==y
Thanks in advance,
Nuno Prista
2008 Apr 23
1
ccf and covariance
...d what is a cross-correlation?
(unfortunately, I can't seem to get a look at the ccf code, since I
think it's buried in some C function outside of the main environment)
Thanks very much.
--Bob Farmer
PhD candidate, Dalhousie University
Halifax, NS, Canada
Example:
d1<-data.frame(matrix(ldeaths, nrow = 6, byrow = T))
seventy_4<-as.numeric(d1[1,])
seventy_5<-as.numeric(d1[2,])
ccf(x=seventy_4, y=seventy_5,
plot = F, lag.max = 0, type = "covariance"
)
cov(seventy_4, seventy_5) #inconsistent
ccf(x=seventy_4, y=seventy_5,
plot = F, lag.max = 0, type = "correlation...
2005 Aug 02
1
multiple scale
...et it is here only possible for the left axis.
## See also: 'ts.plot', 'ts', 'legend'.
## Author and date: Hauksson, Bjorn Arnar. March 2004.
## Example:
## First paste this function into the R console or use 'source'.
#library(ts)
#data(UKLungDeaths)
#x <- ldeaths
#y <- fdeaths/mdeaths
#ts.plot.2Axis(x, y)
#legTxt <- c("UK lung deaths", "UK female/male deaths (rhs)")
#legend(1976.5, 3950, legTxt, lty=c(1:2), col=c(1:2), lwd=2, bty="n")
##
ts.plot.2Axis <- function(xleft, xright, digits=1, ticks=5,...
2005 Feb 02
4
(no subject)
...reeny's Revenue Data
infert Infertility after Spontaneous and Induced
Abortion
iris Edgar Anderson's Iris Data
iris3 Edgar Anderson's Iris Data
islands Areas of the World's Major Landmasses
ldeaths (UKLungDeaths)
Monthly Deaths from Lung Diseases in the UK
lh Luteinizing Hormone in Blood Samples
longley Longley's Economic Regression Data
lynx Annual Canadian Lynx trappings 1821-1934
mdeaths (UKLungDeaths)...
2004 Mar 24
0
High/low level: Plot 2 time series with different axis (left and ri ght)
...to be set it is here only possible for the left axis.
## See also: 'ts.plot', 'ts', 'legend'.
## Author and date: Hauksson, Bjorn Arnar. March 2004.
## Example:
## First paste this function into the R console or use 'source'.
#library(ts)
#data(UKLungDeaths)
#x <- ldeaths
#y <- fdeaths/mdeaths
#ts.plot.2Axis(x, y)
#legTxt <- c("UK lung deaths", "UK female/male deaths (rhs)")
#legend(1976.5, 3950, legTxt, lty=c(1:2), col=c(1:2), lwd=2, bty="n")
##
ts.plot.2Axis <- function(xleft, xright, digits=1, ticks=5,...
2007 Nov 23
0
R users in Cyprus
...o me like a bit of an
inconsistency -- but I would not be surprised if there is good
reasoning that justifies it that I am just not seeing right now. If we
use the lh data, the two methods return similar results:
> spectrum(lh, col = "blue")
> spec.ar(lh, add = TRUE)
But using the ldeaths data:
> spectrum(ldeaths, col = "blue")
> spec.ar(ldeaths, add = TRUE)
the resulting plots do not compare over the same frequency range. This
results because spec.ar defines frequency as
> freq <- seq.int(0, 0.5, length.out = n.freq)
whereas spec.pgram uses
> xfreq &l...