Comments (11)
Can you please provide a minimal working example that we can try to use to reproduce the error, either by sharing the data that you used or a synthetic dataset with similar structure that reproduces the error?
from honestdid.
Hello,
Sorry for my late reply. I put my dataset and description in this folder: https://drive.google.com/drive/folders/19tmsg6HR2k6xC7omqJkTV7lQ48PuBTwC?usp=drive_link
Could you kindly send me a request so that I can share to only you?
from honestdid.
@mcaceresb when you have RA time, can you look into this please?
from honestdid.
@jonathandroth @Hanh7 I can't download the example. I might not need it
- It seems the error is from this line:
basisVector(index=(e+1),size=npost)
e <- 0
,npost <- nperiods - npre
,nperiods <- nrow(V)
andnpre <- sum(1*(es$egt < -1))
es <- cs_es_nevertreat
V
is based ones$inf.function$dynamic.inf.func.e
andreferencePeriodIndex <- which(es$egt == -1)
So it seems there's two objects to analyze. What is
es <- cs_es_nevertreat
dim(crossprod(es$inf.function$dynamic.inf.func.e))
es$egt
? My guess is that there's an issue with the egt
vector.
from honestdid.
Dear @mcaceresb,
I am still working on this.
I extracted egt, and this is it:
Is it what it should look like?
Or should I fix the bug in the code of the function honest_did? I am using the code in your example, because my dataset seems to have the same structure with your example. Perhaps I incorrectly transform my dataset; it is not the same as yours?!
By the way, I have made my dataset opened access, if you have time, could you kindly take a look?
https://drive.google.com/drive/folders/19tmsg6HR2k6xC7omqJkTV7lQ48PuBTwC
from honestdid.
@Hanh7 I don't think it's necessary. The issue appears to be that the reference period is hard-coded to -1 in honest_did
.
You can change it to -2
(I presume) for your use case, divide egt by 2, or copy the updated function from here and pass on the right reference period.
If there's still an issue I'll have a look at the data. LMK.
from honestdid.
Many thanks for your quick reply. I'll try again.
from honestdid.
Hello,
May I ask about the meaning of Mbar mentioned in your Honest approach paper?
I understand that Mbar as "The horizontal axis M shows our restriction on violations, i.e. the fraction of the maximum violations in post-treatment periods and the maximum violations in pre-treatment periods".
Please correct me if I am wrong.
from honestdid.
from honestdid.
from honestdid.
@Hanh7 We decided to throw an error if the time vector is not coded to be consecutive and have -1 as the reference period. So in this case you'd have to re-code it yourself before using HonestDiD. Cheers.
from honestdid.
Related Issues (20)
- A problem when i run command HonestDiD::createSensitivityResults_relativeMagnitudes HOT 3
- Query about CIs under different values of Mbar HOT 3
- HonestDiD::createSensitivityPlot_relativeMagnitudes and unused filter HOT 4
- Package dependencies and package conflicts HOT 2
- Add explicit calls to buit-in functions
- Apply honestdid on did2s results HOT 9
- Options in `honest_did.AGGTEobj` HOT 1
- Dependencies HOT 11
- Example using the DRDID package? HOT 3
- constructOriginalCS does not give original confidence intervals + guidance on event studies with controls HOT 3
- Handling of universal base period HOT 4
- Warning for sigma that is not positive semi-definite HOT 4
- Robust CIs narrower than original CIs with large number of pre-treatment periods HOT 2
- Honest_did function not working HOT 2
- Warning in install.packages: package ‘HonestDiD’ is not available for this version of R HOT 3
- Graphing for estimator from Callaway and Sant’Anna (2020) HOT 2
- Error when running createSensitivityResults_relativeMagnitudes - Caused by error in `svd()`: ! a dimension is zero" HOT 12
- Inquiry Regarding Confidence Interval Behavior in createSensitivityResults_relativeMagnitudes() Function HOT 6
- Hitting the upper bound? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honestdid.