Friday, March 29, 2013

Capacity for Love and Prejudice - Stata Simulation

* This is my simple hypothesis (really my own personal prejudice):
* the more prejudice someone allows themselves to be the less capacity they have for love.

* In this simulation I will attempt to generate a graph which convey's this idea with a pink equals sign superimposed on it :)

* Sorry for the blatant politicizing.

* However, I think this is a significant human rights battle being waged in the US.

* Though, it is not the last human rights battle that needs to be wages nor perhaps the most dire.

* Other important human rights issues are criminal sentencing, hunger and poverty among children, and continued widespread racial discrimination.

* However, this is the battle of today and should be addressed.

* In this very simple simulation I will attempt to generate a graphic which is a variant of the pink equal sign.
clear
set obs 400

gen prejudice = (runiform()-.5)*2
gen unobserved = rnormal()
gen love = unobserved - 3*prejudice

twoway (lpolyci love prejudice, fcolor("242 191 241") blcolor("255 128 192") degree(5) /*
This first line will generate a best fit line through the data with a 5 degree polynomial
*/ , text(0 0 "=", size(full) color("255 128 255") ) ) /*
This will place an equals sign at the cordinates 0,0 and make it "full" size which is the large
but not as large as I would prefer it to be.
*/ (scatter love prejudice, mcolor("red") ), /*
This draws my generated data points on the graph
*/ ytitle(capacity for love, size(large)) ytitle(, color("255 128 255")) ylabel(none) /*
This will tell the y axis what to place on it and what color to make it.
The labeling of the y axis is naturally supressed by the twoway option since
each twoway graph can have its own x and y corrdinates
*/ xtitle(capacity for  prejudice, size(large )) xtitle(, color("255 128 255")) xlabel(none) /*
*/ legend(off)  graphregion(fcolor("168 0 0"))
* I turn the legend off and change the background color to be a crimson.