Grokbase Groups R r-help March 2004
FAQ
Dear R specialists,

I'm working with time series and want to investigate the relationship
between two time series by correlation analysis or by fitting a gen.
lineair model to the plot of x(timeserie1) and y(timeserie2).

Lin1 <- data.frame(
Nr = c(1:lengte),
NDII = window(ts.mNDII,c(1998,10),c(2003,11)),
InvERC = window(Inv.ERC,c(1998,10),c(2003,11))
)

summary(glm(NDII ~ InvERC, data=Lin1, family=gaussian(link ="identity")))

Error in "storage.mode<-"(`*tmp*`, value = "double") :
invalid time series parameters specified

How can I solve this error?

Are there specific functions which I can use to investigate the
relationship between two time series? (object ts is ok) ....Does somebody
has some examples of how to solve this statistical problem? ARIMA, AR,
ACF of the package "ts" for time series analysis

Thanks a lot,
Best regards,
Jan Verbesselt

Search Discussions

  • Prof Brian Ripley at Mar 4, 2004 at 11:21 am

    On Thu, 4 Mar 2004, Jan Verbesselt wrote:

    Dear R specialists,

    I'm working with time series and want to investigate the relationship
    between two time series by correlation analysis or by fitting a gen.
    lineair model to the plot of x(timeserie1) and y(timeserie2).

    Lin1 <- data.frame(
    Nr = c(1:lengte),
    NDII = window(ts.mNDII,c(1998,10),c(2003,11)),
    InvERC = window(Inv.ERC,c(1998,10),c(2003,11))
    )

    summary(glm(NDII ~ InvERC, data=Lin1, family=gaussian(link ="identity")))
    Why are you using glm to do linear regression? lm() is the preferred
    function.
    Error in "storage.mode<-"(`*tmp*`, value = "double") :
    invalid time series parameters specified

    How can I solve this error?
    We would need to be able to reproduce it to be able to help you. A quick
    attempt

    library(MASS)
    Lin1 <- data.frame(male=mdeaths, female=fdeaths)
    summary(glm(female ~ male, data=Lin1, family=gaussian(link ="identity")))

    works, as there is no technical problem with having time series in such a
    fit (although the result may be statistically invalid).
    Are there specific functions which I can use to investigate the
    relationship between two time series? (object ts is ok)
    Many, including lm().
    ....Does somebody
    has some examples of how to solve this statistical problem? ARIMA, AR,
    ACF of the package "ts" for time series analysis
    What is your statistical problem, precisely? Using the regression
    capabilities on arima() or function gls() in package nlme spring to mind,
    and ccf() and spectrum() can display cross-correlations and ar() can fit a
    joint AR model.

    --
    Brian D. Ripley, ripley at stats.ox.ac.uk
    Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
    University of Oxford, Tel: +44 1865 272861 (self)
    1 South Parks Road, +44 1865 272866 (PA)
    Oxford OX1 3TG, UK Fax: +44 1865 272595

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedMar 4, '04 at 10:25a
activeMar 4, '04 at 11:21a
posts2
users2
websiter-project.org
irc#r

People

Translate

site design / logo © 2017 Grokbase