Tagged Questions
0
votes
1answer
31 views
user-defined correlation matrix in r package nlme with negative values
I have a nonlinear model with residuals that are negatively autocorrelated at short distances.
I can find no spatial correlation structures in nlme that can easily handle negative autocorrelation ...
0
votes
0answers
29 views
regression: handling negative autocorrelation in R?
I am running a regression in the R package nlme (but am not constrained to only that package). I am changing the spatial scale of the analysis over a few regression runs as a form of sensitivity ...
3
votes
2answers
72 views
Confidence bands in case of fitting ARIMA in R?
I want to look at the acf and pacf of my data, to identify the model for my mean equation, so I want to fit an ARMA for my mean equation and later on model the conditional variance by a ARCH/GARCH (I ...
3
votes
2answers
230 views
Correlogram in R like in Stata?
In STATA I can create a "Correlogram" to find the appropriate lag order in case of time series. E.g.
I know I can use the acf or Acf of the forecast package to calculate the ACF and PACF and to ...
2
votes
2answers
53 views
Omit 0 lag order in ACF plot
How can I omit the zero lag order in an acf plot? See this picture:
generated by
...
1
vote
1answer
41 views
Fancy Autocorrelation plot of rugarch package?
On page 26 in the rugarch package you can see plots of autocorrelations. I want to use this autocorrelation plots, but not for my final model checking, but for my model identification. So these are ...
1
vote
1answer
58 views
What to do about Seasonality Patterns in ACF, Time Series Data
I'm dealing with a time series data and I'm trying to construct a time series model for this particular dataset. I'm new to R and tried using the the auto.arima ...
0
votes
0answers
62 views
Autocorrelation in Residuals for VAR model
I am making some macro three-variable VAR models in R, where one of my models have autocorrelation in the residuals, as tested by a B-G LM test.
The two models are:
...
0
votes
0answers
132 views
Multivariate values to acf() in R
I am trying to understand the concept of auto correlation and I am looking for some help to clear some doubts regarding my data.
I have a time series data and it has repeated experiments. Each sample ...
0
votes
0answers
68 views
Autocorrelation of nonstationary IMA(1,1) process
I knwo that the autocorrelation in MA(1) process varies between -.5 and +.5, if we consider d(t)=c+e(t)−θ⋅e(t−1),then for positive values of Theta, autocorrelation is negative and for negative values ...
0
votes
0answers
50 views
finding x intercept from a set of values
I have run an ACF on a function in R and it returns:
Autocorrelations of series ‘sine.curve’, by lag
...
2
votes
1answer
175 views
How to model binary dependent data with temporal autocorrelation?
I am trying to model annual tree nut production using climate predictors.
The nut data (dependent) is a binary timeseries (0,1 - representing unsuccessful and successful nut production), with one ...
6
votes
1answer
468 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:
...
3
votes
0answers
77 views
(Quantile regression) AR(1) variable in the design matrix
I'm not doing a pure QAR (quantile auto regression) but I do have a lagged dependent variable (AR(1)) as a predictor. I'm using the quantreg package in ...
5
votes
1answer
366 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 ...
17
votes
3answers
699 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 ...
1
vote
0answers
88 views
Discriminant analysis with random effects
Is it possible to do discriminant analysis with random effects?
Is there an R package for this?
Context:
I have habitat use data for two species of frogs from radio telemetry, but nested within ...
3
votes
2answers
976 views
Most appropriate way to make a time series stationary? (i.e. remove serial correlation?)
So I have this data set of 56 users with 52 weeks worth of weekly average data for blood pressure and exercise level recordings. I would like to use change point analysis ...
3
votes
3answers
707 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 ...
5
votes
2answers
1k 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 ...
6
votes
1answer
166 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 ...
6
votes
0answers
601 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 ...
7
votes
3answers
7k 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:
...
9
votes
2answers
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 ...
2
votes
3answers
431 views
How to exploit periodicity to reduce noise of a signal?
100 periods have been collected from a 3 dimensional periodic signal. The wavelength slightly varies. The noise of the wavelength follows Gaussian distribution with zero mean. A good estimate of the ...
9
votes
3answers
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...
6
votes
1answer
2k 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 ...
10
votes
1answer
123 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 ...
