Yahoo_get loading problem
by Ramki S
Hi, Anyone facing this problem? I tried on two different computers. Same Issue.
gretl version 2025b
Current session: 2026-09-24 15:48
? nulldata 271
periodicity: 1, maxobs: 271
observations range: 1 to 271
? setobs 5 2015-01-02
Full data range: 2015-01-02 - 2016-01-15 (n = 271)
? include yahoo_get.gfn
Error loading yahoo_get.gfn
Error executing script: halting
> include yahoo_get.gfn
2 days, 9 hours
How to get L2 and CWC variables quickly
by Ramki S
When working with panel data, I need to create the cwc (centered within cluster) variables quickly. Although there is "add time mean.." will do exaclty this job in creating L2 variable, I have to do one more step to create the cwc variable. Can we have some function to do the both? I am using the terminology used in multi-level models.
series Q_output_L2 = pmean(Q_output)
series Q_output_cwc = Q_output - Q_output_L2
series PF_fuelprice_L2 = pmean(PF_fuelprice)
series PF_fuelprice_cwc = PF_fuelprice - PF_fuelprice_L2
series LF_loadfactor_L2 = pmean(LF_loadfactor)
series LF_loadfactor_cwc = LF_loadfactor - LF_loadfactor_L2
3 days, 1 hour
R in gretl error
by Ramki S
Hi,
If there is some error i encountered in gretl using R, like running pairs.panels without loading psych package, even after corrected the code, the old mistake is recycled.
<gretl>
foreign language=R --send-data
pacman::p_load(psych, dplyr)
df = gretldata
head(df)
pairs.panels(select(df, 1:4))
end foreign
</gretl>
output:
gretl version 2026b
Current session: 2026-09-26 22:37
? foreign language=R --send-data
? pacman::p_load(psych, dplyr)
? df = gretldata
? head(df)
? pairs.panels(select(df, 1:4))
? end foreign
Error in gretl.get.data() : could not find function "gretl.get.data"
Error in pairs.plot(df[, 1:4]) : could not find function "pairs.plot"
Error in pairs.plot(df[, 1:4]) : could not find function "pairs.plot"
Error in select(df, 1:4) : could not find function "select"
Error in UseMethod("select") :
no applicable method for 'select' applied to an object of class "c('mts', 'ts', 'matrix', 'array')"
Error in UseMethod("select") :
no applicable method for 'select' applied to an object of class "c('mts', 'ts', 'matrix', 'array')"
In addition: Warning message:
In par(old.par) : calling par(new=TRUE) with no plot
The process cannot access the file because it is being used by another process.
Error executing script: halting
> end foreign
3 days, 21 hours
Split regression and Groupby Summary Statistics
by Ramki S
The R integration in gretl is so good and fast. I am trying to get similar results in Gretl.
1. summary statistics split by multiple variables
2. Split regression
Gretl has a function summary statistics factorized, but it takes only one variable and one split variable only.
The following code gives summary statistics for factor variables cyl and am on disp and mpg, Regression split by cyl.
foreign language=R
pacman::p_load(dplyr, fpp3, purrr, broom)
url = "https://gist.githubusercontent.com/seankross/a412dfbd88b3db70b74b/raw/5f2..."
mtcars <- readr::read_csv(url)
#summary statistics by group.
summarise(mtcars, .by = c(cyl, am),
across(
c(mpg, disp),
c(mean = mean, sd = sd, nobs = length)
)
)
# split regression
split(mtcars, mtcars$cyl) |> map(~ lm(mpg ~ disp, data = .)) |>
map(tidy) |> list_rbind(names_to = "id")
end foreign
Finally,
For pipe variable, R studio insert |> upon pressing ctrl+shift+m. Can we have similar in gretl?
1 week, 1 day
Making Gretl First hand choice
by Ramki S
I have seen a few threads talking about why Gretl is not as popular as R. Yes, R has wider eco-system and more packages. However, Gretl surely has its own advantages in terms of point and click interface and easy to start with. And I really love its speed and neat output. Its R integration is really working fast and smooth. After having worked with so many point and click softwares like SPSS, Stata, smartpls, pspp, matlab....and programming languages mainly R and Python, I would like to share my thoughts.
Gretl is great for time series and Gretl development should focus on making it first hand choice. Today when I try to replicate a book like Fpp3, still I am struggling with Naive forecasting and winters with inconsistent results. We also know that why python is considered great for machine learning because of consistent boilerplate code. Only the algorithm name changes, but all other steps remain the same. Split data into train and test, fit the model etc.
However, in case of Gretl, some times I need to add observations and some times the software gives option how many out of sample horizon you need. A user prefers, for any forecasting or smoothing method, the point and click should ask, how many in sample forecasts you need, and how many out-of-sample forecasts you need to predic. For train and test data it should provide common metrics, mape, rmse, mad etc. For each forecast it should be the way.
We don't have to be best in all types of data. For example, for experimental design, jamovi or spss are the best and it is enough to do any sort of analysis that is publication ready. And, some packages like vijplots are based on famous ggplot2 and they are excellent. Jtransform is based on dplyr and I can do many thing without coding in jamovi now for data manipulation.
We cannot expect, that these changes happen very soon, but over a period of time this consistent philosophy makes gretl the first choice for time series or any other analysis. Imagine the joy of a user who will replicate a book (Fpp3) based on a programming language but can do everything using point and click. It is great for teachers also to teach some thing first time to the students using gretl.
These are just my thoughts and no offence in any way.
1 week, 2 days
Package updates (August 2026)
by Riccardo (Jack) Lucchetti
Dear all, this message is to inform the community about the activity in
our function package repository. During the month of August 2026, 2
package were updated:
"lp-mfx", by Alllin Cottrell ( logit/probit marginal effects)
"TenTS", by Giovanni Ferretti (Tensor manipulation, especially for time
series)
Allin's update is a bugfix, for the case when computing average marginal
effects with ordered
logit or probit models. Giovanni's update adds two new functions for
tensor decomposition (CP and Tucker).
Download and enjoy!
--
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
2 weeks
Results discrepency with fpp3 for Winters
by Ramki S
Hi,
I tried to replicate the exponential smoothing chapter of fpp3 and winter models with both fcModels, and Winter models of Ignacio. Datasets are given below. Further, there is no option to check damped trend, additive and multiplicative models. FCmodels is good and giving the accuracy metrics for both insample and out of sample but the prediction of both insample and out of sample are not matching. The parameter estimations are given below.
Ignacio Winters (additive):
α = 0.233618, β = 0.127267, γ = 0
FCmodels:
Level alpha: 0.310; Trend gamma: 0.110; Seasonality beta: 0.040
FPP3:
α=0.2620, β∗=0.1646, γ=0.0001 and RMSE =0.4169.
Outof sample predictions:
fcmodels Fpp3 Ignacio Winters
2018 Q1 13.3235 12.9 12.91998
2018 Q2 11.29311 11.2 11.19334
2018 Q3 10.88294 11 10.92118
2018 Q4 11.17063 11.2 11.19021
2019 Q1 13.87172 13.4 13.37554
2019 Q2 11.75305 11.7 11.6489
2019 Q3 11.32171 11.5 11.37674
2019 Q4 11.61651 11.7 11.64577
2020 Q1 14.41993 13.9 13.8311
2020 Q2 12.21299 12.2 12.10446
2020 Q3 11.76047 11.9 11.8323
2020 Q4 12.06238 12.2 12.10133
https://otexts.com/fpp3/ses.html
Data:
https://drive.google.com/drive/folders/1gCx-mwxzidTAGs_9tir5i0boJEjVLa2l?...
3 weeks, 4 days