mgao6767 / specurve

Stata command to perform specification curve analysis and generate output plots.

Home Page:https://mingze-gao.com/posts/specification-curve-analysis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem

chaoyifan opened this issue · comments

What can I do to solve the following error?

. specurve using appliaction.yml
File "", line 1
(results_file=)
^
SyntaxError: invalid syntax
(296 lines skipped)
(error occurred while loading specurve.ado)
r(7102);

And this is my configuration file:

Each choice is independent from others

Choices:
Dependent Variable: # reserved keyword
- Number of retweets: y
Focal Variable: # reserved keyword
- Delay: delay
Control Variables: # reserved keyword
- Baseline1: a1 a2 a3 s1 s2 lnfol add
- Baseline2: a1 a2 a3 s1 s2 lnfol add gen
- Baseline3: a1 a2 a3 s1 s2 lnfol add gen comm
- Baseline3: a1 a2 a3 s1 s2 lnfol add gen comm comp

It seems the error comes from:

SFIToolkit.errprintlnDebug(f"{results_file=}")

It uses f-string, so the problem could be that your Python version is too low.

After updating my python version, the above problem was solved.

However, I have a few more questions to ask you.
(1) How do I specify a specific regression model in SAC analysis, for example, I want to use negative binomial regression
(2) Is it possible to test multiple independent variables at the same time, in my model I have three independent variables and two of them are dummy variables; if it is not possible to test multiple independent variables at the same time, is it correct to put the remaining two into the control variables when testing one of the independent variables?

I would really appreciate your answer! Thank you!

After updating my python version, the above problem was solved.

However, I have a few more questions to ask you.
(1) How do I specify a specific regression model in SAC analysis, for example, I want to use negative binomial regression
(2) Is it possible to test multiple independent variables at the same time, in my model I have three independent variables and two of them are dummy variables; if it is not possible to test multiple independent variables at the same time, is it correct to put the remaining two into the control variables when testing one of the independent variables?

I would really appreciate your answer! Thank you!

  1. The current regression is based on reghdfe only. I don't have any plan to incorporate other commands or make it a general framework at the moment.
  2. There is only one variable of interest. You can specify more than one in the "Focal Variable" section (which will create multiple plots). Other independent variables are "controls".

Thank you very much for your reply, it is a rare opportunity to communicate with you and I have one last research question, I would be very grateful if you could reply to me in your free time.

My research question is about the effect of account type and text sentiment on the retweets of disinformation tweets. The dependent variable is the number of retweets of a post, and the independent variables are account type and text sentiment.
Among my independent variables, account type is a dummy variable. When I do the regression on the independent variables only, account type is significant, but when I add the control variable of number of followers, the independent variables are not significant anymore, so does this situation mean my model is wrong? Are the results I obtained still reliable? (However, after doing a multicollinearity test, I found that the correlation coefficients between account type and number of followers (<=0.6) and VIF were not high (<=4.1))

If my model is OK, can my results be interpreted as a pseudo-correlation between account type and number of retweets before I added the control variable of number of followers, while the non-significant relationship after adding the control variable is the real relationship between the two?

I would really appreciate your answer! Thank you!