library(readxl)
library(MASS)
library(stats)
library(psych)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following object is masked from 'package:MASS':
##
## select
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(openxlsx)
library(quantmod)
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
##
## first, last
## Loading required package: TTR
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
library(ISLR)
excelevidencia <- read.xlsx("Fojal2.xlsx")
Regresion <- lm(Default ~ WC + RE + EBIT, data = excelevidencia)
summary(Regresion) # show results
##
## Call:
## lm(formula = Default ~ WC + RE + EBIT, data = excelevidencia)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.18266 -0.01261 -0.00677 0.00003 1.00113
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.028569 0.004609 6.198 7.38e-10 ***
## WC 0.011949 0.012786 0.935 0.3502
## RE -0.010372 0.006140 -1.689 0.0914 .
## EBIT -0.407060 0.078512 -5.185 2.46e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0806 on 1488 degrees of freedom
## Multiple R-squared: 0.02678, Adjusted R-squared: 0.02482
## F-statistic: 13.65 on 3 and 1488 DF, p-value: 8.736e-09