For my thesis, I have gathered search volume data (svi) from Google and message data from Twitter (tweets is the number of daily tweets) for serveral companies (comp). The variable tradevol is the trading volume in the stock of a company, as taken from Yahoo! Finance. svi and tweets are my independent variables, tradevol is dependent.

For argument's sake, say I have collected data over 3 days for each of 3 companies (in reality, I have data for 100 companies gathered during 200 days), as follows:

comp  date   svi  tweets  tradevol
1     02-12  1.07  223    2,209,425
1     02-13  1.03  200    2,021,502
1     02-14  1.10  196    2,124,555
2     02-12  0.55  110    1,942,211
2     02-13  0.45  211    1,532,453
2     02-14  0.41  104    1,432,655
3     02-12  1.05  303    1,765,273
3     02-13  1.08  250    1,932,672
3     02-14  1.09  277    1,597,892

A dataset like this with measurements over time goes beyond what has been tough during my studies. So I need to understand how to analyze this. Therefore, I have some questions analyzing this dataset in SPSS / PASW.

  1. How can I, from this dataset, measure the correlation between svi and tradevol for each company? I would then somehow have to tell SPSS to split the datafile on comp, calculating the correlation for each unique comp
  2. My thesis-coach calls this dataset a "panel dataset". However, searching for "paneldata analysis SPSS" I don't find much usefull information. If I want to perform a regression, measuring the effect of svi and tweets on tradevol, how is this then called? A multilevel regression?
  3. Regarding regression, my coach wants me to account for a timelag. For instance, today's svi and tweets may not have an effect on today's tradevol but perhaps there is an effect (or: a bigger effect) of today's svi and tweets on tomorrows tradevol. In this case, I would have to perform the regression for lag t-2, t-1, t, t+1 and t+2. Is this operation possible to perform with SPSS (18) and if so, please send me somthing to go by :-)
  • $\begingroup$ but perhaps there is an effect (or: a bigger effect) on today's svi and tweets and tomorrows tradevol this was not quite clear meaning to me. Maybe there're typos? $\endgroup$
    – ttnphns
    Commented Jul 18, 2012 at 8:27
  • $\begingroup$ "...but perhaps there is an effect (or: a bigger effect) of today's svi and tweets on tomorrow's tradevol" :-) $\endgroup$
    – Pr0no
    Commented Jul 18, 2012 at 8:35
  • $\begingroup$ I've edited these typos for you $\endgroup$
    – ttnphns
    Commented Jul 18, 2012 at 12:07

2 Answers 2


You may want to apply the Fama-MacBeth regression technique outlined in their 1972 paper (link is a PDF, couldn't find a regular citation page for it.) This is a crude method since it doesn't do much residual clustering or analysis, but it's easy to implement and almost certainly already exists in SPSS.

Instead of risk premium, you'll be calculating some sort of trade volume premium on your factors. The huge problem you're going to run into is between-company correlations, both in trade volume and in things like being newsworthy enough to tweet about. Since you only have a small number of observations per company, I don't think it's possible to estimate the correlations with much accuracy, without pre-specifying some sort of model that depends on the correlations and allows you to infer them.


For easy to running your data analysis, try the eviews software or stata, etc. In SPSS, if you want to running the time lag data analysis, you must perform the data, like 1 to 2 etc. For example:

x : 12, 13,12,17,9,12

You can create the new variable x1 : 13, 12, 17, 9 and 12. The first number data variable for x not available... and so on.

  • $\begingroup$ iam sorry, that i mean not for x first number data is not available, but for x1 $\endgroup$
    – sloan
    Commented Dec 22, 2014 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.