Dear Jan,
First of all, you should start a new thread (use a relevant subject line) for questions like this, rather than replying to a message unrelated to your question.
To your question, chapters 29 and 30 of the Gretl User’s Guide would be a good place for you to start.
I hope this helps,
Peter
Dr. Peter M. Summers |
One University Parkway, High Point, NC 27268
Office: 336-841-9650 | Economics
Choose to be extraordinary!®
From: gretl-users-bounces@lists.wfu.edu [mailto:gretl-users-bounces@lists.wfu.edu]
On Behalf Of Cernohorsky Jan
Sent: Wednesday, August 23, 2017 4:59 PM
To: Gretl list
Subject: Re: [Gretl-users] Principal Components Analysis: "pca" command versus "eigengen" function
Dear Gretl users,
please could anybody help me how to do VECM /Errot correction model/.
I dont know what should I fill and then how can I distinguish between short-term and long-term relationships...
Or please if there is any manual how to do it.
Thank you for your answer
Jan Cernohorsky
Sent from my Windows Phone
From:
Henrique Andrade
Sent:
ý23/ý08/ý2017 22:21
To: Gretl Discussion List (users)
Subject:
[Gretl-users] Principal Components Analysis: "pca" command versus "eigengen" function
Dear Gretl Community,
I would like to replicate the "pca" command using "eigengen" function
but I can't replicate the "signs behavior" of the component loadings.
Sorry if this is a very newbie/dummy question, but I really don't
understand the signal inversion in PC1 PC6 and PC7. Please take a look
at my code:
<hansl>
set echo off
set messages off
open AWM.gdt --quiet
list L = CAN COMPR EEN FDD HICP ITN KSR
printf "\n########## Gretl's native PCA ##########\n\n"
pca L
printf "\n########## Alternative PCA (using 'eigengen' function) ##########\n\n"
matrix X = {L}
matrix C = mcorr(X)
matrix Eigenvector = {}
matrix Eigenvalue = eigengen(C, &Eigenvector)
matrix Proportion = zeros(rows(Eigenvalue), 1)
matrix Cumulative = zeros(rows(Eigenvalue), 1)
loop i = 1..rows(Eigenvalue) --quiet
Proportion[i, 1] = Eigenvalue[i, 1]/sumc(Eigenvalue)
Cumulative[i, 1] = sumc(Proportion[1:i])
endloop
matrix Eigenvalue = Eigenvalue ~ Proportion ~ Cumulative
rownames(Eigenvalue, "1 2 3 4 5 6 7")
colnames(Eigenvalue, "Eigenvalue Proportion Cumulative")
rownames(Eigenvector, "CAN COMPR EEN FDD HICP ITN KSR")
colnames(Eigenvector, "PC1 PC2 PC3 PC4 PC5 PC6 PC7")
printf "Principal Components Analysis\nn = %d\n\n", rows(X)
printf "Eigenanalysis of the Correlation Matrix\n\n"
printf "%15.4f\n", Eigenvalue
printf "Eigenvectors (component loadings)\n\n"
printf "%10.3f\n", Eigenvector
</hansl>
Best regards,
Henrique Andrade
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users