Gretl-Hansl "IDE" for Sublime editor
by Artur Tarassow
Dear all,
some weeks ago I've started to switch to the sublime editor
(https://www.sublimetext.com/) for writing gretl code.
Even though I like the simplicity of the gretl editor and its features
such as syntax highlighting and auto-itendation, it lacks some features
of modern IDEs such as "goto-anything", "goto-definition", custom
keybindings, fancy themes, git-implementation, snippets etc. which make
life much easier when working on larger projects. Don't get me wrong,
the gretl editor is great but was _never_ supposed to become a proper
software-development IDE but rather has another focus which is totally fine.
So I started to write the "Hansl-Gretl-Language" package for sublime
which includes the following features:
- 3 gretl build-systems (client mode, batch mode, and REPL mode) for
executing hansl code by means of sublime (plots are also working!)
- syntax-highlighting
- completion of gretl commands, accessors and keywords
- some snippet examples for speeding up coding
The project still has the following (known) issues:
- no auto-itendation (still have to figure out how this works)
- issues with some corner-cases which are not syntax-highlighted (regex
can become so hard!)
The package can be downloaded through sublimes package control system,
and can be found here:
https://packagecontrol.io/packages/Hansl-Gretl-Language
If somebody wants to participate on this project, check out the code on
my github repository:
https://github.com/atecon/Hansl-Gretl-Language
For those interesting in the sublime editor, check out "OdatNurd"'s
brilliant tutorials on youtube:
https://www.youtube.com/user/nurdz
Enjoy the package,
Artur
10 months, 2 weeks
Network Field Technician
by ashaikfe@gmail.com
A Network Field Technician is responsible for network development and maintenance in the field for any organization. The individual works with the organization’s technical team and its clients to install, configure, maintain, and fix all LAN/WAN and other equipment issues, ensuring efficient network functionality.
The technician maintains computer equipment, mobile devices, phones, cabling, routers, switches, and printers, among others, to address all of the client’s networking requirements either remotely or at the clients’ premises.
Read More: https://www.fieldengineer.com/skills/network-field-technician
3 years
why cmod?
by Sven Schreiber
Hi,
I'm wondering why the cmod() function is needed. It computes the modulus
of a complex number (or many of them in a matrix), OK fine. But so does
abs(). And abs() also works on plain real numbers, where cmod cannot be
used. Could it be a path-dependent thing: first abs() didn't cover
complex numbers but then rendered cmod() obsolete by also working on
those? Or is there anything else which I'm missing?
Otherwise, maybe a case for deprecating or hiding cmod?
thanks
sven
3 years, 2 months
package announcement: MSVAR
by Sven Schreiber
Hi everybody,
just a note that since last week or so there's a new contributed
function package on the gretl package server, namely MSVAR(.zip). As you
may guess from the name it does Markov-Switching VAR estimation.
(Frequentist, not Bayesian.)
I am very grateful to the author of the original Gauss code, Anders
Warne, that he continues to make his code available. Of course as the
package author I am responsible for any mistakes, but I haven't really
developed the algorithm or implementation per se.
The package is work in progress, but already comes with quite extensive
documentation. There are surely still a bunch of bugs in there, but in
principle it should hopefully be usable.
As explained in the documentation, this package can be driven by hansl
scripting (of course) but also via the GUI by attaching it to the menus
of the regular VAR model window during installation: So you would first
estimate a plain old VAR, and then go to the Edit window to find MSVAR
there and switch over to a switching model.
See some of you tomorrow at the virtual gretl workshop!
cheers
sven
3 years, 4 months
New packages for autoregressive Probit and Hamilton filter
by Sven Schreiber
Hi everybody,
just a quick notice that recently two new contributed function packages
have seen the light of the gretl world:
- 'ARprobit', which implements the Kauppi&Saikkonen approach to estimate
a dynamic Probit model including an autoregressive term (in addition to
lags of the dependent dummy).
- 'hamilcycle', which applies the simple but already popular proposal by
Hamilton to do a regression-based filter of a time series to obtain a
cyclical component (based on an idea by Jack a year ago)
As always (sorry for being repetitive) you can get these and other
contributed packages online from within gretl ("fx" button at the
bottom, or through the menu File/Function packages/On server).
cheers
sven
3 years, 4 months
Re: Gretl-users Digest, Vol 173, Issue 10
by George Matysiak
Than you for the comments which are very helpful.
On Fri, 18 Jun 2021 at 18:18, <gretl-users-request(a)gretlml.univpm.it> wrote:
> Send Gretl-users mailing list submissions to
> gretl-users(a)gretlml.univpm.it
>
> To subscribe or unsubscribe via email, send a message with subject or
> body 'help' to
> gretl-users-request(a)gretlml.univpm.it
>
> You can reach the person managing the list at
> gretl-users-owner(a)gretlml.univpm.it
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Gretl-users digest..."
>
> Today's Topics:
>
> 1. Re: Regression Cross-Validation (George Matysiak)
> 2. Re: Saving excluded observations from a Random sub-sample
> (George Matysiak)
> 3. Re: Regression Cross-Validation (Sven Schreiber)
> 4. Re: Saving excluded observations from a Random sub-sample
> (Sven Schreiber)
> 5. Re: Saving excluded observations from a Random sub-sample
> (Riccardo (Jack) Lucchetti)
> 6. Re: Regression Cross-Validation (Riccardo (Jack) Lucchetti)
>
>
> ----------------------------------------------------------------------
>
> Date: Fri, 18 Jun 2021 15:05:45 +0200
> From: George Matysiak <gmatysiak(a)gmail.com>
> Subject: [Gretl-users] Re: Regression Cross-Validation
> To: gretl-users(a)gretlml.univpm.it
> Message-ID:
> <CAEWMk7ucC=+iG0aSd-Usf7=
> SeqfoshPEWChJJfpQnaE2dWayvQ(a)mail.gmail.com>
> Content-Type: multipart/alternative;
> boundary="000000000000e0f39205c509fc63"
>
> --000000000000e0f39205c509fc63
> Content-Type: text/plain; charset="UTF-8"
>
> Is it possible to undertake k-fold cross-validation in estimating
> regression equations? Thanks.
>
> --000000000000e0f39205c509fc63
> Content-Type: text/html; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
> <div dir=3D"ltr"><div class=3D"gmail_default"
> style=3D"font-family:tahoma,s=
> ans-serif;font-size:small">Is it possible to undertake k-fold
> cross-validat=
> ion in estimating regression equations? Thanks.<br
> clear=3D"all"></div><div=
> ><div dir=3D"ltr" class=3D"gmail_signature"
> data-smartmail=3D"gmail_signatu=
> re"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div
> =
> dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div
> dir=3D"lt=
> r"><div><div dir=3D"ltr"><div><font
> style=3D"background-color:rgb(255,255,2=
> 55)" face=3D"comic sans ms,
> sans-serif"><br></font></div></div></div></div>=
>
> </div></div></div></div></div></div></div></div></div></div></div></div></d=
> iv></div></div>
>
> --000000000000e0f39205c509fc63--
>
> ------------------------------
>
> Date: Fri, 18 Jun 2021 15:35:33 +0200
> From: George Matysiak <gmatysiak(a)gmail.com>
> Subject: [Gretl-users] Re: Saving excluded observations from a Random
> sub-sample
> To: gretl-users(a)gretlml.univpm.it
> Message-ID:
> <
> CAEWMk7th4SsOgC_jmoZ6FhdAmCTdW2ScFxzi0PYcwyUbQSSJmw(a)mail.gmail.com>
> Content-Type: multipart/alternative;
> boundary="0000000000006cb46f05c50a679a"
>
> --0000000000006cb46f05c50a679a
> Content-Type: text/plain; charset="UTF-8"
>
> Having selected a Random sub-sample, is it possible to save the excluded
> observations as variables? Thanks.
>
> --0000000000006cb46f05c50a679a
> Content-Type: text/html; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
> <div dir=3D"ltr"><div class=3D"gmail_default"
> style=3D"font-family:tahoma,s=
> ans-serif;font-size:small">Having selected a Random sub-sample, is it
> possi=
> ble to save the excluded observations as variables? Thanks.<br
> clear=3D"all=
> "></div><div><div dir=3D"ltr" class=3D"gmail_signature"
> data-smartmail=3D"g=
> mail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div
> dir=3D"ltr=
> "><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div
> dir=3D"ltr"><div><d=
> iv dir=3D"ltr"><div><div dir=3D"ltr"><div><font
> style=3D"background-color:r=
> gb(255,255,255)" face=3D"comic sans ms,
> sans-serif"><br></font></div></div>=
>
> </div></div></div></div></div></div></div></div></div></div></div></div></d=
> iv></div></div></div></div>
>
> --0000000000006cb46f05c50a679a--
>
> ------------------------------
>
> Date: Fri, 18 Jun 2021 15:51:36 +0200
> From: Sven Schreiber <svetosch(a)gmx.net>
> Subject: [Gretl-users] Re: Regression Cross-Validation
> To: gretl-users(a)gretlml.univpm.it
> Message-ID: <d636eebf-a7a7-63c5-54f4-86a3d974d160(a)gmx.net>
> Content-Type: multipart/alternative;
> boundary="------------E7450D5FBB186983D61973CE"
>
> This is a multi-part message in MIME format.
> --------------E7450D5FBB186983D61973CE
> Content-Type: text/plain; charset=utf-8; format=flowed
> Content-Transfer-Encoding: quoted-printable
>
> Am 18.06.2021 um 15:05 schrieb George Matysiak:
> > Is it possible to undertake k-fold cross-validation in estimating
> > regression equations? Thanks.
> >
> Hi, for regularized LS under Model/Other linear models you get CV. (For
> GUI access it could be that you need a post-2021b snapshot, not sure
> right now.) If you want to stick to OLS, I guess you could imitate that
> by using Ridge with an extremely loose penalty.
>
> Then there are two contributed packages by Artur (Tarassow),
> CvDataSplitter and TsCrossValidation - the latter hasn't been updated in
> a while, but actually it could be that he is working on a replacement (?).
>
> cheers
>
> sven
>
>
> --------------E7450D5FBB186983D61973CE
> Content-Type: text/html; charset=utf-8
> Content-Transfer-Encoding: quoted-printable
>
> <html>
> <head>
> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-=
> 8">
> </head>
> <body>
> <div class=3D"moz-cite-prefix">Am 18.06.2021 um 15:05 schrieb George
> Matysiak:<br>
> </div>
> <blockquote type=3D"cite"
> cite=3D"mid:CAEWMk7ucC=3D+iG0aSd-Usf7=3DSeqfoshPEWChJJfpQnaE2dWayvQ@mail.g
> =
> mail.com">
> <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUT=
> F-8">
> <div dir=3D"ltr">
> <div class=3D"gmail_default"
> style=3D"font-family:tahoma,sans-serif;font-size:small">Is it
> possible to undertake k-fold cross-validation in estimating
> regression equations? Thanks.<br clear=3D"all">
> </div>
> <br>
> </div>
> </blockquote>
> <p>Hi, for regularized LS under Model/Other linear models you get
> CV. (For GUI access it could be that you need a post-2021b
> snapshot, not sure right now.) If you want to stick to OLS, I
> guess you could imitate that by using Ridge with an extremely
> loose penalty.</p>
> <p>Then there are two contributed packages by Artur (Tarassow),
> CvDataSplitter and TsCrossValidation - the latter hasn't been
> updated in a while, but actually it could be that he is working on
> a replacement (?).</p>
> <p>cheers</p>
> <p>sven=C2=A0 <br>
> </p>
> </body>
> </html>
>
> --------------E7450D5FBB186983D61973CE--
>
> ------------------------------
>
> Date: Fri, 18 Jun 2021 16:01:26 +0200
> From: Sven Schreiber <svetosch(a)gmx.net>
> Subject: [Gretl-users] Re: Saving excluded observations from a Random
> sub-sample
> To: gretl-users(a)gretlml.univpm.it
> Message-ID: <132fa31a-3b8f-f011-e9c4-9c7d4791f2ea(a)gmx.net>
> Content-Type: multipart/alternative;
> boundary="------------7DD10EE6B422A8373BD3852A"
>
> This is a multi-part message in MIME format.
> --------------7DD10EE6B422A8373BD3852A
> Content-Type: text/plain; charset=utf-8; format=flowed
> Content-Transfer-Encoding: quoted-printable
>
> Am 18.06.2021 um 15:35 schrieb George Matysiak:
> > Having selected a Random sub-sample, is it possible to save the
> > excluded observations as variables? Thanks.
>
> Do you mean the index numbers of the non-selected observations, or do
> you mean the values of the variables in the non-selected set? Are you
> working in a script or trying this via the GUI?
>
> thanks
>
> sven
>
>
> --------------7DD10EE6B422A8373BD3852A
> Content-Type: text/html; charset=utf-8
> Content-Transfer-Encoding: 7bit
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> </head>
> <body>
> <div class="moz-cite-prefix">Am 18.06.2021 um 15:35 schrieb George
> Matysiak:<br>
> </div>
> <blockquote type="cite"
> cite="
> mid:CAEWMk7th4SsOgC_jmoZ6FhdAmCTdW2ScFxzi0PYcwyUbQSSJmw@mail.gmail.com">
> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
> <div dir="ltr">
> <div class="gmail_default"
> style="font-family:tahoma,sans-serif;font-size:small">Having
> selected a Random sub-sample, is it possible to save the
> excluded observations as variables? Thanks.<br clear="all">
> </div>
> </div>
> </blockquote>
> <p>Do you mean the index numbers of the non-selected observations,
> or do you mean the values of the variables in the non-selected
> set? Are you working in a script or trying this via the GUI?</p>
> <p>thanks</p>
> <p>sven<br>
> </p>
> </body>
> </html>
>
> --------------7DD10EE6B422A8373BD3852A--
>
> ------------------------------
>
> Date: Fri, 18 Jun 2021 18:02:36 +0200 (CEST)
> From: "Riccardo (Jack) Lucchetti" <p002264(a)staff.univpm.it>
> Subject: [Gretl-users] Re: Saving excluded observations from a Random
> sub-sample
> To: Gretl list <gretl-users(a)gretlml.univpm.it>
> Message-ID:
> <alpine.DEB.2.22.394.2106181755180.7529@jack-SATELLITE-L850-1L1>
> Content-Type: multipart/mixed;
> boundary="8323329-1436478366-1624032162=:7529"
>
> --8323329-1436478366-1624032162=:7529
> Content-Type: text/plain; charset=UTF-8; format=flowed
> Content-Transfer-Encoding: quoted-printable
>
> On Fri, 18 Jun 2021, George Matysiak wrote:
>
> > Having selected a Random sub-sample, is it possible to save the exclude=
> d
> > observations as variables? Thanks.
>
> I'm not sure I understand what you mean, but I'll give it a shot anyway:=20
> if you want to create a dummy variable holding included/excluded=20
> observations, there is more than one way to do so: a particularly simple=20
> one is to create a series of 1s when subsampling is in effect and then=20
> fill the excluded observation with 0s, as in
>
> <hansl>
> open data7-24
> smpl 100 --random
> series selected =3D 1
> ols salepric const sqft age city
> smpl full
> selected =3D misszero(selected)
> </hansl>
>
> of course, more sophisticated variants of the above are possible.
>
> -------------------------------------------------------
> Riccardo (Jack) Lucchetti
> Dipartimento di Scienze Economiche e Sociali (DiSES)
>
> Universit=C3=A0 Politecnica delle Marche
> (formerly known as Universit=C3=A0 di Ancona)
>
> r.lucchetti(a)univpm.it
> http://www2.econ.univpm.it/servizi/hpp/lucchetti
> -------------------------------------------------------
> --8323329-1436478366-1624032162=:7529--
>
> ------------------------------
>
> Date: Fri, 18 Jun 2021 18:18:23 +0200 (CEST)
> From: "Riccardo (Jack) Lucchetti" <p002264(a)staff.univpm.it>
> Subject: [Gretl-users] Re: Regression Cross-Validation
> To: Gretl list <gretl-users(a)gretlml.univpm.it>
> Message-ID:
> <alpine.DEB.2.22.394.2106181809410.7529@jack-SATELLITE-L850-1L1>
> Content-Type: multipart/mixed;
> boundary="8323329-282290097-1624033109=:7529"
>
> --8323329-282290097-1624033109=:7529
> Content-Type: text/plain; charset=utf-8; format=flowed
> Content-Transfer-Encoding: quoted-printable
>
> On Fri, 18 Jun 2021, Sven Schreiber wrote:
>
> > Am 18.06.2021 um 15:05 schrieb George Matysiak:
> >> Is it possible to undertake k-fold cross-validation in estimating
> >> regression equations? Thanks.
> >>=20
> > Hi, for regularized LS under Model/Other linear models you get CV. (For
> > GUI access it could be that you need a post-2021b snapshot, not sure
> > right now.) If you want to stick to OLS, I guess you could imitate that
> > by using Ridge with an extremely loose penalty.
> >
> > Then there are two contributed packages by Artur (Tarassow),
> > CvDataSplitter and TsCrossValidation - the latter hasn't been updated i=
> n
> > a while, but actually it could be that he is working on a replacement (=
> ?).
>
> My advice is to use Artur's excellent code, but if you just want a=20
> quick-n-dirty solution to take inspiration from, here's one:
>
> <hansl>
> set verbose off
> open data7-24
> list X =3D const sqft age city
> scalar nfolds =3D 8
> series fold =3D randgen(i, 1, nfolds)
>
> series prederr =3D 0
> loop f =3D 1 .. nfolds
> series d =3D (fold !=3D $f)
> wls d salepric X --quiet
> series prederr +=3D d ? 0 : $uhat
> endloop
>
> printf "x-validation criterion (%d random folds) =3D %12.4f\n", nfolds, s=
> um(prederr^2)
> </hansl>
>
>
> -------------------------------------------------------
> Riccardo (Jack) Lucchetti
> Dipartimento di Scienze Economiche e Sociali (DiSES)
>
> Universit=C3=A0 Politecnica delle Marche
> (formerly known as Universit=C3=A0 di Ancona)
>
> r.lucchetti(a)univpm.it
> http://www2.econ.univpm.it/servizi/hpp/lucchetti
> -------------------------------------------------------
> --8323329-282290097-1624033109=:7529--
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Gretl-users mailing list -- gretl-users(a)gretlml.univpm.it
> To unsubscribe send an email to gretl-users-leave(a)gretlml.univpm.it
> Website:
> https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
>
>
> ------------------------------
>
> End of Gretl-users Digest, Vol 173, Issue 10
> ********************************************
>
3 years, 4 months