# Tagged Questions

Autocorrelation is the correlation of a series of data with itself at some lag. This is an important topic particularly in the analysis of time-series data.

1k views

### Why does including latitude and longitude in a GAM account for spatial autocorrelation?

I have produced generalized additive models for deforestation. To account for spatial-autocorrelation, I have included latitude and longitude as a smoothed, interaction term (i.e. s(x,y)). I've based ...
476 views

### Automated procedure for selecting subset of data points w/ strongest correlation?

Is there some standard procedure (such that one might cite it as a reference) for selecting the subset of data points from a larger pool with the strongest correlation (along just two dimensions)? ...
127 views

### Two years of data describing occurence of violence- testing association with number of patients on ward

I have two years of data which looks basically like this: Date ___ Violence Y/N? _ Number of patients 1/1/2008 ____ 0 __________ 11 2/1/2008 ____ 0 _________ 11 3/1/2008 _____1 ...
2k views

### Simple linear model with autocorrelated errors in R

How do I fit a linear model with autocorrelated errors in R? In stata I would use the prais command, but I can't find an R equivalent...
2k views

### Formula for autocorrelation in R vs. Excel

I am trying to figure out how R computes lag-k autocorrelation (apparently, it is the same formula used by Minitab and SAS), so that I can compare it to using Excel's CORREL function applied to the ...
388 views

### Predicting long-memory processes

I'm working with a two-state process with $x_t$ in $\{1, -1\}$ for $t = 1, 2, \ldots$ The autocorrelation function is indicative of a process with long-memory, i.e. it displays a power law decay with ...
742 views

### What's the deal with autocorrelation?

To preface this, I have a pretty deep mathematical background, but I've never really dealt with time series, or statistical modeling. So you don't have to be very gentle with me :) I'm reading this ...
205 views

### When is it necessary to include the lag of the dependent variable in a regression model and which lag?

The data we want to use as dependent variable looks like this (it is count data). We fear that since it has a cyclic component and trend structure the regression turns out to be biased somehow. We ...
9k views

### How to test the autocorrelation of the residuals?

I have a matrix with two columns that have many prices (750). In the image below I plotted the residuals of the follow linear regression: ...
743 views

### Interpreting seasonality with ACF and PACF

I have a dataset where empirical intuition say I should expect a weekly seasonality (i.e., the behavior in saturday and sunday is different from the rest of the week). Should this premise be true, ...
1k views

### How to model zero inflated, over dispersed poisson time series?

I am trying to model weekly disease counts in 25 different regions within 1 country over a ten year period as influenced by temperature. The data is zero inflated and over dispersed. I am most ...
230 views

### Modeling a spatial trend by regression with the $(x,y)$ coordinates as predictors

I plan to include coordinates as covariates in the regression equation in order to adjust for the spatial trend that exists in the data. After that, I want to test residuals on spatial autocorrelation ...
1k views

### Using autocorrelation to find commonly occurring signal fragments

I have a sensor which is capturing accelerometer data as a person walks. What I'm interested in extracting is each signal fragment when a step is taken. The Z-axis is what is used since only one axis ...
275 views

### Why autocovariances could fully characterise a time series?

I read from textbook that 'Autocovariance can fully charaterise the time series' joint distribution', I do not fully understand the connection between covariance and joint distribution here. Please ...
2k views

### Fitting multiple linear regression in R: autocorrelated residuals

I'm trying to estimate a multiple linear regression in R with an equation like this: regr <- lm(rate ~ constant + askings + questions + 0) askings and ...
3k views

### Calculate Newey-West standard errors without an lm object in R

I asked this question yesterday on StackOverflow, and got an answer, but we agreed that it seems a bit hackish and there may be a better way to look at it. The question: I would like calculate the ...
562 views

### Can I trust a regression if variables are autocorrelated?

Both variables (dependent and independent) show autocorrelation effects. Data is time-series and stationary When I run the regression residuals appear not to be correlated. My Durbin-Watson statistic ...
286 views

### How can I compute regression for several longitudinal data sets (thus, with auto-correlated error)?

My actual project is a bit complicated, but I'll explain by analogy (which I hope facilitates response): I have 3 substances, say water, motor oil, and ethanol. For each substance, I have 5 samples ...
282 views

### Measures of autocorrelation in categorical values of a Markov Chain?

Direct Question: Are there any measures of auto-correlation for a sequence of observations of an (unordered) categorical variable? Background: I'm using MCMC to sample from a categorical variable ...
945 views

### Time series regression with overlapping data

I am seeing a regression model which is regressing Year-on-Year stock index returns on lagged (12 months) Year-on-Year returns of the same stock index, credit spread (difference between monthly mean ...
545 views

### Choice of weight function in Moran's I

I'm doing an autocorrelation analysis for a spatially distributed collection of observations. To perform my analysis, I am using Moran's I statistic. My questions are: (1) What are the implications ...
932 views

### Box-Ljung test on white noise series

I generate this data in R: set.seed(111) ds=rnorm(1000) When I perform Box-Ljung test to test the independency: ...
190 views

### How to analyze GEE with unevenly spaced observations?

I am interested in using Generalized Estimating Equations (GEE) to model longitudinal count data. I recorded animal count observations on the same sites on many days but the spacing of the ...
95 views

### Issues with ordinary kriging

I was following this wiki article related to ordinary kriging Now my covariance matrix looks like this, for 4 variables ...
880 views

### How to analyze longitudinal count data: accounting for temporal autocorrelation in GLMM?

Hello statistical gurus and R programming wizards, I am interested in modeling animal captures as a function of environmental conditions and day of the year. As part of another study, I have counts ...
1k views

### Autocorrelation in the presence of non-stationarity?

Does the autocorrelation function have any meaning with a non-stationary time series? The time series is generally assumed to be stationary before autocorrelation is used for Box and Jenkins modeling ...
4k views

### How to perform pooled cross-sectional time series analysis?

For 86 companies and for 103 days, I have collected (i) tweets (variable hbVol) about each company and (ii) pageviews for the corporate wikipedia page (...
611 views

### How to tell if residuals are autocorrelated from a graphic

When you do an OLS regression and plot the resulting residuals, how can you tell if the residuals are autocorrelated? I know there are tests for this (Durbin, Breusch-Godfrey) but I was wondering if ...
524 views

### Linear Regression and Spatial-Autocorrelation

I want to predict Tree Heights in a certain area using some variable obtained through remote sensing. Like approximate Biomass, etc. I want to first use a linear regression (I know it's not the best ...
988 views

### Two sample t-test for data (maybe time series) with autocorrelation?

I am new to statistics, so pardon any mistakes in my question. I have two time series $X_i$ and $Y_i$. Assuming that they're stationary AR(1) processes with possibly different means, how do I test ...
103 views

### Why is Moran's I not equal to “-1” in perfectly dispersed point pattern

Is wikipedia wrong...or I don't understand it? Wikipedia: The white and black squares ("chess pattern") are perfectly dispersed so Moran's I would be âˆ’1. If the white squares were stacked to one ...
362 views

### In spatial regression, what is a spherical autocorrelation structure?

I have a large gridded dataset for the globe (i.e a spherical, wraparound surface) that I'm applying spatial regression to (using a CAR model). I've been using the default autocorrelation function, ...
278 views

### Is there an intuitive interpretation of a negative variogram “nugget” value?

A variogram plots the variance of the difference between sample pairs on a field (any dimensionality) against spatial separation (the "lag") of those samples. The extrapolation from observed ...
2k views

### What to read from the autocorrelation function of a time series?

Given a time series, one can estimate the autocorrelation-function and plot it, for example as seen below: What is it then possible to read about the time series, from this ...
145 views

### Stuck at analyzing large and complex data set

I've got an extremely large and complex dataset and getting frustrated with the analysis. In essence, my target question is a simple one. I am comparing insect flower visitation on >30 plant types. ...
50 views

### Inducing autocorrelation by fitting the wrong ARMA?

I am trying to fit an ARMA(p,q) model to the mean equation of my return series. The problem is, that the acf and pacf are pretty not usable, i.e. it is hard to find a good model to take account of the ...
177 views

### Quantile regression and heteroscedasticity/autocorrelation

I hear it said [1] that QR makes no distribution assumptions about its error term. Question 1: Does this mean that heteroscedastic and serially correlated disturbances do not effect the ...
103 views

### Is the model wrong if a coefficient changes from minus in correlation table to plus in OLS?

Perhaps a very basic question but one that has me confused. Say, in a correlation table the relationship between A and the DV (...
1k views

### Creating auto-correlated random values in R

We are trying to create auto-correlated random values which will be used as timeseries. We have no existing data we refer to and just want to create the vector from scratch. On the one hand we need ...
426 views

### Analyze and generate “clumpy” distributions?

Are there standard ways of analyzing and generating "clumpy" distributions? analyze: how clumpy is a given point cloud (in 1d, 2d, nd), what are its clumpy coefficients? generate or synthesize a ...
171 views

### Algorithm to produce autocorrelated uniformly distributed number

I would like to produce a time-series of autocorrelated probabilities (with a predefined mean level of autocorrelation). I've spotted this and this which I believe should give me what I'm looking ...
8k views

### Autocorrelation and heteroskedasticity in panel data

In the research, both autocorrelation and heteroskedasticity are detected in panel data analysis. I can solve them separately in stata with command "xtregar" and "robust", respectly. However, I cannot ...
262 views

### ARIMA — Residual autocorrelation is non-significant upto lag 6 and significant beyond lag 6

I tried to fit an AR(1) model and was examining the estimates of the model. I had a question on the output (ran in SAS - Proc ARIMA): The residual auto-correlation up to lag 6 was non-significant (in ...
454 views

### What is the power of the Ljung-Box Test for auto-correlation?

How large sample size should be for Ljung-Box statistic to achieve a power $\ge 0.5$ when number of lags tested is 1? How does the power fall ( assuming an AR(1) process), with increasing number of ...
227 views

### Smoothness of a surface

I am currently working on a model which takes two parameters and produces a measurement statistic. Think of it as Z = f(X,Y). Z is a matrix of my statistics and I am creating a surface plot of it in ...
179 views

### Construct confidence interval of the mean for auto-correlated data

I feel like I'm missing something obvious, but here we go. I have auto-correlated data measured in triplicate for two (or more) treatments. Something like this: ...
223 views

### (Quantile regression) Which standard error for heteroscedasticity & serial correlation

I have heteroscedastic and autocorrelated residuals in my multivariate quantile regression model. What's the quantile regression standard error estimator that's robust to this? Something hopefully ...
451 views

### Autocorrelation from multiple time series samples

I have multiple samples of a time series (for example, the time series might be minutely samples from 12am to 3pm, and I have that for ten different days) and I'd like to compute the autocorrelation ...