rm(list=ls())
cat("\014")
library(readxl)
library(ggplot2)
library(lubridate)
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
library(readr)
library(fitdistrplus)
## Loading required package: MASS
## Loading required package: survival
library(forecast)
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v tibble 3.1.4 v dplyr 1.0.7
## v tidyr 1.1.4 v stringr 1.4.0
## v purrr 0.3.4 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x lubridate::as.difftime() masks base::as.difftime()
## x lubridate::date() masks base::date()
## x dplyr::filter() masks stats::filter()
## x lubridate::intersect() masks base::intersect()
## x dplyr::lag() masks stats::lag()
## x dplyr::select() masks MASS::select()
## x lubridate::setdiff() masks base::setdiff()
## x lubridate::union() masks base::union()
library(tseries)
## Warning: package 'tseries' was built under R version 4.1.2
library(zoo)
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
library(smooth)
## Loading required package: greybox
## Package "greybox", v1.0.1 loaded.
##
## Attaching package: 'greybox'
## The following object is masked from 'package:tidyr':
##
## spread
## The following object is masked from 'package:forecast':
##
## forecast
## The following object is masked from 'package:lubridate':
##
## hm
## This is package "smooth", v3.1.3
Caso3 <- "C:\\Users\\user\\OneDrive - Pontificia Universidad Javeriana\\Documents\\Cata\\la javeriana\\ingenieria industrial\\9. Ingeneiria industrial noveno semestre\\manufactura\\Ultima Entrega\\Caso3.xlsx"
Datos <- readxl::read_xlsx(Caso3)
T_pelets <- Datos$T_pelets
T_Pick <- Datos$T_Pick
T_press <- Datos$T_press
t_banda <- Datos$T_banda
T_propduccion <- Datos$T_propduccion
T_robotino <- Datos$`T_ robotino`
Num_obstaculos <- Datos$Num_obstaculos
Num_pelets <- Datos$Num_pelets
El nivel de significancia a pesar de ser grande es debido a que los datos que se tiene en cuenta son un historial muy corto, y de igual manera debido a la forma en su toma, se debe de amplificar el nivel de significancia. Se estimo un 30% según los mínimos del p-valor que se obtuvieron por cada una de las distribuciones para modelar los datos según alguna de ellas.
A continuación, se va a presentar por cada variable escogida, diferentes pruebas de hipótesis que se realizaron según la prueba de Kolmogorov-Smirnov en donde la hipótesis nula, se rechaza si el nivel de significancia es mayor que el p-valor.
fitNorm <- fitdist(T_pelets, "norm")
gofstat(fitNorm)
## Goodness-of-fit statistics
## 1-mle-norm
## Kolmogorov-Smirnov statistic 0.1653494
## Cramer-von Mises statistic 0.2635121
## Anderson-Darling statistic 1.7504759
##
## Goodness-of-fit criteria
## 1-mle-norm
## Akaike's Information Criterion 407.4010
## Bayesian Information Criterion 411.2251
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución normal.
fitexp <- fitdist(T_pelets, "exp")
gofstat(fitexp)
## Goodness-of-fit statistics
## 1-mle-exp
## Kolmogorov-Smirnov statistic 0.377141
## Cramer-von Mises statistic 1.795822
## Anderson-Darling statistic 9.257615
##
## Goodness-of-fit criteria
## 1-mle-exp
## Akaike's Information Criterion 465.8112
## Bayesian Information Criterion 467.7233
Con una significancia de 30% se rechaza la hipótesis nula (H0) por lo tanto no sigue una distribución exponencial
fitunif <- fitdist(T_pelets, "unif")
gofstat(fitunif)
## Goodness-of-fit statistics
## 1-mle-unif
## Kolmogorov-Smirnov statistic 0.1430769
## Cramer-von Mises statistic 0.3348455
## Anderson-Darling statistic Inf
##
## Goodness-of-fit criteria
## 1-mle-unif
## Akaike's Information Criterion 370.3562
## Bayesian Information Criterion 374.1802
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución uniforme.
fitNorm <- fitdist(T_Pick, "norm")
gofstat(fitNorm)
## Goodness-of-fit statistics
## 1-mle-norm
## Kolmogorov-Smirnov statistic 0.2315034
## Cramer-von Mises statistic 0.3561888
## Anderson-Darling statistic 2.1068660
##
## Goodness-of-fit criteria
## 1-mle-norm
## Akaike's Information Criterion 230.8797
## Bayesian Information Criterion 234.7038
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución normal.
fitexp <- fitdist(T_Pick, "exp")
gofstat(fitexp)
## Goodness-of-fit statistics
## 1-mle-exp
## Kolmogorov-Smirnov statistic 0.4758592
## Cramer-von Mises statistic 2.4257469
## Anderson-Darling statistic 11.7568884
##
## Goodness-of-fit criteria
## 1-mle-exp
## Akaike's Information Criterion 306.6402
## Bayesian Information Criterion 308.5522
Con una significancia de 30% se rechaza la hipótesis nula (H0) por lo tanto no sigue una distribución exponencial.
fitunif <- fitdist(T_Pick, "unif")
gofstat(fitunif)
## Goodness-of-fit statistics
## 1-mle-unif
## Kolmogorov-Smirnov statistic 0.335000
## Cramer-von Mises statistic 1.579792
## Anderson-Darling statistic Inf
##
## Goodness-of-fit criteria
## 1-mle-unif
## Akaike's Information Criterion 211.9442
## Bayesian Information Criterion 215.7682
Con una significancia de 30% se rechaza la hipótesis nula (H0) por lo tanto no sigue una distribución uniforme
fitNorm <- fitdist(T_press, "norm")
gofstat(fitNorm)
## Goodness-of-fit statistics
## 1-mle-norm
## Kolmogorov-Smirnov statistic 0.1903659
## Cramer-von Mises statistic 0.3443179
## Anderson-Darling statistic 2.2808466
##
## Goodness-of-fit criteria
## 1-mle-norm
## Akaike's Information Criterion 150.1293
## Bayesian Information Criterion 153.9533
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución normal
fitexp <- fitdist(T_press, "exp")
gofstat(fitexp)
## Goodness-of-fit statistics
## 1-mle-exp
## Kolmogorov-Smirnov statistic 0.4896435
## Cramer-von Mises statistic 2.8676192
## Anderson-Darling statistic 13.7487318
##
## Goodness-of-fit criteria
## 1-mle-exp
## Akaike's Information Criterion 251.5149
## Bayesian Information Criterion 253.4269
Con una significancia de 30% se rechaza la hipótesis nula (H0) por lo tanto no sigue una distribución exponencial
fitunif <- fitdist(T_press, "unif")
gofstat(fitunif)
## Goodness-of-fit statistics
## 1-mle-unif
## Kolmogorov-Smirnov statistic 0.2200000
## Cramer-von Mises statistic 0.5355556
## Anderson-Darling statistic Inf
##
## Goodness-of-fit criteria
## 1-mle-unif
## Akaike's Information Criterion 113.8612
## Bayesian Information Criterion 117.6853
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución uniforme
fitNorm <- fitdist(T_propduccion, "norm")
gofstat(fitNorm)
## Goodness-of-fit statistics
## 1-mle-norm
## Kolmogorov-Smirnov statistic 0.09768038
## Cramer-von Mises statistic 0.11889751
## Anderson-Darling statistic 0.84598108
##
## Goodness-of-fit criteria
## 1-mle-norm
## Akaike's Information Criterion 410.7626
## Bayesian Information Criterion 414.5866
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución uniforme
fitexp <- fitdist(T_propduccion, "exp")
gofstat(fitexp)
## Goodness-of-fit statistics
## 1-mle-exp
## Kolmogorov-Smirnov statistic 0.560063
## Cramer-von Mises statistic 3.886195
## Anderson-Darling statistic 18.025906
##
## Goodness-of-fit criteria
## 1-mle-exp
## Akaike's Information Criterion 584.2054
## Bayesian Information Criterion 586.1174
Con una significancia de 30% se rechaza la hipótesis nula (H0) por lo tanto no sigue una distribución exponencial
fitunif <- fitdist(T_propduccion, "unif")
gofstat(fitunif)
## Goodness-of-fit statistics
## 1-mle-unif
## Kolmogorov-Smirnov statistic 0.07744681
## Cramer-von Mises statistic 0.06727328
## Anderson-Darling statistic Inf
##
## Goodness-of-fit criteria
## 1-mle-unif
## Akaike's Information Criterion 389.0148
## Bayesian Information Criterion 392.8388
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución uniforme
fitNorm <- fitdist(T_robotino, "norm")
gofstat(fitNorm)
## Goodness-of-fit statistics
## 1-mle-norm
## Kolmogorov-Smirnov statistic 0.1786553
## Cramer-von Mises statistic 0.3005229
## Anderson-Darling statistic 1.6762604
##
## Goodness-of-fit criteria
## 1-mle-norm
## Akaike's Information Criterion 318.2502
## Bayesian Information Criterion 322.0742
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución normal
fitexp <- fitdist(T_robotino, "exp")
gofstat(fitexp)
## Goodness-of-fit statistics
## 1-mle-exp
## Kolmogorov-Smirnov statistic 0.5672179
## Cramer-von Mises statistic 4.1224490
## Anderson-Darling statistic 19.0193785
##
## Goodness-of-fit criteria
## 1-mle-exp
## Akaike's Information Criterion 510.9332
## Bayesian Information Criterion 512.8452
Con una significancia de 30% se rechaza la hipótesis nula (H0) por lo tanto no sigue una distribución exponencial
fitunif <- fitdist(T_robotino, "unif")
gofstat(fitunif)
## Goodness-of-fit statistics
## 1-mle-unif
## Kolmogorov-Smirnov statistic 0.2000000
## Cramer-von Mises statistic 0.3491667
## Anderson-Darling statistic Inf
##
## Goodness-of-fit criteria
## 1-mle-unif
## Akaike's Information Criterion 303.5732
## Bayesian Information Criterion 307.3973
Con una significancia de 30% NO se rechaza la hipótesis nula (H0) por lo tanto sigue una distribución uniforme
Se analizaron 5 variables las cuales nos indicaron con las pruebas de bondad de ajuste que estas se pueden modelar de la siguiente manera:
°normal °uniforme
°normal
°normal °uniforme
°normal °uniforme
°normal °uniforme