This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This file reshapes world bank data that has been downloaded into stata using the wbopendata command. */ | |
/* It will reshape from wide to long format that can be used in panel data models */ | |
/* First read the file into Stata, e.g: */ | |
/* (replace this command if necessary) */ | |
/* wbopendata, topics(2 - Aid Effectiveness) clear */ | |
use | |
/* and then, issue the following commands */ | |
drop indicatorcode /* replace this with the name of the appropriate variable */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REGRESSION TEST: | |
./test/cases | |
Using executable: ./mlr | |
PASS ./test/cases/auxents | |
FAIL ./test/cases/chaining | |
PASS ./test/cases/cli-csv-rs-environment-defaults | |
PASS ./test/cases/cli-getoptish | |
PASS ./test/cases/cli-help | |
PASS ./test/cases/cli-mfrom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Function to extract fixed effects from plm or fixest model, and match with values of time invariant variables. | |
## Arguments: | |
## model = a plm or fixest fixed effects model object | |
## factors = either a data.frame/pdata.frame/data.table object containing time-invariant variables and a panel index variable, | |
## or in the case that the model arg is a plm object, factors can be a vector of names of time-invariant variables | |
## that will be extracted from the model object (along with the panel index). | |
## idvar = the name of the panel index variable; by default this will be set to the name of the model index if model is | |
## a plm object, or the name of the factors index if factors is a pdata.frame index. Otherwise if model is a fixest | |
## object then idvar must specify a variable in factors (a data.frame object). | |
## For example of usage see code after this function. |
OlderNewer