Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Predict Counterfactuals

    Dear all

    Thanks for helping me in advance. I guess my problem is quite simple to solve. Yet I was not able to find the right command so far.

    I am running a price regression based on transactional data. Certain transactions are made under a specific agreement between a buyer group and the supplier (CHAI_Transaction Dummy=1). After having the the regression I would like to estimate how prices would have looked like if the transactions with CHAI Transaction Dummy=1 actually were made under the condition CHAI Transaction Dummy=0. The aim is to visually plot the difference the agreement has on prices. This sort of requires predicting y^ if CHAI Dummy=0 for all observations.

    Too keep it simple here the very basic regression'scommand of my analysis:

    xi: ivregress 2sls log_price ( log_quantity = femalelaborforce CHAI_transaction ) CHAI_transaction , vce(robust)

    Where:
    log_price = price
    log_quantity = quantity
    femalelaborforce = % of female labor force (instrumental variable)
    CHAI_transaction = Dummy taking the value of one if the transaction is made according to the buyer group - supplier agreement


    Thank you in advance for any help.

    All the best,
    Nathalie



  • #2
    The -margins- command with the -at()- option will get you what you want. You are seeking adjusted predictions at representative values. I think the clearest explanation of how to use the -margins- command in general, and this application of it in particular is from Richard Williams (a frequent contributor to this forum.) See http://www3.nd.edu/~rwilliam/stats/Margins01.pdf. It's a quick read but amazingly useful.

    Comment

    Working...
    X