How to run a regression of a time series with random data and log-norm distribution?

3 次查看(过去 30 天)
I have a vector containing 6,000 random entries distributed with log-norm. What type of regression model should I use?
This is my dataset
% generating time series with 6000 entries log-normal distributed
rng ( 'default' ); % So that numbers can be repeated
time_series2 = lognrnd (0,0.25,6000,1); % generating time series with mu set to zero and sigma 0.25
This is what I have so far
% REGRESSION TIME SERIES 2
logarithms_ts2 = log (time_series2); % calculating logarithm of the values ​​in order to use GLM fuction
% [regression2, dev, stats] = glmfit (xtime2, logarithms_ts2, 'normal');
regression2 = fitglm (xtime2, time_series2) % regression of time series 2
% GLM function does not support lognormal distributions, so the logarithms
% are calculated in order to use the GLM fit function with the use of normal
% distribution https://www.mathworks.com/matlabcentral/answers/101420-why-does-the-glmfit-function-not-recognize-lognormal-as-a-distribution

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Curve Fitting Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by