Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72802

Command xtabond2 gives error message: factor variables may not contain noninteger values

$
0
0
Hello. I am trying to run the xtabond2 command in Stata 14 and I have encountered a problem that I could not solve using the solutions in previous posts on the matter. I am trying to apply the system GMM estimators in a panel VAR model. I am trying to assess the impact of investor sentiment obtained from social media (values ranging from [-1] to [1] on stock returns (expressed in decimals) and trading volume (absolute numbers). Below is my proposed command for the equation for the return variable.

Code:
xtabond2 return 1.return sentiment, gmm (sentiment, lag(2 2) collapse) small nonconst
Where:
  • return is the daily stock returns for the sample companies
  • sentiment is the value for tweet sentiment regarding the company (values -1 to 1)
  • gmm estimates the variable that I believe might be exogenous
I will later run a second regression replacing return with volume. I use collapse as my instruments widely exceeds my groups (9 groups, 174 instruments). I use small because the sample is small and i want to interpret t-statistics.

When I try to run the command, i get the following error message: factor variables may not contain noninteger values. I believe this means I have to convert the variable to a continuous variable, but I am unsure wether that is a good solution, and I also do not know how to execute such a commando. Does anyone have an idea on how to resolve this error message? Any help is greatly appreciated! Hjalmar

Viewing all articles
Browse latest Browse all 72802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>