Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Para poder ver tabla 3, escribimos abajo tabla 3, en este caso al lado
DIAGRAMA DE CAJAS Y BOGITES
Arriba_ Q1, Q2
##-----------------------------------------------------------
##-----------------------------------------------------------
datos<-read.table('datoss.txt',header=T,sep='',dec='.')
head(datos)
summary(datos)
#------------------------------------------------------------
#------------------------------------------------------------
tabla<-table(datos$Anomalias)
tabla
tabla1<-round(tabla/sum(tabla)*100,2)
#COLORES
barplot(tabla1)
barplot(tabla1,col=2:6)
#TITULO
#-----------------------------------------------------------------
#VARIABLE CALIFICACION
datos$calif<-ordered(datos$Calificacion,levels = c('Excelente','Bueno','Regular','Malo'))
tabla2<-table(datos$calif)
tabla2
tabla3<-round(tabla2/sum(tabla2)*100,2)
barplot(tabla3)
barplot(tabla3,col=2:5)
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
fullsummary<-function(x){
n<-length(x); m<-mean(x);sd<-sd(x);va<-var(x);cv<-sd/m
a3<-(1/n*sum((x-m)^3))/sd^3;a4<-((1/n*sum((x-m)^4))/sd^4)-3
return(list=c('n'=n,'Media'=m,'Desv.St'=sd,'Varianza'=va,'CV'=cv,'a3'=a3,'a4'=a4))
fullsummary(datos$tmin)
boxplot(datos$tmin)
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
tablabiv<-table(datos$Anomalia,datos$calif)
tablabiv
tablabiv1<-round(tablabiv/sum(tablabiv)*100,2)
barplot(t(tablabiv1),ylim=c(0,50),col=c('green','yellow','pink','darkblue'),main='Distribución para la
calificación vs el tipo de anomalia',legend=T)
barplot(tablabiv1,ylim=c(0,50),col=c('green','yellow','pink','darkblue','orange'),main='Distribución
para el tipo de anomalia vs la calificacion',legend=T)
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
cor(datos$ntramites,datos$tmin)
modelo<-lm(datos$tmin~datos$ntramites)
modelo
summary(modelo)
##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%
## combinación de variables
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%
boxplot(datos$tmin~datos$Anomalia,horizontal=T)