1

This is the first time I'm using R to model climate.

I have three variables of 1-min data as per below:

x<-data.frame(matrix(c("2012-02-04", "2012-02-04", "2012-02-04", "2012-02-04", "00:00",
"00:01","00:02","00:03", "960.0244", "960.0258", "960.0272", "960.0286", 
"12", "12.2", "12", "12.1", "0", "0.1","4", "2"), ncol=5))

names(x)<-c("date","time","pressure","temperature","precipitation")

        date   time  pressure  temperature  precipitation
1 2012-02-04  00:00  960.0244           12              0
2 2012-02-04  00:01  960.0258         12.2            0.1
3 2012-02-04  00:02  960.0272           12              4
4 2012-02-04  00:03  960.0286         12.1              2

Of course, the original data is much much larger (approximately 8 variables) and much much longer (3 million rows, total 8 years of data).

I'm afraid conventional regression technique i.e. linear regression lm(precipitation~temperature+pressure) or even polynomial or multiple linear may not be sufficient for modeling this kinda research.

So I would like to know what kind of modeling technique can I use to model the relationship between precipitation to other variables?

MT32
  • 119
  • 1
  • 5
    *"I'm afraid conventional regression technique i.e. linear regression lm(precipitation~temperature+pressure) or even polynomial or multiple linear may not be sufficient for modeling this kinda research."* What makes you think that? I guess it depends on what you mean by "conventional regression technique". I suggest taking a look at (quite conventional) ARIMA models. – Maurits Evers Jun 18 '18 at 05:19
  • @MauritsEvers because in the long term the temperature graph looks like a sine wave, and hence a straight linear line (or even a polynomial X^3) wouldn't be sufficient to describe the graph.. –  Jun 18 '18 at 05:26
  • 5
    That's exactly why I mentioned ARIMA models; they can include seasonal (repetitive) effects; still very conventional modelling though... – Maurits Evers Jun 18 '18 at 05:29
  • @MauritsEvers, thanks for the tip. I'll look up the ARIMA models – MT32 Jun 19 '18 at 03:46
  • @MauritsEvers, after looking at Arima models, I think it only model 1 variable at a time, eg fitting precipitation data and forecasting...... or am I getting it wrong? What I'm looking for is actually a modeling technique that blends all the variables (precipitation, temperature, pressure) together like model – MT32 Jun 22 '18 at 09:37
  • From a technical point of view, you can have as many external predictors as you like in an ARIMA model; for example, if you use `forecast::auto.arima` simply pass a matrix of your external predictor measurements as function argument `xreg`. Take a look at `?forecast::auto.arima`. See also [Arima time series forecast (auto.arima) with multiple exogeneous variables in R](https://stats.stackexchange.com/questions/122803/arima-time-series-forecast-auto-arima-with-multiple-exogeneous-variables-in-r) – Maurits Evers Jun 22 '18 at 09:43
  • 1
    PS. Perhaps share a bigger (more presentative) chunk of your data, including the code you've tried so far. This would give people a chance to come up with a more specific answer/solution to your question. – Maurits Evers Jun 22 '18 at 10:30

0 Answers0