- Create the environment
source "$HOME/miniconda3/etc/profile.d/conda.sh"
conda create -n rmc-py314-mkl -c defaults python=3.14 numpy scipy "blas=*=mkl" -y
- Verify versions/BLAS
source "$HOME/miniconda3/etc/profile.d/conda.sh"
conda create -n rmc-py314-mkl -c defaults python=3.14 numpy scipy "blas=*=mkl" -y
| // insert this near the top of your main/master/run.do | |
| *======== AEA specific parts =============** | |
| local scenario "B" // Scenario B: main is in project top-level directory | |
| local pwd : pwd // This always captures the current directory | |
| if "`scenario'" == "A" { // If in Scenario A, we need to change directory first | |
| cd .. | |
| } | |
| // Now capture the directory to use as rootdir. Do not change this in the submitted version! |
| import pandas as pd | |
| from sdv.single_table import GaussianCopulaSynthesizer | |
| from sdv.metadata import Metadata | |
| import os | |
| # created based on simple example at https://docs.sdv.dev/sdv/explore/sdv-community | |
| # Read my Stata format data from the same directory as this code | |
| current_dir = os.path.dirname(os.path.abspath(__file__)) | |
| data_path = os.path.join(current_dir, 'Individual.dta') |
| use "data/derived/analysis.dta", clear | |
| generate same_country = (iso_o == iso_d ) | |
| generate ln_value = ln(VALUE_EURO) | |
| generate ln_N = ln(N) | |
| generate ln_dist = ln(dist) | |
| tabulate same_country [fw = N] | |
| regress ln_value ln_dist, robust |
| import delimited "data/country-codes.csv", varnames(1) case(preserve) encoding("utf-8") clear | |
| keep ISO31661Alpha2 ISO31661Alpha3 | |
| save "data/country-codes.dta", replace | |
| import delimited "data/ted-sample.csv", varnames(1) case(preserve) encoding("utf-8") clear | |
| keep ID_NOTICE_CAN YEAR CAE_NAME ISO_COUNTRY_CODE VALUE_EURO WIN_NAME WIN_COUNTRY_CODE | |
| rename ISO_COUNTRY_CODE ISO31661Alpha2 | |
| merge m:1 ISO31661Alpha2 using "data/derived/country-codes.dta", nogenerate keep(master match) | |
| rename ISO31661Alpha3 iso_d |
| // Create a program to download IPDS Completion data files | |
| // The program will check if the file exists and if it does, it will download the file | |
| // If the file does not exist, it will print a message to the user | |
| capture program drop download_ipeds_completion | |
| program define download_ipeds_completion | |
| version 17.0 | |
| args year |
| . *Check sample sizes | |
| . qui desc using ${scratch}/simple2010 | |
| . assert r(N)==1941473 | |
| . qui desc using ${scratch}/simple2018 | |
| . assert r(N)==2011482 |
| # this has worked as of 2024-03-01 | |
| library(jsonlite) | |
| library(dplyr) | |
| library(tidyr) | |
| library(stringr) | |
| # Specific DOI - resolves to a fixed version | |
| zenodo.id <- "6568295" | |
| # We will recover the rest from Zenodo API | |
| zenodo.api = "https://zenodo.org/api/records/" |
| # Instructions to author: | |
| # - Remove ALL paths in each of the files called. They are not needed. | |
| # - Change all lines related to the bootstrap to read: | |
| # [x_M, vc_bs] = bs_abf(match, id_all, strg, K, start_bs, session, bootstrapsize); | |
| # | |
| # This replaces the entire section from the old README: | |
| # Once the MATLAB data is generated, then need to run the MATLAB script est_abf_**.m (depending on whether interested in PD, BoSLI, BOSHI and on the shorter or expanded versions) and to get the results after this script is finished run the corresponding est_test_***.m script. In all these scripts the appropriate path needs to be updated as indicated. Additionally, in all est_abf_**.m scripts the desired bootstrapping needs to be adjusted for each separate estimation at the parts of code starting with [x_M, vc_bs] (for example at line 87 of est_abf_PD_twohalves.m). The MATLAB scripts call on functions bs_abf.m, chis_prb_gf.m, lik_i_abf.m, ll_abf.m, opt_abf.m, and waldtest_gf.m which are all included in the strategies fol |
| copy https://data.nber.org/sipp/1992/sipp92w1.zip $extractdir/92w1.zip | |
| copy https://data.nber.org/sipp/1992/sip92w1.dct $extractdir/92w1.dct | |
| copy https://data.nber.org/sipp/1992/sipp92w2.zip $extractdir/92w2.zip | |
| copy https://data.nber.org/sipp/1992/sip92w2.dct $extractdir/92w2.dct | |
| copy https://data.nber.org/sipp/1992/sipp92w3.zip $extractdir/92w3.zip | |
| copy https://data.nber.org/sipp/1992/sip92w3.dct $extractdir/92w3.dct | |
| copy https://data.nber.org/sipp/1992/sipp92w4.zip $extractdir/92w4.zip | |
| copy https://data.nber.org/sipp/1992/sip92w4.dct $extractdir/92w4.dct | |
| copy https://data.nber.org/sipp/1992/sipp92w5.zip $extractdir/92w5.zip | |
| copy https://data.nber.org/sipp/1992/sip92w5.dct $extractdir/92w5.dct |