Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Vancouver_application_8-8-2018/submitted JASA data/Bryan Graham Stata software/aseplot.r
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
48 lines (35 sloc)
2.05 KB
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
postscript("C:/Users/ke/Google_Drive/keyang/research/vancouvor_housing/tem/500rep/aseplot_500rep.ps", horizontal=TRUE, paper="letter");#for Winxp | |
#load data | |
ase600 <- scan("C:/Users/ke/Google_Drive/keyang/research/vancouvor_housing/tem/500rep/july27_2018/ase600.txt", list(0,0,0)); #load data in Windows | |
ase300 <- scan("C:/Users/ke/Google_Drive/keyang/research/vancouvor_housing/tem/500rep/july27_2018/ase600.txt", list(0,0,0)); #load data in Windows | |
iptlw <- ase600[[1]]; | |
ipt <- ase600[[2]]; | |
ols <- ase600[[3]]; | |
iptlw3 <- ase300[[1]]; | |
ipt3 <- ase300[[2]]; | |
ols3 <- ase300[[3]]; | |
#plot | |
par(mfrow=c(2,3));#multiple figures (6x1) in same page | |
#mfg=c(1,1,2,1); | |
hist(ols3, seq(0,0.014,0.0002), prob=TRUE, xlab="ase_DID", main="ASE for DID (N=300)"); | |
lines(density(ols3, bw=0.00035)); | |
hist(ipt3, seq(0,0.014,0.0002), prob=TRUE, xlab="ase_IPT", main="ASE for IPT (N=300)"); | |
#plot(ecdf(ipt), do.points=FALSE, verticals=TRUE, main="cdf of ASE for IPT"); | |
lines(density(ipt3, bw=0.00035)); | |
hist(iptlw3, seq(0,0.014,0.0002), prob=TRUE,xlab="ase_GIPT", main="ASE for GIPT (N=300)"); | |
#plot(ecdf(iptlw), do.points=FALSE, verticals=TRUE, main="cdf of ASE for IPT-LW"); | |
lines(density(iptlw3, bw=0.00035)); # density estimate | |
#rug(iptlw);# show the actual data points | |
#lines(ecdf(ase8), do.points=FALSE, verticals=TRUE); | |
hist(ols, seq(0,0.014,0.0002), prob=TRUE, xlab="ase_DID", main="ASE for DID (N=600)"); | |
#plot(ecdf(ols), do.points=FALSE, verticals=TRUE, main="cdf of ASE for ols"); | |
lines(density(ols, bw=0.00035)); | |
hist(ipt, seq(0,0.014,0.0002), prob=TRUE, xlab="ase_IPT", main="ASE for IPT (N=600)"); | |
#plot(ecdf(ipt), do.points=FALSE, verticals=TRUE, main="cdf of ASE for IPT"); | |
lines(density(ipt, bw=0.00035)); | |
hist(iptlw, seq(0,0.014,0.0002), prob=TRUE,xlab="ase_GIPT", main="ASE for GIPT (N=600)"); | |
#plot(ecdf(iptlw), do.points=FALSE, verticals=TRUE, main="cdf of ASE for IPT-LW"); | |
lines(density(iptlw, bw=0.00035)); # density estimate | |
#rug(iptlw);# show the actual data points | |
#lines(ecdf(ase8), do.points=FALSE, verticals=TRUE); | |
dev.off(); |