Send Gretl-users mailing list submissions to
gretl-users@lists.wfu.eduTo subscribe or unsubscribe via the World Wide Web, visit
http://lists.wfu.edu/mailman/listinfo/gretl-usersor, via email, send a message with subject or body 'help' to
gretl-users-request@lists.wfu.eduYou can reach the person managing the list at
gretl-users-owner@lists.wfu.eduWhen replying, please edit your Subject line so it is more specific
than "Re: Contents of Gretl-users digest..."
Today's Topics:
1. Re: PDF of a multivariate normal (Summers, Peter)
2. Re: displayed Engle-Granger model missing terms (Sven Schreiber)
3. Re: PDF of a multivariate normal (Sven Schreiber)
4. Re: PDF of a multivariate normal (Allin Cottrell)
----------------------------------------------------------------------
Message: 1
Date: Wed, 17 Feb 2016 03:05:43 +0000
From: "Summers, Peter" <
psummers@highpoint.edu>
To: Gretl list <
gretl-users@lists.wfu.edu>
Subject: Re: [Gretl-users] PDF of a multivariate normal
Message-ID: <
E57CD365-FD65-4551-AE05-BD234E628968@highpoint.edu>
Content-Type: text/plain; charset="Windows-1252"
Clive,
Artur's version of gretl is newer than yours or mine (though I've since updated). The integer requirements for seq() have been removed.
PS
Sent from my iPad
On Feb 16, 2016, at 9:33 PM, Clive Nicholas <
clivelists@googlemail.com<mailto:
clivelists@googlemail.com>> wrote:
Thanks Peter, that sorted it. Do remember that this wasn't my code, so how Artur's original code worked for him I've no clue.
C
On 16 February 2016 at 18:50, Summers, Peter <
psummers@highpoint.edu<mailto:
psummers@highpoint.edu>> wrote:
Clive,
The arguments to seq() all have to be integers. Try replacing that line with ?matrix x = seq(-30,32,2)./10?
PS
From:
gretl-users-bounces@lists.wfu.edu<mailto:
gretl-users-bounces@lists.wfu.edu> [mailto:
gretl-users-bounces@lists.wfu.edu<mailto:
gretl-users-bounces@lists.wfu.edu>] On Behalf Of Clive Nicholas
Sent: Tuesday, February 16, 2016 1:27 PM
To:
r.lucchetti@univpm.it<mailto:
r.lucchetti@univpm.it>; Gretl list
Subject: Re: [Gretl-users] PDF of a multivariate normal
Jack,
Artur's code chokes for me when I run your function code:
gretl version 2016a-git
Current session: 2016-02-16 18:17
Invalid argument
Error executing script: halting
> matrix x = seq(-3,3.2,0.2)
I wonder why? My -gretl-'s fully up to date!
C
On 16 February 2016 at 15:26, Riccardo (Jack) Lucchetti <
r.lucchetti@univpm.it<mailto:
r.lucchetti@univpm.it>> wrote:
On Tue, 16 Feb 2016, Artur T. wrote:
Ok, I changed the definition of the constant k. However, there is still
some difference to the outcome using MATLAB...
Hehe. We're convergiung to the truth: here's the correct one --- I think!
<hansl>
function matrix mnormal_pdf(matrix x, matrix m, matrix Sigma)
# x should be n x k (n k-dimensional vectors)
# m should be a k-vector of means
# Sigma should be a kxk pd matrix
scalar k = cols(x)
scalar n = rows(x)
if k != rows(m)*cols(m)
return mshape(NA, n, 1)
endif
scalar dS = det(Sigma)
if dS <= 0
return mshape(NA, n, 1)
endif
matrix U = x .- vec(m)'
matrix U = U .* (U/Sigma)
scalar k = dS * (2*$pi)^k
return exp(-0.5*sumr(U)) / sqrt(k)
end function
</hansl>
Actually I was a little surprised about Jack's suggestion also with
respect to what it does. I thought a function is wanted that also does
the RNG inside.
No, it is really just about computing the pdf.
Generating a sample of n independent Gaussian pseurdo-rvs with mean m and covariance Sigma is rather trivial, in fact:
<hansl>
n = 20000
m = {1, 2, 3}
Sigma = {4,1,-1;1,4,1;-1,1,4}
A = mnormal(n, 3) * cholesky(Sigma)' .+ m
eval meanc(A)
eval mcov(A)
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Universit? Politecnica delle Marche
(formerly known as Universit? di Ancona)
r.lucchetti@univpm.it<mailto:
r.lucchetti@univpm.it>
http://www2.econ.univpm.it/servizi/hpp/lucchetti-------------------------------------------------------
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu<mailto:
Gretl-users@lists.wfu.edu>
http://lists.wfu.edu/mailman/listinfo/gretl-users--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology. I prefer to call it style." -- Freeman J. Dyson
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu<mailto:
Gretl-users@lists.wfu.edu>
http://lists.wfu.edu/mailman/listinfo/gretl-users--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology. I prefer to call it style." -- Freeman J. Dyson
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu<mailto:
Gretl-users@lists.wfu.edu>
http://lists.wfu.edu/mailman/listinfo/gretl-users------------------------------
Message: 2
Date: Wed, 17 Feb 2016 10:11:56 +0100
From: Sven Schreiber <
svetosch@gmx.net>
To:
gretl-users@lists.wfu.eduSubject: Re: [Gretl-users] displayed Engle-Granger model missing terms
Message-ID: <
56C4395C.2040901@gmx.net>
Content-Type: text/plain; charset=utf-8; format=flowed
Am 17.02.2016 um 03:21 schrieb Salman Khan:
>
> Step 2 is where i have concerns since I was expecting a b0 term in
> model: (1-L)y = (a-1)*y(-1) + ... + e I explicitly chose to include a
> constant, therefore I was expecting something like: model: (1-L)y =
> b0 + (a-1)*y(-1) + ... + e
Allin is quite right, there had better not be a constant in the final
step. If you were expecting it in there, then I recommend to refresh
your Engle-Granger memory. (Hint: We're talking about estimated OLS
residuals here.)
cheers,
sven
------------------------------
Message: 3
Date: Wed, 17 Feb 2016 10:15:39 +0100
From: Sven Schreiber <
svetosch@gmx.net>
To:
gretl-users@lists.wfu.eduSubject: Re: [Gretl-users] PDF of a multivariate normal
Message-ID: <
56C43A3B.2020403@gmx.net>
Content-Type: text/plain; charset=windows-1252; format=flowed
Am 16.02.2016 um 22:18 schrieb Allin Cottrell:
> On Tue, 16 Feb 2016, Clive Nicholas wrote:
>
>> Actually, I'm on 2016a-git and I would very much appreciate it if we were
>> told via the list when a new (mini-)version of -gretl- has been rolled
>> out.
>> I never hear anything about them.
>
> That's what gretl-announce is for. See
>
http://lists.wfu.edu/mailman/listinfo/gretl-announce>
Of course you're right in principle, but I tend to agree with Clive that
a copying the announcement on gretl-users wouldn't hurt. It seems to me
that gretl-announce is for those that don't want to receive any other news.
thanks,
sven
------------------------------
Message: 4
Date: Wed, 17 Feb 2016 08:27:57 -0500 (EST)
From: Allin Cottrell <
cottrell@wfu.edu>
To: Gretl list <
gretl-users@lists.wfu.edu>
Subject: Re: [Gretl-users] PDF of a multivariate normal
Message-ID:
<
alpine.LNX.2.20.3.1602170827010.20694@localhost.localdomain>
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Wed, 17 Feb 2016, Sven Schreiber wrote:
> Am 16.02.2016 um 22:18 schrieb Allin Cottrell:
>> On Tue, 16 Feb 2016, Clive Nicholas wrote:
>>
>>> Actually, I'm on 2016a-git and I would very much appreciate it if we were
>>> told via the list when a new (mini-)version of -gretl- has been rolled
>>> out.
>>> I never hear anything about them.
>>
>> That's what gretl-announce is for. See
>>
http://lists.wfu.edu/mailman/listinfo/gretl-announce>>
>
> Of course you're right in principle, but I tend to agree with Clive that a
> copying the announcement on gretl-users wouldn't hurt. It seems to me that
> gretl-announce is for those that don't want to receive any other news.
Fair enough. We could send a short message with a link to the
ChangeLog to gretl-users.
Allin
------------------------------
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.eduhttp://lists.wfu.edu/mailman/listinfo/gretl-usersEnd of Gretl-users Digest, Vol 109, Issue 23
********************************************