library(wooldridge)
data(hpricel)
## Warning in data(hpricel): data set 'hpricel' not found
head(force(hprice1),n=5)#mostrar las primeras 5 observaciones
## price assess bdrms lotsize sqrft colonial lprice lassess llotsize lsqrft
## 1 300 349.1 4 6126 2438 1 5.703783 5.855359 8.720297 7.798934
## 2 370 351.5 3 9903 2076 1 5.913503 5.862210 9.200593 7.638198
## 3 191 217.7 3 5200 1374 0 5.252274 5.383118 8.556414 7.225482
## 4 195 231.8 3 4600 1448 1 5.273000 5.445875 8.433811 7.277938
## 5 373 319.1 4 6095 2514 1 5.921578 5.765504 8.715224 7.829630
options(scipen = 999999)
library(wooldridge)
data(hprice1)
modelo_estimado<-lm(price~lotsize+sqrft+bdrms,data = hprice1)
summary(modelo_estimado)
##
## Call:
## lm(formula = price ~ lotsize + sqrft + bdrms, data = hprice1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -120.026 -38.530 -6.555 32.323 209.376
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -21.7703081 29.4750419 -0.739 0.46221
## lotsize 0.0020677 0.0006421 3.220 0.00182 **
## sqrft 0.1227782 0.0132374 9.275 0.0000000000000166 ***
## bdrms 13.8525217 9.0101454 1.537 0.12795
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 59.83 on 84 degrees of freedom
## Multiple R-squared: 0.6724, Adjusted R-squared: 0.6607
## F-statistic: 57.46 on 3 and 84 DF, p-value: < 0.00000000000000022
options(scipen = 999999)
library(tseries)
salida_JB<-jarque.bera.test(modelo_estimado$residuals)
salida_JB
##
## Jarque Bera Test
##
## data: modelo_estimado$residuals
## X-squared = 32.278, df = 2, p-value = 0.00000009794
R/ Se puede concluir que se rechaza la Hipótesis Nula dado que 0.00000009794<0.05, por tanto los residuos no siguen una distribución normal.
options(scipen = 999999)
library(fastGraph)
alpha_sig<-0.05
JB<-salida_JB$statistic
gl<-salida_JB$parameter
VC<-qchisq(1-alpha_sig,gl,lower.tail = TRUE)
shadeDist(JB,ddist = "dchisq",
parm1 = gl,
lower.tail = FALSE,xmin = 0,
sub=paste("VC:",round(VC,2),"","JB:",round(JB,2)))
options(scipen = 999999)
library(nortest)
prueba_KS<-lillie.test(modelo_estimado$residuals)
prueba_KS
##
## Lilliefors (Kolmogorov-Smirnov) normality test
##
## data: modelo_estimado$residuals
## D = 0.075439, p-value = 0.2496
R/ En este caso, No se rechaza la Hipótesis Nula dado que 0.2496>0.05, por lo que los residuos siguen una distribución normal.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(gt)
library(gtExtras)
residuos<-modelo_estimado$residuals
residuos%>%
as_tibble()%>%
mutate(posicion=row_number())%>%
arrange(value)%>%
mutate(dist1=row_number()/n())%>%
mutate(dist2=(row_number()-1)/n())%>%
mutate(zi=as.vector(scale(value,center=TRUE)))%>%
mutate(pi=pnorm(zi,lower.tail = TRUE))%>%
mutate(dif1=abs(dist1-pi))%>%
mutate(dif2=abs(dist2-pi))%>%
rename(residuales=value)->tabla_KS
#Formato
tabla_KS%>%
gt()%>%
tab_header("Tabla para calcular el Estadistico KS")%>%
tab_source_note(source_note = "Fuente Elaboracion propia")%>%
tab_style(
style = list(
cell_fill(color="#A569BD"),
cell_text(style = "italic")
),
locations = cells_body(
columns=dif1,
rows=dif1==max(dif1)
))%>%
tab_style(
style = list(
cell_fill(color="#3498DB"),
cell_text(style = "italic")
),
locations = cells_body(
columns=dif2,
rows=dif2==max(dif2)
))
| Tabla para calcular el Estadistico KS | |||||||
| residuales | posicion | dist1 | dist2 | zi | pi | dif1 | dif2 |
|---|---|---|---|---|---|---|---|
| -120.026447 | 81 | 0.01136364 | 0.00000000 | -2.041515459 | 0.02059981 | 0.0092361731 | 0.0205998094 |
| -115.508697 | 77 | 0.02272727 | 0.01136364 | -1.964673586 | 0.02472601 | 0.0019987418 | 0.0133623781 |
| -107.080889 | 24 | 0.03409091 | 0.02272727 | -1.821326006 | 0.03427866 | 0.0001877487 | 0.0115513850 |
| -91.243980 | 48 | 0.04545455 | 0.03409091 | -1.551957925 | 0.06033615 | 0.0148816002 | 0.0262452366 |
| -85.461169 | 12 | 0.05681818 | 0.04545455 | -1.453598781 | 0.07302879 | 0.0162106057 | 0.0275742421 |
| -77.172687 | 32 | 0.06818182 | 0.05681818 | -1.312620980 | 0.09465535 | 0.0264735301 | 0.0378371665 |
| -74.702719 | 54 | 0.07954545 | 0.06818182 | -1.270609602 | 0.10193378 | 0.0223883300 | 0.0337519664 |
| -65.502849 | 39 | 0.09090909 | 0.07954545 | -1.114130117 | 0.13261169 | 0.0417025941 | 0.0530662305 |
| -63.699108 | 69 | 0.10227273 | 0.09090909 | -1.083450505 | 0.13930425 | 0.0370315271 | 0.0483951634 |
| -62.566594 | 83 | 0.11363636 | 0.10227273 | -1.064187703 | 0.14362184 | 0.0299854747 | 0.0413491110 |
| -59.845223 | 36 | 0.12500000 | 0.11363636 | -1.017900230 | 0.15436269 | 0.0293626861 | 0.0407263225 |
| -54.466158 | 13 | 0.13636364 | 0.12500000 | -0.926408352 | 0.17711690 | 0.0407532663 | 0.0521169027 |
| -54.300415 | 14 | 0.14772727 | 0.13636364 | -0.923589260 | 0.17785010 | 0.0301228311 | 0.0414864675 |
| -52.129801 | 15 | 0.15909091 | 0.14772727 | -0.886669532 | 0.18762842 | 0.0285375141 | 0.0399011505 |
| -51.441108 | 17 | 0.17045455 | 0.15909091 | -0.874955638 | 0.19079902 | 0.0203444766 | 0.0317081129 |
| -48.704980 | 47 | 0.18181818 | 0.17045455 | -0.828417174 | 0.20371714 | 0.0218989601 | 0.0332625965 |
| -48.350295 | 29 | 0.19318182 | 0.18181818 | -0.822384375 | 0.20542908 | 0.0122472664 | 0.0236109028 |
| -47.855859 | 11 | 0.20454545 | 0.19318182 | -0.813974573 | 0.20782976 | 0.0032843043 | 0.0146479407 |
| -45.639765 | 1 | 0.21590909 | 0.20454545 | -0.776281294 | 0.21879146 | 0.0028823668 | 0.0142460032 |
| -43.142550 | 9 | 0.22727273 | 0.21590909 | -0.733806463 | 0.23153335 | 0.0042606233 | 0.0156242596 |
| -41.749618 | 57 | 0.23863636 | 0.22727273 | -0.710114247 | 0.23881665 | 0.0001802823 | 0.0115439187 |
| -40.869022 | 27 | 0.25000000 | 0.23863636 | -0.695136302 | 0.24348494 | 0.0065150566 | 0.0048485798 |
| -37.749811 | 34 | 0.26136364 | 0.25000000 | -0.642082009 | 0.26040997 | 0.0009536682 | 0.0104099682 |
| -36.663785 | 71 | 0.27272727 | 0.26136364 | -0.623609925 | 0.26644190 | 0.0062853771 | 0.0050782592 |
| -36.646568 | 79 | 0.28409091 | 0.27272727 | -0.623317083 | 0.26653809 | 0.0175528221 | 0.0061891857 |
| -33.801248 | 37 | 0.29545455 | 0.28409091 | -0.574921384 | 0.28267223 | 0.0127823120 | 0.0014186757 |
| -29.766931 | 16 | 0.30681818 | 0.29545455 | -0.506302171 | 0.30632227 | 0.0004959124 | 0.0108677240 |
| -26.696234 | 22 | 0.31818182 | 0.30681818 | -0.454073044 | 0.32488813 | 0.0067063089 | 0.0180699452 |
| -24.271531 | 23 | 0.32954545 | 0.31818182 | -0.412831567 | 0.33986501 | 0.0103195566 | 0.0216831929 |
| -23.651448 | 86 | 0.34090909 | 0.32954545 | -0.402284648 | 0.34373728 | 0.0028281851 | 0.0141918214 |
| -19.683427 | 88 | 0.35227273 | 0.34090909 | -0.334793052 | 0.36889060 | 0.0166178738 | 0.0279815102 |
| -17.817835 | 10 | 0.36363636 | 0.35227273 | -0.303061413 | 0.38092153 | 0.0172851663 | 0.0286488027 |
| -16.762094 | 60 | 0.37500000 | 0.36363636 | -0.285104441 | 0.38778206 | 0.0127820638 | 0.0241457002 |
| -16.596960 | 21 | 0.38636364 | 0.37500000 | -0.282295711 | 0.38885839 | 0.0024947507 | 0.0138583870 |
| -16.271207 | 58 | 0.39772727 | 0.38636364 | -0.276755010 | 0.39098411 | 0.0067431583 | 0.0046204781 |
| -13.815798 | 56 | 0.40909091 | 0.39772727 | -0.234991254 | 0.40710776 | 0.0019831485 | 0.0093804879 |
| -13.462160 | 75 | 0.42045455 | 0.40909091 | -0.228976273 | 0.40944368 | 0.0110108666 | 0.0003527698 |
| -12.081520 | 4 | 0.43181818 | 0.42045455 | -0.205493119 | 0.41859344 | 0.0132247451 | 0.0018611087 |
| -11.629207 | 51 | 0.44318182 | 0.43181818 | -0.197799788 | 0.42160086 | 0.0215809622 | 0.0102173258 |
| -11.312669 | 74 | 0.45454545 | 0.44318182 | -0.192415834 | 0.42370825 | 0.0308372092 | 0.0194735728 |
| -8.236558 | 3 | 0.46590909 | 0.45454545 | -0.140094626 | 0.44429261 | 0.0216164775 | 0.0102528411 |
| -7.662789 | 70 | 0.47727273 | 0.46590909 | -0.130335452 | 0.44815052 | 0.0291222111 | 0.0177585748 |
| -6.752801 | 67 | 0.48863636 | 0.47727273 | -0.114857588 | 0.45427900 | 0.0343573625 | 0.0229937262 |
| -6.707262 | 31 | 0.50000000 | 0.48863636 | -0.114083016 | 0.45458599 | 0.0454140074 | 0.0340503710 |
| -6.402439 | 85 | 0.51136364 | 0.50000000 | -0.108898313 | 0.45664157 | 0.0547220642 | 0.0433584278 |
| -5.446904 | 82 | 0.52272727 | 0.51136364 | -0.092645733 | 0.46309251 | 0.0596347676 | 0.0482711313 |
| -3.537785 | 43 | 0.53409091 | 0.52272727 | -0.060173762 | 0.47600862 | 0.0580822876 | 0.0467186512 |
| -2.824941 | 61 | 0.54545455 | 0.53409091 | -0.048049090 | 0.48083856 | 0.0646159857 | 0.0532523493 |
| -2.745208 | 68 | 0.55681818 | 0.54545455 | -0.046692922 | 0.48137899 | 0.0754391961 | 0.0640755598 |
| -0.195089 | 65 | 0.56818182 | 0.55681818 | -0.003318245 | 0.49867621 | 0.0695056040 | 0.0581419676 |
| 1.399296 | 55 | 0.57954545 | 0.56818182 | 0.023800450 | 0.50949411 | 0.0700513452 | 0.0586877088 |
| 5.363331 | 26 | 0.59090909 | 0.57954545 | 0.091224254 | 0.53634280 | 0.0545662924 | 0.0432026561 |
| 6.700640 | 53 | 0.60227273 | 0.59090909 | 0.113970383 | 0.54536936 | 0.0569033628 | 0.0455397265 |
| 7.386314 | 80 | 0.61363636 | 0.60227273 | 0.125632935 | 0.54998875 | 0.0636476093 | 0.0522839730 |
| 9.099900 | 41 | 0.62500000 | 0.61363636 | 0.154779103 | 0.56150227 | 0.0634977329 | 0.0521340965 |
| 12.433611 | 46 | 0.63636364 | 0.62500000 | 0.211481796 | 0.58374433 | 0.0526193043 | 0.0412556680 |
| 16.718018 | 62 | 0.64772727 | 0.63636364 | 0.284354766 | 0.61193074 | 0.0357965328 | 0.0244328965 |
| 18.093192 | 5 | 0.65909091 | 0.64772727 | 0.307744934 | 0.62086179 | 0.0382291219 | 0.0268654856 |
| 18.801816 | 38 | 0.67045455 | 0.65909091 | 0.319797835 | 0.62543921 | 0.0450153400 | 0.0336517036 |
| 19.168108 | 33 | 0.68181818 | 0.67045455 | 0.326028052 | 0.62779843 | 0.0540197476 | 0.0426561112 |
| 19.219211 | 72 | 0.69318182 | 0.68181818 | 0.326897255 | 0.62812720 | 0.0650546167 | 0.0536909803 |
| 20.334434 | 59 | 0.70454545 | 0.69318182 | 0.345865960 | 0.63527827 | 0.0692671805 | 0.0579035442 |
| 24.909926 | 78 | 0.71590909 | 0.70454545 | 0.423689939 | 0.66410402 | 0.0518050676 | 0.0404414312 |
| 26.236229 | 40 | 0.72727273 | 0.71590909 | 0.446248874 | 0.67229126 | 0.0549814685 | 0.0436178321 |
| 30.924022 | 25 | 0.73863636 | 0.72727273 | 0.525982978 | 0.70054998 | 0.0380863808 | 0.0267227444 |
| 32.253952 | 45 | 0.75000000 | 0.73863636 | 0.548603608 | 0.70836125 | 0.0416387548 | 0.0302751184 |
| 32.529367 | 49 | 0.76136364 | 0.75000000 | 0.553288104 | 0.70996693 | 0.0513967091 | 0.0400330727 |
| 32.675968 | 18 | 0.77272727 | 0.76136364 | 0.555781630 | 0.71081993 | 0.0619073452 | 0.0505437088 |
| 33.275839 | 20 | 0.78409091 | 0.77272727 | 0.565984762 | 0.71429793 | 0.0697929786 | 0.0584293423 |
| 36.031430 | 52 | 0.79545455 | 0.78409091 | 0.612854281 | 0.73001365 | 0.0654408934 | 0.0540772571 |
| 37.147186 | 84 | 0.80681818 | 0.79545455 | 0.631832029 | 0.73625168 | 0.0705665028 | 0.0592028664 |
| 40.320875 | 7 | 0.81818182 | 0.80681818 | 0.685812928 | 0.75358446 | 0.0645973596 | 0.0532337232 |
| 44.334467 | 30 | 0.82954545 | 0.81818182 | 0.754079634 | 0.77459930 | 0.0549461574 | 0.0435825211 |
| 46.907165 | 28 | 0.84090909 | 0.82954545 | 0.797838357 | 0.78751785 | 0.0533912405 | 0.0420276041 |
| 54.418366 | 87 | 0.85227273 | 0.84090909 | 0.925595465 | 0.82267187 | 0.0296008528 | 0.0182372164 |
| 55.091131 | 35 | 0.86363636 | 0.85227273 | 0.937038450 | 0.82563061 | 0.0380057535 | 0.0266421172 |
| 55.470305 | 44 | 0.87500000 | 0.86363636 | 0.943487765 | 0.82728426 | 0.0477157353 | 0.0363520989 |
| 62.939597 | 6 | 0.88636364 | 0.87500000 | 1.070532059 | 0.85781006 | 0.0285535797 | 0.0171899433 |
| 66.478628 | 50 | 0.89772727 | 0.88636364 | 1.130727018 | 0.87091500 | 0.0268122757 | 0.0154486394 |
| 67.426518 | 63 | 0.90909091 | 0.89772727 | 1.146849569 | 0.87427810 | 0.0348128083 | 0.0234491719 |
| 67.603959 | 19 | 0.92045455 | 0.90909091 | 1.149867648 | 0.87490081 | 0.0455537393 | 0.0341901029 |
| 69.707122 | 64 | 0.93181818 | 0.92045455 | 1.185640095 | 0.88211777 | 0.0497004123 | 0.0383367759 |
| 69.843246 | 8 | 0.94318182 | 0.93181818 | 1.187955411 | 0.88257451 | 0.0606073068 | 0.0492436705 |
| 74.848732 | 2 | 0.95454545 | 0.94318182 | 1.273093116 | 0.89850750 | 0.0560379553 | 0.0446743189 |
| 112.729191 | 66 | 0.96590909 | 0.95454545 | 1.917397313 | 0.97240626 | 0.0064971714 | 0.0178608078 |
| 163.795081 | 73 | 0.97727273 | 0.96590909 | 2.785970904 | 0.99733162 | 0.0200588896 | 0.0314225260 |
| 198.660139 | 42 | 0.98863636 | 0.97727273 | 3.378986513 | 0.99963623 | 0.0109998685 | 0.0223635048 |
| 209.375830 | 76 | 1.00000000 | 0.98863636 | 3.561248407 | 0.99981545 | 0.0001845478 | 0.0111790885 |
| Fuente Elaboracion propia | |||||||
options(scipen = 999999)
library(stats)
salida_SW<-shapiro.test(modelo_estimado$residuals)
print(salida_SW)
##
## Shapiro-Wilk normality test
##
## data: modelo_estimado$residuals
## W = 0.94132, p-value = 0.0005937
R/ Se rechaza la Hipótesis Nula dado que 0.0005937<0.05, por tanto los residuos no siguen una distribución normal.
library(dplyr)
library(gt)
residuos<-modelo_estimado$residuals
residuos%>%
as_tibble()%>%
rename(residuales=value)%>%
arrange(residuales)%>%
mutate(pi=(row_number()-0.375)/(n()+0.25))%>%
mutate(mi=qnorm(pi,lower.tail = TRUE))%>%
mutate(ai=0)->tabla_SW
m<-sum(tabla_SW$mi^2)
n<-nrow(hprice1)
theta<-1/sqrt(n)
tabla_SW$ai[n]<- -2.706056*theta^5+4.434685*theta^3-0.147981*theta^2+0.2211570*theta+tabla_SW$mi[n]/sqrt(m)
tabla_SW$ai[n-1]<- -3.582633*theta^5+5.682633*theta^4-1.752461*theta^3-0.293762*theta^2+0.042981*theta+tabla_SW$mi[n-1]/sqrt(m)
tabla_SW$ai[1]<- -tabla_SW$ai[n]
tabla_SW$ai[2]<- -tabla_SW$ai[n-1]
omega<-(m-2*tabla_SW$mi[n]^2-2*tabla_SW$mi[n-1]^2)/(1-2*tabla_SW$ai[n]^2-2*tabla_SW$ai[n-1]^2)
tabla_SW$ai[3:(n-2)]<-tabla_SW$mi[3:(n-2)]/sqrt(omega)
tabla_SW%>%
mutate(ai_ui=ai*residuales,ui2=residuales^2)->tabla_SW
tabla_SW%>%
gt()%>%tab_header("Tabla para calcular el Estadistico W")%>%
tab_source_note(source_note = "Fuente: Elaboracion propia")
| Tabla para calcular el Estadistico W | |||||
| residuales | pi | mi | ai | ai_ui | ui2 |
|---|---|---|---|---|---|
| -120.026447 | 0.007082153 | -2.45306927 | -0.293402275 | 35.216032599 | 14406.34799223 |
| -115.508697 | 0.018413598 | -2.08767462 | -0.226331231 | 26.143225495 | 13342.25903657 |
| -107.080889 | 0.029745042 | -1.88455395 | -0.200345078 | 21.453129005 | 11466.31670225 |
| -91.243980 | 0.041076487 | -1.73832835 | -0.184799978 | 16.861885528 | 8325.46388922 |
| -85.461169 | 0.052407932 | -1.62194155 | -0.172427012 | 14.735813997 | 7303.61136157 |
| -77.172687 | 0.063739377 | -1.52411994 | -0.162027693 | 12.504112336 | 5955.62354189 |
| -74.702719 | 0.075070822 | -1.43903134 | -0.152982008 | 11.428171985 | 5580.49626206 |
| -65.502849 | 0.086402266 | -1.36324747 | -0.144925499 | 9.493033091 | 4290.62326804 |
| -63.699108 | 0.097733711 | -1.29457343 | -0.137624830 | 8.766578946 | 4057.57641853 |
| -62.566594 | 0.109065156 | -1.23151500 | -0.130921149 | 8.191290388 | 3914.57869135 |
| -59.845223 | 0.120396601 | -1.17300649 | -0.124701168 | 7.462769211 | 3581.45072682 |
| -54.466158 | 0.131728045 | -1.11825971 | -0.118881091 | 6.474996231 | 2966.56233834 |
| -54.300415 | 0.143059490 | -1.06667420 | -0.113397086 | 6.157508892 | 2948.53511008 |
| -52.129801 | 0.154390935 | -1.01778137 | -0.108199337 | 5.640409849 | 2717.51610406 |
| -51.441108 | 0.165722380 | -0.97120790 | -0.103248158 | 5.311199604 | 2646.18755812 |
| -48.704980 | 0.177053824 | -0.92665123 | -0.098511381 | 4.797994878 | 2372.17509746 |
| -48.350295 | 0.188385269 | -0.88386232 | -0.093962535 | 4.543116287 | 2337.75102457 |
| -47.855859 | 0.199716714 | -0.84263354 | -0.089579544 | 4.286906003 | 2290.18324033 |
| -45.639765 | 0.211048159 | -0.80278966 | -0.085343780 | 3.895070072 | 2082.98814155 |
| -43.142550 | 0.222379603 | -0.76418130 | -0.081239363 | 3.504873292 | 1861.27961161 |
| -41.749618 | 0.233711048 | -0.72667986 | -0.077252621 | 3.225267417 | 1743.03058469 |
| -40.869022 | 0.245042493 | -0.69017366 | -0.073371684 | 2.998628960 | 1670.27697055 |
| -37.749811 | 0.256373938 | -0.65456498 | -0.069586160 | 2.626864381 | 1425.04821452 |
| -36.663785 | 0.267705382 | -0.61976766 | -0.065886891 | 2.415662785 | 1344.23312095 |
| -36.646568 | 0.279036827 | -0.58570518 | -0.062265742 | 2.281825736 | 1342.97093753 |
| -33.801248 | 0.290368272 | -0.55230918 | -0.058715446 | 1.984655372 | 1142.52439130 |
| -29.766931 | 0.301699717 | -0.51951819 | -0.055229468 | 1.644011789 | 886.07020942 |
| -26.696234 | 0.313031161 | -0.48727661 | -0.051801897 | 1.382915567 | 712.68890388 |
| -24.271531 | 0.324362606 | -0.45553386 | -0.048427357 | 1.175406112 | 589.10722688 |
| -23.651448 | 0.335694051 | -0.42424369 | -0.045100930 | 1.066702298 | 559.39099788 |
| -19.683427 | 0.347025496 | -0.39336354 | -0.041818092 | 0.823123358 | 387.43729851 |
| -17.817835 | 0.358356941 | -0.36285409 | -0.038574662 | 0.687316947 | 317.47522771 |
| -16.762094 | 0.369688385 | -0.33267878 | -0.035366754 | 0.592820839 | 280.96778010 |
| -16.596960 | 0.381019830 | -0.30280344 | -0.032190736 | 0.534268377 | 275.45909399 |
| -16.271207 | 0.392351275 | -0.27319601 | -0.029043199 | 0.472567902 | 264.75217651 |
| -13.815798 | 0.403682720 | -0.24382619 | -0.025920922 | 0.358118227 | 190.87627634 |
| -13.462160 | 0.415014164 | -0.21466524 | -0.022820850 | 0.307217946 | 181.22976154 |
| -12.081520 | 0.426345609 | -0.18568573 | -0.019740068 | 0.238490014 | 145.96311543 |
| -11.629207 | 0.437677054 | -0.15686137 | -0.016675778 | 0.193926071 | 135.23845458 |
| -11.312669 | 0.449008499 | -0.12816677 | -0.013625283 | 0.154138322 | 127.97648221 |
| -8.236558 | 0.460339943 | -0.09957734 | -0.010585969 | 0.087191945 | 67.84088513 |
| -7.662789 | 0.471671388 | -0.07106908 | -0.007555284 | 0.057894545 | 58.71832836 |
| -6.752801 | 0.483002833 | -0.04261848 | -0.004530728 | 0.030595109 | 45.60032533 |
| -6.707262 | 0.494334278 | -0.01420234 | -0.001509837 | 0.010126869 | 44.98736398 |
| -6.402439 | 0.505665722 | 0.01420234 | 0.001509837 | -0.009666636 | 40.99122172 |
| -5.446904 | 0.516997167 | 0.04261848 | 0.004530728 | -0.024678442 | 29.66876028 |
| -3.537785 | 0.528328612 | 0.07106908 | 0.007555284 | -0.026728971 | 12.51592288 |
| -2.824941 | 0.539660057 | 0.09957734 | 0.010585969 | -0.029904742 | 7.98029397 |
| -2.745208 | 0.550991501 | 0.12816677 | 0.013625283 | -0.037404243 | 7.53616965 |
| -0.195089 | 0.562322946 | 0.15686137 | 0.016675778 | -0.003253260 | 0.03805971 |
| 1.399296 | 0.573654391 | 0.18568573 | 0.019740068 | 0.027622188 | 1.95802794 |
| 5.363331 | 0.584985836 | 0.21466524 | 0.022820850 | 0.122395774 | 28.76531940 |
| 6.700640 | 0.596317280 | 0.24382619 | 0.025920922 | 0.173686769 | 44.89857663 |
| 7.386314 | 0.607648725 | 0.27319601 | 0.029043199 | 0.214522195 | 54.55763860 |
| 9.099900 | 0.618980170 | 0.30280344 | 0.032190736 | 0.292932472 | 82.80817401 |
| 12.433611 | 0.630311615 | 0.33267878 | 0.035366754 | 0.439736453 | 154.59467612 |
| 16.718018 | 0.641643059 | 0.36285409 | 0.038574662 | 0.644891897 | 279.49212715 |
| 18.093192 | 0.652974504 | 0.39336354 | 0.041818092 | 0.756622761 | 327.36359375 |
| 18.801816 | 0.664305949 | 0.42424369 | 0.045100930 | 0.847979378 | 353.50828232 |
| 19.168108 | 0.675637394 | 0.45553386 | 0.048427357 | 0.928260810 | 367.41636183 |
| 19.219211 | 0.686968839 | 0.48727661 | 0.051801897 | 0.995591588 | 369.37806665 |
| 20.334434 | 0.698300283 | 0.51951819 | 0.055229468 | 1.123059997 | 413.48922446 |
| 24.909926 | 0.709631728 | 0.55230918 | 0.058715446 | 1.462597386 | 620.50439009 |
| 26.236229 | 0.720963173 | 0.58570518 | 0.062265742 | 1.633618255 | 688.33970624 |
| 30.924022 | 0.732294618 | 0.61976766 | 0.065886891 | 2.037487625 | 956.29510728 |
| 32.253952 | 0.743626062 | 0.65456498 | 0.069586160 | 2.244428679 | 1040.31742689 |
| 32.529367 | 0.754957507 | 0.69017366 | 0.073371684 | 2.386734412 | 1058.15970869 |
| 32.675968 | 0.766288952 | 0.72667986 | 0.077252621 | 2.524304208 | 1067.71890359 |
| 33.275839 | 0.777620397 | 0.76418130 | 0.081239363 | 2.703307993 | 1107.28147309 |
| 36.031430 | 0.788951841 | 0.80278966 | 0.085343780 | 3.075058468 | 1298.26396526 |
| 37.147186 | 0.800283286 | 0.84263354 | 0.089579544 | 3.327627926 | 1379.91339592 |
| 40.320875 | 0.811614731 | 0.88386232 | 0.093962535 | 3.788651606 | 1625.77293960 |
| 44.334467 | 0.822946176 | 0.92665123 | 0.098511381 | 4.367449560 | 1965.54494196 |
| 46.907165 | 0.834277620 | 0.97120790 | 0.103248158 | 4.843078418 | 2200.28216686 |
| 54.418366 | 0.845609065 | 1.01778137 | 0.108199337 | 5.888031095 | 2961.35853839 |
| 55.091131 | 0.856940510 | 1.06667420 | 0.113397086 | 6.247173760 | 3035.03273452 |
| 55.470305 | 0.868271955 | 1.11825971 | 0.118881091 | 6.594370299 | 3076.95468678 |
| 62.939597 | 0.879603399 | 1.17300649 | 0.124701168 | 7.848641202 | 3961.39282116 |
| 66.478628 | 0.890934844 | 1.23151500 | 0.130921149 | 8.703458353 | 4419.40796540 |
| 67.426518 | 0.902266289 | 1.29457343 | 0.137624830 | 9.279563066 | 4546.33534619 |
| 67.603959 | 0.913597734 | 1.36324747 | 0.144925499 | 9.797537528 | 4570.29533539 |
| 69.707122 | 0.924929178 | 1.43903134 | 0.152982008 | 10.663935560 | 4859.08292257 |
| 69.843246 | 0.936260623 | 1.52411994 | 0.162027693 | 11.316540065 | 4878.07906512 |
| 74.848732 | 0.947592068 | 1.62194155 | 0.172427012 | 12.905943238 | 5602.33268291 |
| 112.729191 | 0.958923513 | 1.73832835 | 0.184799978 | 20.832352140 | 12707.87061041 |
| 163.795081 | 0.970254958 | 1.88455395 | 0.200345078 | 32.815538239 | 26828.82842547 |
| 198.660139 | 0.981586402 | 2.08767462 | 0.226331231 | 44.962993843 | 39465.85101402 |
| 209.375830 | 0.992917847 | 2.45306927 | 0.293402275 | 61.431344750 | 43838.23810785 |
| Fuente: Elaboracion propia | |||||
options(scipen = 999999)
Wn_salida<-qnorm(salida_SW$p.value,lower.tail = FALSE)
print(Wn_salida)
## [1] 3.241867
library(fastGraph)
shadeDist(Wn_salida,ddist = "dnorm",lower.tail = FALSE)