Giter Site home page Giter Site logo

Comments (11)

jonathandroth avatar jonathandroth commented on September 25, 2024

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.

Hanh7 avatar Hanh7 commented on September 25, 2024

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.

jonathandroth avatar jonathandroth commented on September 25, 2024

@mcaceresb when you have RA time, can you look into this please?

from honestdid.

mcaceresb avatar mcaceresb commented on September 25, 2024

@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) and npre <- sum(1*(es$egt < -1))
  • es <- cs_es_nevertreat
  • V is based on es$inf.function$dynamic.inf.func.e and referencePeriodIndex <- 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.

Hanh7 avatar Hanh7 commented on September 25, 2024

Dear @mcaceresb,

I am still working on this.
I extracted egt, and this is it:
image

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.

mcaceresb avatar mcaceresb commented on September 25, 2024

@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.

Hanh7 avatar Hanh7 commented on September 25, 2024

Many thanks for your quick reply. I'll try again.

from honestdid.

Hanh7 avatar Hanh7 commented on September 25, 2024

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.

jonathandroth avatar jonathandroth commented on September 25, 2024

from honestdid.

Hanh7 avatar Hanh7 commented on September 25, 2024

from honestdid.

mcaceresb avatar mcaceresb commented on September 25, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.