PardeeCenterDU / IFs-Issues-Tracking

This repository only holds the list of bugs that have been reported for IFs. Anyone may add a bug report, but please look to see if your issue has already been added!
2 stars 0 forks source link

FBIC in IFs: Adding Monadic Constraints and Forecasts To Dyadic LOR #192

Closed caleb-petry closed 2 years ago

caleb-petry commented 2 years ago

Text From Email Thread: FBIC in IFs: Adding Monadic Constraints and Forecasts To Dyadic LOR

To continue from our call, the following is an outline of what we want to add to the model. In addition to this, we would like to add POLITYAFFINITY as another new bilateral variable, have a saved version of LoR for use in the regression, move the xdyadlorm/dyadloradd parameters to lorscore so that they work within the monadic reconciliation, and add a parameter to set exogenously the monadic embassy value. Attached here are updated embassy series, which I will send to Yutang.

Predicted Shift Logic

  1. Initialize LoR from data; It should equal the monadic else we have a data issue (No changes needed)

  2. Generate ranked propensity scores using: z = -6.610434 + (8.361949\*SLOR) + (-0.0001667\*DISTANCE) + (10.11272\*POWERactor) + (10.84424\*POWERPartner) + (0.0192345\*POLITYAFFINITY) + (0.2697322\*[ POWERactor \*POLITYAFFINITY]) + (0.1356601\*[ POWERPartner\*POLITYAFFINITY]) + (0.0569043\*LNGDPPCPActor) + (0.2907447\*LNGDPPCPPartner) lorscore = xdyadlorm * (Exp(z) / Exp(1+z)) + dyadloradd

  3. In later years, assign shifts (WHILE DIPLOEMBASSY - sumOfDyadicLoRForActor > 0|DIPLOEMBASSY – sumOfDyadicLoRforActor < 0) using the ranked scores.

Intended Behavior An increase of 1 DIPLOEMBASSY with 3 dyads; values 0.75, 0.5, .1; lorscore 0.9, 0.5, 0.3 = Final LoR values: 1, 1, 0.4 An increase of 1 DIPLOEMBASSY with 3 dyads; values 0.75, 0.5, .1; lorscore 0.3, 0.5, 0.9 = Final LoR values: 0.75, 0.6, 1 A decrease of 1 DIPLOEMBASSY with 3 dyads; values 0.75, 0.5, .1; lorscore 0.9, 0.5, 0.3 = Final LoR values: 0.55, 0, 0 A decrease of 1 DIPLOEMBASSY with 3 dyads; values 0.75, 0.5, .1; lorscore 0.3, 0.5, 0.9 = Final LoR values: 0, 0.25, 0.1

New Variables

POLITYAFFINITY = 20 – abs(DEMOCPOLITYActor – DEMOCPOLITYPartner)

SLOR (or equivalent)

Parameters

New: setdiploembassy; exogenously replace DIPLOEMBASSY

Moved: xdyadlorm/dyadloradd; moved to lorscore

PardeeCenterIFs commented 2 years ago

Caleb, is it ok if we use POWERGPI? which is not exactly the same as POWER in IFs. I want to use it because we already have a saved variable for the GPI one. In any case this will be lagged by one year.

caleb-petry commented 2 years ago

Unfortunately, I don't think it would work with POWERGPI as is. The measures are quite different in their components and weights. DiME/POWER also aligns more with our present mental model and avoids some colinearity. That said, the correlation between the two power measures is quite strong.

If it is significantly easier to use, I could ask Collin to switch DiME/POWER out for POWERGPI - but he is out today.

PardeeCenterIFs commented 2 years ago

Not a problem Caleb, I will create the required saved variable for the POWER variable. Are you aware that back in Apri of 2021 we renamed POWER to POWERHH in the code, this was a request by Jonathan. Anyway, this usually confuses me on which is which, but following the descriptions it should be POWER, the one that is DiME.

caleb-petry commented 2 years ago

I am just confirming that I am aware and that it should be POWER, as you already noted. Thanks!

PardeeCenterIFs commented 2 years ago

I have completed the implementation of this one, and it's ready for review. Please check that the formulas in the Issue Tracking System are ok, I think when you pasted the e-mail some "\" were introduced, so I assume all "*" are in reality just "*". Here are the .NET files I changed, and you will need to download the bilateral forecast file:

Bilateral LoR.zip

https://ifs02.du.edu/BilateralInteractionData/IFsForDyadic%2020220419.zip

caleb-petry commented 2 years ago

You are correct. I had to add an escape character to avoid italics... But, it looks like it added them in the text for some reason (maybe when I made it embedded code?).

I'll take a look this evening or tomorrow and let you know how it looks.

caleb-petry commented 2 years ago

Feature added; with data update performs well according to specification.

May need .Dat/base scenario changes to correct unexpected (but in line with model) behavior such as China opening an embassy in Taiwan.