All Questions
5,826 questions
0
votes
0
answers
27
views
Plausibility of results for PCR/PLSR daily stock return forecasting
I'm working on a project for my master's degree and, I am not sure, whether the results I'm getting are plausible or not.
I am basically trying to create a model for forecasting S&P 500 return ...
1
vote
1
answer
30
views
Identifying Poorly Forecastable Time Series Using tsfeatures
I am working on a problem involving the identification of poorly forecastable time series using features extracted with the tsfeatures library by Rob J. Hyndman. Below are the key details about my ...
1
vote
2
answers
30
views
Should I conduct a multilevel for this or another analysis? Need help
I have three sources of data (teachers, parents and students) assessing students, in three waves. I want to assess all and see the differences between moments but then I also want to use variables for ...
0
votes
0
answers
24
views
Difficulty in Deriving a Estimator Using Survey Means from Individual Forecasts
I would like to clarify a doubt regarding the paper Testing the Rationality of Price Forecasts: New Evidence from Panel Data (by MICHAEL P. KEANE AND DAVID E. RUNKLE) that presents an estimator ...
-1
votes
0
answers
8
views
what happens when a network has low closeness centrality - what happens to nodes on the periphery [closed]
I have thirty-nine nodes with closeness centrality scores but I do not know what to say about the nodes on the periphery who do not have scores.
3
votes
1
answer
46
views
Calculate marginal effects for random effects model with two crossed random effects
I am trying to get effects marginal of two crossed random effects (using STAN or brms). I understand how to do it for a single random effect following McElreath's book and Kurtz's brms version of the ...
0
votes
0
answers
25
views
AIC from sarima vs arima functions in R
I am doing a report of time series, and while analyzing the time series in R, I noticed the using the sarima function
...
4
votes
2
answers
41
views
Accounting for non-independence and autocorrelation in HGAM
I am currently trying to fit a HGAM to model differences in daily activity patterns of fish in two treatments. Data were collected with high-resolution telemetry, and I currently have estimates of ...
0
votes
0
answers
22
views
Derive gamma-parameters from preset R^2 in mixed models
For a simulation study in R, I want to select the effect sizes according to a preset $R^2$.
Consider this two level random intercept mixed model, with one L1 predictor $X_{ij}$ and one L2 predictor $...
0
votes
0
answers
7
views
How should I input and output feature and target timeseries to timeseries transformer
I am trying out PatchTST timeseries transformer (paper, code) on a timeseries data that I have. The way PatchTST handles data is as follows:
Note that on line 78-79, the repo does following:
...
4
votes
1
answer
126
views
How to approach time series forecasting
I am working on a time series forecasting problem involving high-frequency data (hourly or every 10-15 minutes), such as energy consumption or other IoT device metrics. My goal is to predict the ...
0
votes
0
answers
9
views
Extracting individual level posterior class memebership probabilities in multilevel LCA
I am conducting a multilevel laten class analysis using the R package multilevLCA.
I have fitted the model using multiple steps (i.e. determining optimal number of classes as well as clusters). I now ...
0
votes
0
answers
8
views
Cointegration when one variable is seasonal and another is not
I have two variables: one has a seasonal 12-month pattern and another is seasonally adjusted. I need to make a long-term forecast for 10 years. To do this, one can try out an Error Correction Model if ...
3
votes
1
answer
48
views
How to best forecast a time series showing level changes and square wave kind of behavior with noise
This is AC power data measured at 1 min interval from March-Dec 2019. I want to model the time series but the out of sample forecast is essentially constant. I found the following from EDA:
Power is ...
6
votes
1
answer
125
views
Is there a way to forecast by subgroup without forecasting each subgroup separately?
I am trying to find an appropriate model to forecast the number of applications received at the end of a recruitment cycle based on previous recruitment cycles and the number of applications received ...
2
votes
0
answers
15
views
Forecast optimality for categorical dependent variable
I am familiar with several criteria of forecast optimality for variables on a ratio scale. E.g. Diebold Forecasting in Economics, Business, Finance and Beyond introduces the unforecastability ...
1
vote
0
answers
49
views
Opposite results using Bayesian (STAN) vs Multilevel model (nlme). How is this possible?
My datasets contains the median wages and the cumulative installed wind-capacity for 4000 counties over a period of 20 years. The wages tend to rise over the period and the capacity tends to highly ...
1
vote
0
answers
18
views
ML approaches to pricing in industry?
This is a very vague question. I’m curious how pricing is done in industry, specifically at large tech companies. I know that Amazon does not price discriminate based on user, so price experiments are ...
0
votes
0
answers
18
views
How to Forecast Sales for Sub-Locations Without Historical Proportion Data?
I have a time series dataset of total sales for a product in a store over time. This product is available in two different locations within the store: one stand near the checkout and another stand in ...
0
votes
0
answers
14
views
Under which conditions does PCA consistently estimate latent factors in a Dynamic Factor Model?
Consider a dataset of N time series and T observation periods.
Assume each series $x_t$ is generated from a single (unobserved) common factor $f_t$ following this model:
$$
X_t = \Lambda f_t + \...
0
votes
0
answers
50
views
Making forecasts based on cyclical data
I am trying to develop a more robust methodology for a forecast model. This attempts to project the final number of recruits for this cycle based on comparing the current recruitment cycle to previous ...
0
votes
0
answers
24
views
Multilevel Model in R
I have data from a study in which 19 participants (9 males, 10 females) have each completed 4 jumping conditions (BW, 20, 25, 30) whilst I have measured joint level data for the hip, knee and ankle. I ...
2
votes
1
answer
34
views
Fitted values of initial observations in auto.arima for non-stationary models
If I understand correctly, the fitted values returned in the auto.arima of the forecast R package are the one-step ahead forecasts given by the model, once the ...
0
votes
1
answer
42
views
CWC(M) in multilevel modeling
I am new to multilevel modeling and recently learned about CWC(M) by Zhang et al. (2009, https://journals.sagepub.com/doi/abs/10.1177/1094428108327450). I am running a multitlevel moderated mediation ...
3
votes
1
answer
151
views
Cannot reproduce Continuous Ranked Probability Score (CRPS) from Python package
The Continuous Ranked Probability Score (CRPS) is given by:
\begin{equation}
\mathrm{CRPS}(F, x) = \int_{-\infty}^{\infty} \left( F(y) - \mathbb{1}(y - x) \right)^2 \, dy
\end{equation}
I am trying to ...
0
votes
0
answers
7
views
Forecast calibration with a general explanatory factor
I'm thinking of making a set of probability-based prediction for the coming 2 years of the Trump administration. The prediction will be a set of propositions like:
There will be a federal ban on ...
2
votes
0
answers
12
views
Predicting a jobs cost based on monthly payments (Timeseries forecasting)
Imagine theres a company that hires a cleaning crew each month. Payments are made in the following months, bit by bit.
As depicted below:
In Jan the company paid the cleaning crew ...
0
votes
0
answers
14
views
Name for Heidke skill score with model-free reference model
The Heidke skill score is a popular measure for quantifying forecasting skill. It follows the general definition of a skill score (SS):
$$SS = \frac{l_m-l_r}{l_p-l_r},$$
with $l_p$ the loss of a ...
1
vote
0
answers
28
views
Recursive one-step forecasting in timeseries model
I am trying to implement a recursive one-step forecasting approach for a Random Forest model.
The idea is to get a 12-months forecast in an iterative way where each prediction becomes part of the ...
0
votes
0
answers
12
views
mice multilevel imputation: does specifying cluster variable ("-2" in predictor Matrix) without multilevel methods lead to cluster robust imputation?
In short: Are mice's imputations cluster robust when I only specify the cluster variable with "-2" in the predictor matrix but do not use multilevel models during imputation?
For clustered ...
0
votes
0
answers
17
views
Deriving a multiple based on actuals and forecast values
For context, we are using the DeepAR model for demand planning forecasting. Currently the forecast often underrepresents actual demand. It was suggested that we use a higher quantile to overestimate ...
4
votes
1
answer
45
views
How to Simulate a Multilevel Predictor Variable with Both L1 and L2 Variance Components?
I'm working on simulating multilevel data where I have a predictor variable measured at Level 1 (L1), which has both L1 and L2 variance components. For example, I want to simulate a socio-economic ...
2
votes
1
answer
35
views
Reporting Hierarchical Regression Results in Abstract
I did a hierarchical regression test in a social science study looking at how two variables (A and B) and their interaction term can predict variable C. My mentor told me to write in the abstract that ...
0
votes
0
answers
24
views
Forecasting for Multivariate Time Series on Multiple Subject
Let's imagine I have time series data for 50 users and 20 features per user: User1_ts(F1,...F20), User2_ts(F1,...F20), ...User50_ts(F1,...F20). F20 is my target variable, and the goal is to apply to ...
4
votes
1
answer
235
views
Huge Bounds on Forecast Interval for ARIMA model
I'm working on a financial forecast and trying out a simple SARIMA model to try and forecast the year of 2025. I think the predicted values and fit of the model are fine, and I've tested out many ...
8
votes
1
answer
286
views
Should out-of-sample validation also be out-of-time for time-series?
Introduction
When training a model a "sample" usually refers to the data used to fit the model, so...
Sample: Data used for training model
Out-of-sample: Data not used for training model
Out-...
3
votes
1
answer
131
views
Arima function in R incorrectly including an additional MA term
When fitting an ARIMA model (with Arima function from the forecast package) there is an additional hidden MA term.
...
2
votes
1
answer
34
views
Is it possible to train Neural networks for time series forecasting using elastic distances (such as dtw) as a loss function?
Normally, elastic distances are used as ways to tell how similar two time series are. Examples of these are dynamic time warping and move-split-merge and many more. And I read some researches such as ...
0
votes
1
answer
33
views
Mediation models require a sigma matrix that is symmetric
I'm trying to fit the following reproducible mediation model called final. But I get an error saying:
sigma must be a symmetric matrix
Could you please advise how ...
2
votes
0
answers
16
views
Which estimator to choose for meta-analysis^ REML or CR2 with Wild Bootstrap?
I am following the following book: https://bookdown.org/MathiasHarrer/Doing_Meta_Analysis_in_R/multilevel-ma.html
I can't choose which estimator to choose: REML or CR2 with Wild Bootstrap.
Or maybe ...
3
votes
1
answer
61
views
How can we simulate correlated random variables that vary at different levels in a multilevel/mixed effects setting?
I am very familiar with generating correlated random variables from a multivariate normal distribution.
This question is about doing that in a multilevel setting, where variables only vary at ...
2
votes
1
answer
78
views
General formula for mixed models
I'm trying to wrap my head around the general formula of mixed models and how it relates to the system of equations I'm used to.
The general formula read like this:
$$\mathbf{Y_{j}}=\mathbf{X_{j} \...
1
vote
1
answer
74
views
Predicting Sales Volume for Complex Customer Base with Time Series Data
I'm working on a time series problem and would appreciate advice from the community. My goal is to predict the sales volume ordered per customer, per product family, for the next 2-4-6 weeks. The data ...
4
votes
1
answer
39
views
Outcome in mixed models - lower level or upper level?
I am learning about mixed models and I have a question regarding the outcomes that can be considered. If I have hierarchical data, do the outcomes that I can consider need to belong to the lower level?...
3
votes
2
answers
79
views
Predicting the Next Event's Timestamp Based on Historical Data with Possible Patterns?
I'm working on a personal project where I aim to predict the time of the next event based on a series of historical timestamps. The dataset I have consists of around 400k timestamps of past events.
...
8
votes
1
answer
471
views
Power analysis for three-level multilevel models in R
For a study in a social science setting - where huge number of participants are not easily available - I'm trying to do a power analysis for a three-level multilevel design.
There are few packages ...
1
vote
0
answers
72
views
The Notion of "Predictability" (in Forecasting)
Looking for thought partners to help me clarify a shower thought.
Let's assume I'm a forecaster, and I have in front of me several events with binary outcome–– e.g. a bent coin toss, a two-candidate ...
1
vote
0
answers
15
views
How to Set Up a Polynomial Multilevel Model
I have a modeling situation that I am not 100% sure how to approach. I have two independent variables, information and time, with time being a repeated measure. The dependent measure is difference. ...
1
vote
1
answer
26
views
Is there away to compute Index values (base 100) from Year-over-Year % change (YoY) of the variable?
Let's assume I have a time series like this :
Time period
YoY Change (%)
Y2024 _ Q1
7.00
Y2024 _ Q2
4.85
Y2024 _ Q3
5.77
Y2024 _ Q4
5.66
Y2025 _ Q1
6.54
Y2025 _ Q2
6.48
Y2025 _ Q3
6.36
Y2025 ...
2
votes
0
answers
26
views
Can we apply Fourier transform on non stationary data?
Hi, I'm trying to predict US inflation rate. The unit is in percentage change from a year ago. Would it be possible to use Fourier transform on the independent data to create a new feature, knowing ...