Professional Documents
Culture Documents
Econo Me Tria
Econo Me Tria
wageDatos=read.dta("http://fmwww.bc.edu/ec-p/data/wooldridge/wage1.dta")
View(wageDatos)
max(wageDatos$wage)
attach(wageDatos)
min(wage)
summary(wage)
quintiles=quantile(wage,c(0.2,0.4,0.6,0.8))
quintiles
quantile=quantile(wage,c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9))
deciles=quantile(wage,c(0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1))
deciles
wageDatos$female
table(female)
Tfemale=table(female)
names(Tfemale)=c("H","M")
Tfemale
Total=sum(Tfemale)
100*Tfemale/Total
round(100*Tfemale/Total,1)
detach(wageDatos)
names(wageDatos)
attach(wageDatos)
Tmarried=table(married)
Tmarried
names(Tmarried)=c("No casado","Casado")
Tmarried
round(100*Tmarried/sum(Tmarried),1)
tMarriedFemale=table(female,married)
tMarriedFemale
rownames(tMarriedFemale)=c("Hombre","Mujer")
tMarriedFemale
colnames(tMarriedFemale)=c("No casado","Casado")
tMarriedFemale
round(100*prop.table(tMarriedFemale),1)
round(100*prop.table(tMarriedFemale,1),1)
round(100*prop.table(tMarriedFemale,2),1)
Histograma
#histograma hist se le da el nombre y hasta color y al guardarse en los breaks me da todos los
datos
lines(density(wage,adjust = 1.2))