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
<?xml version="1.0" encoding="utf-8"?> | |
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" page-range-format="chicago" demote-non-dropping-particle="sort-only"> | |
<!-- This style was edited with the Visual CSL Editor (https://editor.citationstyles.org/visualEditor/) --> | |
<info> | |
<title>American Political Science Association</title> | |
<title-short>APSA</title-short> | |
<id>http://www.zotero.org/styles/american-political-science-association</id> | |
<link href="http://www.zotero.org/styles/american-political-science-association" rel="self"/> | |
<link href="http://www.apsanet.org/media/PDFs/Publications/APSAStyleManual2006.pdf" rel="documentation"/> | |
<author> |
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
cd "${box}/data/public/" | |
unicode analyze data.dta | |
unicode encoding set latin1 | |
unicode translate data.dta |
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
// Move data from Box to git location | |
foreach file in `: dir "${box}/constructed/" files "*.dta" ' { | |
local file = subinstr("`file'",".dta","",.) | |
iecodebook export "${box}/constructed/`file'.dta" /// | |
using "${git}/data/`file'.xlsx" /// | |
, save replace sign reset |
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
// One run of simulation | |
cap prog drop powerfinder | |
prog def powerfinder , rclass | |
args alloc | |
// Set up 1000 hypotheses | |
clear | |
set obs 1000 | |
gen id = _n |
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
power oneproportion 0.62 0.5 , n(50(1)150) graph(recast(line) plotopts(lw(thick) lc(red)) xline(100 131,lc(black)) ylab(0 "0%" 0.5 "50%" 0.8 "80%" 0.69 "69%" 1 "100%") yline(.69 .8,lc(black)) note("") title("") subtitle("") ) |
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
// Part 1: De-biasing a parameter estimate using controls | |
// Develop some data generating process for data X’s and for outcome Y, with some (potentially multi-armed) treatment variable and treatment effect. Like last week, you should strongly consider "simulating" data along the lines of your group project. | |
// This DGP should include strata groups and continuous covariates, as well as random noise. Make sure that the strata groups affect the outcome Y and are of different sizes, and make the probability that an individual unit receives treatment vary across strata groups. You will want to create the strata groups first, then use a command like expand or merge to add them to an individual-level data set. | |
cap prog drop runregs | |
prog def runregs, rclass | |
syntax anything // sample size goes here (divided by ten) |
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
id | latitude | longitude | type | |
---|---|---|---|---|
1 | 38.922893 | -77.06741979 | T | |
2 | 38.92846854 | -77.03038385 | T | |
3 | 38.90462752 | -77.0336025 | C | |
4 | 38.90776671 | -77.00978448 | C | |
5 | 38.87686969 | -77.01313188 | T |
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
global data "${wd}/ppol_528_GuzmanLidia/data/Data_exp" | |
local data : dir "${data}/xlsx/" files * | |
clear | |
tempfile allData | |
save `allData' , emptyok | |
cap prog drop infill | |
prog def infill | |
syntax anything | |
qui foreach var of varlist `anything' { |
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
local graphs "" | |
local x = 1 | |
foreach var of varlist /// | |
diarrhea_history_duration tb_history_sputum /// | |
malaria_history_fevertype pph_history_pph /// | |
diabetes_history_numblimb { | |
local title : var lab `var' | |
local graphs `"`graphs' "\``var''" "' | |
tempfile `var' |
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
local nb=`.Graph.plotregion1.barlabels.arrnels' | |
forval i=1/`nb' { | |
di "`.Graph.plotregion1.barlabels[`i'].text[1]'" | |
.Graph.plotregion1.barlabels[`i'].text[1]="`.Graph.plotregion1.barlabels[`i'].text[1]'%" | |
} | |
.Graph.drawgraph |
NewerOlder