R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

Cargar datos a trabajar

setwd("C:/Users/Juancho/Desktop/INGENIERIA EN CONSTRUCCION/SEMESTRE 2_2023/IME292_ESTADISTICA APLICADA/INFORME 2/RLM")
library(readxl)
CHANQUEO <- read_excel("CHANQUEO.xlsx")
View(CHANQUEO)

Cargar librerias

library(AER) #herramientas regresion y econometria
## Warning: package 'AER' was built under R version 4.3.2
## Loading required package: car
## Warning: package 'car' was built under R version 4.3.2
## Loading required package: carData
## Loading required package: lmtest
## Warning: package 'lmtest' was built under R version 4.3.2
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## Loading required package: sandwich
## Warning: package 'sandwich' was built under R version 4.3.2
## Loading required package: survival
library(car) # regresion
library(doBy) #Estadisticas agrupadas
## Warning: package 'doBy' was built under R version 4.3.2
library(dplyr) #manejo de dataframes
## 
## Attaching package: 'dplyr'
## The following object is masked from 'package:doBy':
## 
##     order_by
## The following object is masked from 'package:car':
## 
##     recode
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(e1071) # funciones de probabilidad
## Warning: package 'e1071' was built under R version 4.3.2
library(EnvStats) # informacion estadistica mas completa
## Warning: package 'EnvStats' was built under R version 4.3.2
## 
## Attaching package: 'EnvStats'
## The following objects are masked from 'package:e1071':
## 
##     kurtosis, skewness
## The following object is masked from 'package:car':
## 
##     qqPlot
## The following objects are masked from 'package:stats':
## 
##     predict, predict.lm
library(foreign) #lectura datos distintas fuentes
library(GGally)
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.3.2
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
library(ISLR) #
## Warning: package 'ISLR' was built under R version 4.3.2
library(ggfortify)
## Warning: package 'ggfortify' was built under R version 4.3.2
library(corrplot)
## corrplot 0.92 loaded
library(lawstat)
## Warning: package 'lawstat' was built under R version 4.3.2
## 
## Attaching package: 'lawstat'
## The following object is masked from 'package:car':
## 
##     levene.test
library(lmtest) # test de análisis de regresión
library(MASS) # análisis estadístico mas avanzado
## Warning: package 'MASS' was built under R version 4.3.2
## 
## Attaching package: 'MASS'
## The following object is masked from 'package:EnvStats':
## 
##     boxcox
## The following object is masked from 'package:dplyr':
## 
##     select
library(nortest) #pruebas d normalidad
library(PerformanceAnalytics) # Análisis de Riesgo y Regresión
## Loading required package: xts
## 
## ######################### Warning from 'xts' package ##########################
## #                                                                             #
## # The dplyr lag() function breaks how base R's lag() function is supposed to  #
## # work, which breaks lag(my_xts). Calls to lag(my_xts) that you type or       #
## # source() into this session won't work correctly.                            #
## #                                                                             #
## # Use stats::lag() to make sure you're not using dplyr::lag(), or you can add #
## # conflictRules('dplyr', exclude = 'lag') to your .Rprofile to stop           #
## # dplyr from breaking base R's lag() function.                                #
## #                                                                             #
## # Code in packages is not affected. It's protected by R's namespace mechanism #
## # Set `options(xts.warn_dplyr_breaks_lag = FALSE)` to suppress this warning.  #
## #                                                                             #
## ###############################################################################
## 
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
## 
##     first, last
## 
## Attaching package: 'PerformanceAnalytics'
## The following objects are masked from 'package:EnvStats':
## 
##     kurtosis, skewness
## The following objects are masked from 'package:e1071':
## 
##     kurtosis, skewness
## The following object is masked from 'package:graphics':
## 
##     legend
library(ppcor) #correlaciones parciales y semi
## Warning: package 'ppcor' was built under R version 4.3.2
library(psych) #procedimientos metempsicosis y estadísticos
## 
## Attaching package: 'psych'
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
## The following object is masked from 'package:car':
## 
##     logit
library(tidyverse)#anexo manejo de datos
## Warning: package 'stringr' was built under R version 4.3.2
## Warning: package 'lubridate' was built under R version 4.3.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ lubridate 1.9.3     ✔ tibble    3.2.1
## ✔ purrr     1.0.2     ✔ tidyr     1.3.0
## ✔ readr     2.1.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ psych::%+%()      masks ggplot2::%+%()
## ✖ psych::alpha()    masks ggplot2::alpha()
## ✖ dplyr::filter()   masks stats::filter()
## ✖ xts::first()      masks dplyr::first()
## ✖ dplyr::lag()      masks stats::lag()
## ✖ xts::last()       masks dplyr::last()
## ✖ dplyr::order_by() masks doBy::order_by()
## ✖ dplyr::recode()   masks car::recode()
## ✖ MASS::select()    masks dplyr::select()
## ✖ purrr::some()     masks car::some()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

modelo inicial a evaluar

Evaluacion de concentraciones anomalas de los datos

plot(CHANQUEO)

Al revisar las concentraciones de los datos, se encuentran nubes de puntos con formas inusuales que podrian dar a conocer valores atipicos o incluso que no sea aplicacble un modelo de regresion lineal

Analisis de los datos

Analizando los datos del modelo se puede distinguir que hay datos que no los indices de combustibilidad tienen relacion inversamente proporcional con la humedad relativa. Según regla universal al tener humedades relativas altas (+80%) es muy improbable que ocurra un incendio, por lo que el indice de combustibilidad debería ser muy bajo, por el contrario, a humedades relativas del ambiente cercanas a los 60%, es muy probable que ocurran incendios

Dado lo anterior, se analiara la correlacion entre las variables

chart.Correlation(CHANQUEO)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

Al analizar el chart.correlation se puede ver que hay valores en la base de datos que estan generando problemas en relacion a la nube de puntos o dispersion de los datos. Por ejemplo al tener una cantidad alta de lluvia se tiene tambien un alto indice de combustibilidad, lo que es raro y condiciona la linea esperada

Al revisar ese caso, se tiene que para una cantidad de lluvia de 6,4 existe un indice de combustibilidad de 96,1, lo que no tiene sentido que ocurra

Realizamos otro modelo restringuiendo los datos que estan creando problemas

CHANQUEO_2 <-CHANQUEO[CHANQUEO$lluvia<0.8,]
plot(CHANQUEO_2)

chart.Correlation(CHANQUEO_2)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter
## Warning in cor(x, y, use = use, method = method): the standard deviation is
## zero
## Warning in cor(x, y): the standard deviation is zero
## Warning in par(usr): argument 1 does not name a graphical parameter
## Warning in cor(x, y, use = use, method = method): the standard deviation is
## zero
## Warning in cor(x, y): the standard deviation is zero
## Warning in par(usr): argument 1 does not name a graphical parameter
## Warning in cor(x, y, use = use, method = method): the standard deviation is
## zero
## Warning in cor(x, y): the standard deviation is zero
## Warning in par(usr): argument 1 does not name a graphical parameter
## Warning in cor(x, y, use = use, method = method): the standard deviation is
## zero
## Warning in cor(x, y): the standard deviation is zero
## Warning in par(usr): argument 1 does not name a graphical parameter
## Warning in cor(x, y, use = use, method = method): the standard deviation is
## zero
## Warning in cor(x, y): the standard deviation is zero
## Warning in par(usr): argument 1 does not name a graphical parameter
## Warning in cor(x, y, use = use, method = method): the standard deviation is
## zero
## Warning in cor(x, y): the standard deviation is zero
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter
## Warning in cor(x, y, use = use, method = method): the standard deviation is
## zero
## Warning in cor(x, y): the standard deviation is zero
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter
## Warning in cor(x, y, use = use, method = method): the standard deviation is
## zero
## Warning in cor(x, y): the standard deviation is zero
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

Al excluir los datos de lluvia que influian en la linea, nos quedamos en datos NA, por lo que es mejor no considerar esa variable en el analisis, es decir, crear un modelo que funcione cuando no exista lluvia

Realizamos otro modelo que propone su posible funcionamiento sin lluvia

CHANQUEO_2 <- dplyr::select(CHANQUEO_2,-lluvia)

plot(CHANQUEO_2)

chart.Correlation(CHANQUEO_2)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

En este nuevo modelo que considera zonas sin lluvia, ahora aparece en la variable area un dato extremadamente atipico que esta influyendo de gran manera en la linea de dispersion, por lo que se procede a sacar de la base de datos ese valor anomalo

CHANQUEO_2 <- CHANQUEO_2 %>% filter(orden != 416)
plot(CHANQUEO_2)

chart.Correlation(CHANQUEO_2)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

Dado que siguen apareciendo datos que si bien no son tan atipicos como el anterior, siguen influyendo en el comportamiento de la linea de dispersion, por lo que se decide restiguir el modelo a areas menores a 100

Realizamos otro modelo restringuiendo a areas menores a 100

CHANQUEO <- dplyr::select(CHANQUEO,-lluvia)
CHANQUEO <- CHANQUEO[CHANQUEO$area<100,]
plot(CHANQUEO)

chart.Correlation(CHANQUEO)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

Al analizar nuevamente las nubes de puntos, se puede apreciar que existe un dato del indice de combustibilidad que es algo extraño teniendo en cuenta las variables de humedad relativa e indice de sequia, ya que el valor de la humedad realtiva es de 24%, por lo que podría tratarse de un lugar seco o arido que tendría un indice de sequia bastante alto, pero no es asi en ese dato ya que su indice de sequia es de 15,5 en comparacion a otros lugares donde la humedad relativa es mucho más alta y el indice de sequia tambien es bastante alto teniendo un indice de combustibilidad de 90 aproximadamente

Dado lo anterior se elimina esa fila considerando que podría ser una medicion no confiable

CHANQUEO <- CHANQUEO %>% filter(orden != 98)
plot(CHANQUEO)

chart.Correlation(CHANQUEO)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

Como se puede ver en la grafica de chart.correlation de la base de datos ajustada, se puede ver que aumento de 0,73 a 0,81 la correlacion de la variable indice de propagacion con la variable dependiente analizada, por lo que ahora se comienza con el analisis de correlaciones entre las variables independientes.

Dado que la vaiable orden es solo una variable de ayuda y presenta correlaciones engañosas o falsas que no deberian tomarse en cuenta, se procede a sacarla de la base de datos

CHANQUEO_mod01 <- dplyr::select(CHANQUEO,-orden)
plot(CHANQUEO_mod01)

chart.Correlation(CHANQUEO_mod01)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

Ahora tenemos en la grafica una alta correlacion entre las variables ind_cond_humedad con ind_sequia y hum_rel, por lo que se decide sacar esta dado que es la que tiene menor correlacion con la variable dependiente

CHANQUEO_mod01 <- dplyr::select(CHANQUEO,-orden,-Ind_cond_humedad)
plot(CHANQUEO_mod01)

chart.Correlation(CHANQUEO_mod01)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

Dado que hay una correlacion entre las variables ind_sequia e ind_propagacion, pero considerando que es baja o nula se decide por establecer un primer modelo que la considere

modelo para la regresion

mod01<- lm(Ind_Combustibilidad~.,data = CHANQUEO_mod01)
vif(mod01)
##      Ind_sequia ind_propagacion         Hum_rel          viento            area 
##        1.190637        1.123212        1.039341        1.040118        1.008156
summary(mod01)
## 
## Call:
## lm(formula = Ind_Combustibilidad ~ ., data = CHANQUEO_mod01)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.4453 -0.8129  0.2401  0.8655  3.2456 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     86.1031046  0.8103998 106.248  < 2e-16 ***
## Ind_sequia       0.0027881  0.0007779   3.584 0.000636 ***
## ind_propagacion  0.5003785  0.0461208  10.849  < 2e-16 ***
## Hum_rel         -0.0100234  0.0114593  -0.875 0.384866    
## viento          -0.1277272  0.0932085  -1.370 0.175155    
## area             0.0084401  0.0134272   0.629 0.531761    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.521 on 67 degrees of freedom
## Multiple R-squared:  0.7268, Adjusted R-squared:  0.7065 
## F-statistic: 35.66 on 5 and 67 DF,  p-value: < 2.2e-16
chart.Correlation(CHANQUEO_mod01)
## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

## Warning in par(usr): argument 1 does not name a graphical parameter

Al analizar el vif del primer modelo propuesto, se corrobora que existe una correlacion si bien algo baja entre las variables ind_sequia e ind_propagacion esta podría ser significativa para el analisis del modelo

Por otro lado, al analizar el summary del modelo, se aprecia que existe un b0,b1 y b2 que podrian explicar el modelo sin considerar las variables hum_rel, viento y area

Si bien tenemos en el modelo propuesto que existe un R mayor a 0,60 que es lo que se espera que ocurra, este difiere un poco con el R ajustado

Asumiendo que el modelo funcionaria así, se procede a evaluar los supuestos

Analisis de supuestos

S1. supuesto de media del error =0

mean(mod01$residuals)
## [1] -1.050339e-17

se cumple el supuesto

S2. supuesto Varianza Minima.

para el primer modelo se cumple

S3. Supuesto de Normalidad

shapiro.test(mod01$residuals)
## 
##  Shapiro-Wilk normality test
## 
## data:  mod01$residuals
## W = 0.97613, p-value = 0.1805

se cumple el supuesto

S4. supuesto independecia

lawstat::runs.test(mod01$residuals)
## 
##  Runs Test - Two sided
## 
## data:  mod01$residuals
## Standardized Runs Statistic = -1.5309, p-value = 0.1258

se aprueba el suspuesto

S5. analisis homocedasticidad H0: Homocedasticidad

bptest(mod01)
## 
##  studentized Breusch-Pagan test
## 
## data:  mod01
## BP = 6.3367, df = 5, p-value = 0.2748
plot(mod01,3)

se aprueba el supuesto

S6. analisis autocorrelacion H0: No hay

dwtest(mod01)
## 
##  Durbin-Watson test
## 
## data:  mod01
## DW = 1.8163, p-value = 0.1734
## alternative hypothesis: true autocorrelation is greater than 0

se apueba el supuesto

Dado que todos los supuestos fueron aceptados, se procede a evaluar el modelo creado

Evaluacion del modelo

Evaluar parámetros del modelo

summary(mod01) 
## 
## Call:
## lm(formula = Ind_Combustibilidad ~ ., data = CHANQUEO_mod01)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.4453 -0.8129  0.2401  0.8655  3.2456 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     86.1031046  0.8103998 106.248  < 2e-16 ***
## Ind_sequia       0.0027881  0.0007779   3.584 0.000636 ***
## ind_propagacion  0.5003785  0.0461208  10.849  < 2e-16 ***
## Hum_rel         -0.0100234  0.0114593  -0.875 0.384866    
## viento          -0.1277272  0.0932085  -1.370 0.175155    
## area             0.0084401  0.0134272   0.629 0.531761    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.521 on 67 degrees of freedom
## Multiple R-squared:  0.7268, Adjusted R-squared:  0.7065 
## F-statistic: 35.66 on 5 and 67 DF,  p-value: < 2.2e-16

Se comprueba que el modelo existe con las variables de ind_sequia, ind_sequia e ind_propagacion

Evaluar Correlacion

cor(predict(mod01),CHANQUEO_mod01$Ind_Combustibilidad,method = "pearson") # entrega la correlacion general
## [1] 0.8525494
cor.test(predict(mod01),CHANQUEO_mod01$Ind_Combustibilidad,data=CHANQUEO_mod01,method = "pearson")# evalua la existencia de relacion entre Y y X o lo que quiera
## 
##  Pearson's product-moment correlation
## 
## data:  predict(mod01) and CHANQUEO_mod01$Ind_Combustibilidad
## t = 13.745, df = 71, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.7743699 0.9050891
## sample estimates:
##       cor 
## 0.8525494

el modelo no posee una autocorrelacion de 0,85 o 85%

Evaluar Modelo

summary(aov(mod01))
##                 Df Sum Sq Mean Sq F value   Pr(>F)    
## Ind_sequia       1 128.37  128.37  55.452 2.39e-10 ***
## ind_propagacion  1 277.30  277.30 119.791  < 2e-16 ***
## Hum_rel          1   1.85    1.85   0.799    0.375    
## viento           1   4.26    4.26   1.841    0.179    
## area             1   0.91    0.91   0.395    0.532    
## Residuals       67 155.10    2.31                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Conclusiones

De acuerdo al summary del modelo y al summary del AOV del modelo propuesto, este nos dice que el modelo que explica elcomportamiento de la variable dependente ind_combustibilidad seria el siguiente:

Y= 86,10 + 0,0027881 x Ind_sequia + 0.5003785 x ind_propagacion

Ademas se prueba que la media de los errores es significativamente baja

Con lo anterior, el modelo propuesto se decribe como

Es un modelo que explica el indice de combustibilidad en zonas sin lluvias, en areas menores a 100 y que puede, bajo la siguiente ecuacion, explicar el 0,7065 o el 70.65% de los casos bajo esas condiciones descritas

Y= 86,10 + 0,0027881 x Ind_sequia + 0.5003785 x ind_propagacion