I have a problem with this code, because the first graph export goes well but the second that is "gr export "${output}/2.graf2.jpg", as (jpg) replace", report this error message:
Code:
(note: file E:/Tesis/5. BASE DE DATOS/5. Output/2.graf2.jpg not found) failed to export to the specified format.
PD: I attach my line code below.
Code:
clear all
use "${regdata}/0.dataoficial.dta"
*** 1. Promedio de curso por exposición
twoway (histogram prom_curso if ausenpeer2==1, start(0) width(3) fcolor(none) lcolor(red)) ///
(histogram prom_curso if ausenpeer2==2, start(0) width(3) fcolor(none) lcolor(blue)) ///
(histogram prom_curso if ausenpeer2==3, start(0) width(3) fcolor(none) lcolor(black)), ///
ti (Notas de cursos por exposición a ausencia paterna) ///
yti (Densidad) ///
legend(order(1 "Exposición baja" 2 "Exposición media" 3 "Exposición alta"))
gr export "${output}/1.graf1.jpg", as (jpg) replace
*** 2. Ausencia paterna (z-score) por diversas categorias.
bys programa: egen ausenmean=mean(ausenpeer)
bys programa: egen ausensd=sd(ausenpeer)
gen zausen=(ausenpeer-ausenmean)/ausensd
*************************************************************************************************
* Por sexo
twoway (histogram zausen if sexo==1, start() width(3) color(green%30)) ///
(histogram zausen if sexo==0, start() width(3) color(red%30)), ///
ti (Ausencia paterna z-score por sexo) ///
yti (Densidad) ///
legend(order(1 "Femenino" 2 "Masculino"))
gr export "${output}/2.graf2.jpg", as (jpg) replace
0 Response to error in exporting graphs
Post a Comment