Correlation: VCV versus CMOM

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
schwa012
Posts: 1
Joined: Wed Dec 27, 2017 8:14 am

Correlation: VCV versus CMOM

Unread post by schwa012 »

Dear Tom, dear all,

I have a question on using the VCV and/or CMOM instruction.

I use a panel data set with about 4,500 banks and observations for 14 years, but as an unbalanced panel (~ 38,000 obs). Now I want to compute and show the correlation between the independet variables, for example between unemployment rate (UNEMP) and total loans (in percentage of total assets, GLTA1).

Using the VCV instruction shows a really high positive correlation. If I take a look at the scatter plot, I cannot confirm that. Using the CMOM instruction with the CORR option I find a slightly negative correlation (what is in line with the plot and my expectations):

[...]
vcv(smpl=regfil1) /
# unemp glta1
cmoment(smpl=regfil1,print,corr) /
# unemp glta1
scatter(smpl=regfil1,style=dots,hlabel='Unemployment (%)',vlabel='Gross Loans / Total Assets')
# unemp glta1

So what is the difference between VCV and CMOM here?

Many thanks in advance,
greetings from Germany,
AS
Attachments
Output of VCV and CMOM
Output of VCV and CMOM
Ouput VCV and CMOM Correlation.jpg (34.71 KiB) Viewed 7956 times
Scatter Plot of UNEMP and GLTA1
Scatter Plot of UNEMP and GLTA1
Scatter Plot Correlation.jpg (101.35 KiB) Viewed 7956 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Correlation: VCV versus CMOM

Unread post by TomDoan »

Isn't that addressed in the technical information for VCV? VCV, by default, assumes the inputs are mean zero.
Post Reply