File size: 77,408 Bytes
98d22b8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156

# Define UI for application
ui <- fluidPage(
  
  
  tags$head(
    tags$link(rel="stylesheet",
              href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
              integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ",
              crossorigin="anonymous"),
    HTML('<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>'),
    HTML('<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"></script>'),
    HTML('

    <script>

      document.addEventListener("DOMContentLoaded", function(){

        renderMathInElement(document.body, {

          delimiters: [{left: "$", right: "$", display: false}]

        });

      })

    </script>')
  ),
  
  
  
  #theme = shinytheme("simplex"),
  theme = shinytheme("cerulean"),
  #        theme = shinytheme("united"),
  #         theme = shinytheme("journal"),
  
  # Application title
  withMathJax(),
  tags$style(type="text/css",
             "body {padding-top: 5px;

                color: purple; background-color: white}"),
  
  titlePanel(h2("Pruebas de Hipótesis Multivariadas",
                style={'background-color:aquamarine;'})),
  
  #########################################################
  #########################################################
  #### INICIO TABSETPANEL-GLOBAL DE UNA Y DOS POBLACIONES
  #########################################################
  #########################################################
  
  tabsetPanel(
    
    #########################################################
    #########################################################
    #### INICIO TABPANEL-DE UNA POBLACIÓN
    #########################################################
    #########################################################
    
    tabPanel(h4("PH para una población",style={'color:#e905f5;'}),
             
             #  position = "fixed-top",
             
             # Sidebar
             tabsetPanel(
               id = "tabs1",
               type = "pills",
               
               ################################################ 
               ### Inicio del tabPanel Datos
               ################################################
               
               tabPanel("Datos",
                        # Barra de Opciones de Datos
                        div(
                          sidebarPanel(
                            conditionalPanel(condition = "input.tabs1 == 'Datos'",
                                             radioButtons("dataInput",HTML("Para interactuar con esta aplicacion usted puede usar los datos simulados o cargar sus propios datos. <br> Por favor elija una de las siguientes opciones:"),  
                                                          #radioButtons("dataInput","Elegir los Datos a Usar:",
                                                          list("Datos simulados" = 1,"Cargar datos" = 2), selected = 1),
                                             
                                             conditionalPanel(condition = "input.dataInput=='2'",
                                                              fileInput("upload","Descargue su arhivo delimitado (10MB_max):",multiple = FALSE,
                                                                        accept = c(
                                                                          "text/csv",
                                                                          "text/comma-separated-values,text/plain",
                                                                          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                                                                          ".csv",
                                                                          ".xlsx"),
                                                                        buttonLabel = "Cargar"),
                                                              radioButtons("fileSepDF","Separador de datos:",list("Coma" = 1,"Tabulador" = 2,"Semicoma" = 3,"Espacio" = 4),selected = 1),
                                                              checkboxInput("myHead","Variables en la fila-1",value = TRUE),
                                                              
                                                              conditionalPanel("input.fileSepDF!='1'",
                                                                               checkboxInput("decimal","Usa la coma como decimal",value = FALSE))
                                             ),
                                             selectizeInput("variables","Variables a usar",choices = NULL,selected = NULL,multiple = TRUE),
                                             generateInfo())
                          )# fin de barra lateral (de sidebar Panel)
                        ),  # fin Barra opciones de datos ie. el Div
                        ####  Panel principal del panel-1
                        mainPanel(
                          fluidRow(column(width=8,
                                          tags$h3(
                                            # tagList(
                                            tags$li(
                                              actionLink("sobre_datos_muestra","  ",icon("info")),
                                              class="dropdown",
                                              tags$code("Conjunto de datos completo")
                                            )
                                            #)
                                          )
                          )),
                          hr(),
                          dataTableOutput('tabla1'),
                          hr(),
                          h3(p(code("Conjunto de datos filtrado"))),
                          hr(),
                          dataTableOutput('tabla2')
                        )  ## fin del mainPanel
               ),  ## fin del tabPanel Datos
               
               ################################################
               ### Inicio del tabPanel Pruebas de Normalidad
               ################################################
               
               tabPanel("Pruebas de normalidad",
                        sidebarLayout(
                          sidebarPanel(
                            selectInput("PH_NU_Seleccionada",p("Normalidad univariada:",style=" text-align:center"),
                                        choices=c("SW:Shapiro-Wilk"=1,
                                                  "CMV:Cramer-von Mises"=2,
                                                  "Lilliefors"=3,
                                                  "SF:Shapiro-Francia"=4,
                                                  "AD:Anderson-Darling"=5),
                                        selected = 1),
                            
                            selectInput("Grafico_Seleccionado",p("Grafico univariado",style=" text-align:center"),
                                        choices=c("QQ-Plot"=1,
                                                  "Histograma"=2,
                                                  "Box-Plot"=3,
                                                  "Scatter-Plot"=4),
                                        selected = 2),
                            
                            selectInput("PH_NM_Seleccionada",p("Normalidad multivariada:",style=" text-align:center"),
                                        choices=c("Mardia"=1,
                                                  "hz:Henze-Zirkler"=2,
                                                  "Royston"=3,
                                                  "dh:Doornik-Hansen"=4),
                                        #                       "Shapiro-Wilk-NM"=5),
                                        selected = 3),
                            
                            selectInput("Grafico_Multi_Seleccionado",p("Gráfico multivariado:",style=" text-align:center"),
                                        choices=c("QQ-Plot_Chi_Cuadrado"=1,
                                                  "Perspectivas"=2,
                                                  "Contonros"=3),
                                        selected = 1),
                            
                            selectInput("Graficos_Varios",p("Otros gráficos:",style=" text-align:center"),
                                        choices=c("Dispersión"=1,
                                                  "Disp_1Elipse_np"=2,
                                                  # "Disp_1Elipse_ng"=3,
                                                  "Disp_2Elipses_np"=4,
                                                  #"Disp_2Elipses_ng"=5,
                                                  "Superficie_NB"=6,
                                                  "contornos_NB"=7,
                                                  "elipse_conf"=8,
                                                  "elipse_conf_IC_T2"=9,
                                                  "elipse_conf_IC_BONF"=10,
                                                  "elipse_conf_IC_tstud"=11),
                                        selected = 2),
                            generateInfo(),
                          ),  #### fin de sidebarPanel-contenidos PNU
                          
                          #############################################
                          ## Inicio Panel Principal de Derecha PH-NORM
                          #############################################
                          
                          mainPanel(
                            tabsetPanel(type = "pills",
                                        
                                        ##############################
                                        ## Inicio Panel de PH NU
                                        ##############################
                                        
                                        tabPanel(withMathJax("\\(H_0 : Datos\\sim N_1\\)"),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 h4(p("Resumen descriptivo de los datos",
                                                                      style="color:black;text-align:center")) ,
                                                                 style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 tableOutput('PH_RD'),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 h4(p("Coeficientes de asimetría y kurtosis univariados",
                                                                      style="color:black;text-align:center")),
                                                                 style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 tableOutput('Res_Descriptivos_Varios'),
                                                 
                                                 #### PH de N_1
                                                 hr(),
                                                 fluidRow(column(width=8,
                                                                 h4(p("PH Sobre normalidad univariada",
                                                                      style="color:black;text-align:center")),
                                                                 style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p('$$\\begin{cases}

                H_0: \\ \\ \\text{Las variables individuales son NU} \\\\

                H_a: \\ \\ \\text{Las variables individuales no son NU}

                \\end{cases}

                $$',
                                                                   style="color:black;border:1px solid black;

                background-color:white"))),
                                                 br(),
                                                 h4(textOutput("resultados_PH_NU"),
                                                    style={'color:red;'}),
                                                 
                                                 br(),
                                                 tableOutput('Res_NU'),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 p(tags$em("Puedes consultar las ayudas de las funciones del R

                          usadas para estas pruebas en:",
                                                                           tags$a("MVN::mvn()",
                                                                                  href="https://rdrr.io/cran/MVN/man/mvn.html"
                                                                           )
                                                                 ),".")
                                                 )),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

               es mayor o igual que \\( \\alpha \\) para un nivel

               de significancia del \\( (1-\\alpha)100\\% \\),  en

               caso contrario se rechaza."),
                                                                   style="background-color:#a9f1a86b"
                                                                 ))),
                                                 br(),
                                                 
                                                 fluidRow(column(width=8,
                                                                 h4(p("Graficos univariados de los datos",
                                                                      style="color:black;text-align:center")),
                                                                 style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 plotOutput('Graf_NU'),
                                                 br()
                                        ),  # Fin del panel de PH NU
                                        
                                        ##############################
                                        ## Inicio Panel de PH NM
                                        ##############################
                                        tabPanel(withMathJax("\\(H_0 : Datos\\sim N_p\\)"),
                                                 br(),
                                                 fluidRow(column( width=8,
                                                                  h4(p("PH Sobre normalidad multivarida (NM)",
                                                                       style="color:black;text-align:center")),
                                                                  style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p('$$\\begin{cases}

              H_0: \\ \\ \\text{Los datos son NM} \\\\

              H_a: \\ \\ \\text{Los datos no son NM}

              \\end{cases}$$',
                                                                   style="color:black;border:1px solid black;

              background-color:white"))),
                                                 br(),
                                                 h4(textOutput("resultados_PH_NM"),
                                                    style={'color:red;'}),
                                                 br(),
                                                 tableOutput('Res_NM'),
                                                 # br(),
                                                 #       tableOutput('Res_NM_SW'),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

               es mayor o igual que \\( \\alpha \\) para un nivel

               de significancia del \\( (1-\\alpha)100\\% \\),  en

               caso contrario se rechaza."),
                                                                   style="background-color:#a9f1a86b"
                                                                 ))),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 h4(p("Graficos multivariados de los datos",
                                                                      style="color:black;text-align:center")),
                                                                 style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 plotOutput('Graf_NM'),
                                                 
                                                 ## Otros gráficos
                                                 hr(),
                                                 fluidRow(column(width=8,
                                                                 h4(p("Otros gráficos de interés",
                                                                      style="color:black;text-align:center")) ,
                                                                 style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 plotOutput('elipses'),
                                                 br()
                                        ),  # Fin del panel de PH NM
                                        
                                        ###################################################
                                        #### Inicio del panel de Teoría
                                        ###################################################
                                        tabPanel("Teoría", "123"
                                                 
                                        ), #### Fin del panel de Teoría
                                        
                            ) #end tabsetPanel-pills ie. del panel derecho de salidas
                          ) # end mainPanel ie. del panel pricipal
                        ) ### fin del sidebarLayout
               ),  ### fin del tabPanel: Pruebas de normalidad
               
               
               ################################################
               ### Inicio del tabPanel Pruebas: Mu=Mu0
               ################################################
               
               tabPanel("\\(H_0 : \\underline{\\mu}=\\underline{\\mu}_0 \\)",
                        sidebarLayout(
                          sidebarPanel(textInput('mu0',
                                                 HTML('Por favor ingrese el vector \\( \\underline{\\mu}_0 \\)  para la 

                    PH \\( H_0 \\)  :  \\( \\underline{\\mu} =

                    \\underline{\\mu}_0  \\). \n Por ejemplo si el vector \\(\\mu_0\\)\ es (0,0,0), usted debe ingresar 0,0,0')), # Arreglar el mu
                                       hr(),
                                       numericInput("alfa", p("Ingrese el valor de \\( \\alpha \\)"),value = 0.05),
                                       selectInput("PruebaAnalitica", p("Elija la prueba a usar para n pequeña:",
                                                                        style="text-align:center"),
                                                   choices=c("T2.test"=1,"HotellingsT2"=2),
                                                   selected = 1),
                                       hr(),
                                       selectInput("PruebaAnalitica_ng",p("Prueba a usar para n grande:"
                                                                          ,style="text-align:center"),
                                                   choices=c("HotellingsT2"=1),selected = 1),
                                       generateInfo()
                          ),  #### Find del sidebarPanel
                          
                          ################################################
                          ## Inicio Panel Principal de Derecha PH-Mu=Mu0
                          ################################################
                          
                          mainPanel(
                            tabsetPanel(type = "pills",
                                        
                                        ##################################
                                        ## Inicio Panel de PH Mu=Mu0, FU
                                        ##################################
                                        
                                        tabPanel("Función-Usuario",
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 h4(p("PH sobre el vector de medias usando una FU para n pequeña",
                                                                      style="color:black;text-align:center")),
                                                                 style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=6,
                                                                 p('$$\\begin{cases}

                H_0: \\ \\ \\underline{\\mu}=\\underline{\\mu}_0 \\\\

                H_a: \\ \\ \\underline{\\mu}\\neq\\underline{\\mu}_0

                \\end{cases}$$',
                                                                   style="color:black;border:1px solid black;

                background-color:white"))),
                                                 br(),
                                                 tableOutput('PH_mu0'),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p(tags$em("Puedes consultar algo sobre la teoría

                            utilizada para este tipo de pruebas en:  "),
                                                                   tags$a("Dar click acá:", href="parte1mu0.pdf")
                                                                 )
                                                 )),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

               es mayor o igual que \\( \\alpha \\) para un nivel

               de significancia del \\( (1-\\alpha)100\\% \\),  en

               caso contrario se rechaza."),
                                                                   style="background-color:#a9f1a86b"
                                                                 ))),
                                                 br(),
                                                 tableOutput('conclus2'),
                                                 
                                                 hr(),    ### FU n-Grande
                                                 fluidRow(column( width=8,
                                                                  h4(p("PH sobre el vector de medias usando una FU para n grande",
                                                                       style="color:black;text-align:center")),
                                                                  style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 tableOutput('PH_mu0_ng'),
                                                 br(),
                                                 tableOutput('conclus2_mu0_ng'),
                                                 br()
                                                 
                                        ), # Fin del tabPanel de: Mu=Mu0, FU
                                        
                                        ########################################
                                        ## Inicio Panel de PH Mu=Mu0, USANDO-R
                                        #######################################
                                        
                                        tabPanel("Usando-R",
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 h4(p("PH sobre el vector de medias usando R para n pequeña",
                                                                      style="color:black;text-align:center")),
                                                                 style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 verbatimTextOutput("Res_MU0r"),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 p(tags$em("Para mayor informacion sobre las funciones usadas consultar los siguientes enlaces:",
                                                                           tags$a("rrcov::T2.test()",
                                                                                  href="https://rdrr.io/cran/rrcov/man/T2.test.html"
                                                                           ),
                                                                           tags$a(",  icsnp::HotellingsT2()",
                                                                                  href="https://rdrr.io/cran/ICSNP/man/HotellingsT.html"
                                                                           )
                                                                 ),".")
                                                 )),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

                es mayor o igual que \\( \\alpha \\) para un nivel

                de significancia del \\( (1-\\alpha)100\\% \\),  en

                caso contrario se rechaza."),
                                                                   style="background-color:#a9f1a86b"
                                                                 ))),
                                                 br(),
                                                 textOutput("Conclus_PH_mu0r"),
                                                 
                                                 ### Usando-r N-Grande
                                                 hr(),
                                                 fluidRow(column( width=8,
                                                                  h4(p("PH sobre el vector de medias usando R para n grande",
                                                                       style="color:black;text-align:center")),
                                                                  style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 verbatimTextOutput("Res_MU0r_ng"),
                                                 br()
                                                 
                                        ), # Fin del tabPanel de: Mu=Mu0, Usando-R
                                        
                                        ###########################################
                                        ## Inicio Panel de Teoría
                                        ##########################################
                                        
                                        tabPanel("Teoría",
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 tags$a("Ver la documentación teórica acá:",
                                                                        href=" ")
                                                 ))
                                                 
                                        )  #### Fin del tabPanel: Teoría
                                        
                            )  ### Fin del tabsetPanel (de pills)
                          ) ### Fin del mainPanel ie. del panel pricipal
                        )  ### Fin del sidebarLayout
               ),  ### Fin del tabPanel Mu=Mu0
               
               ################################################
               ### Inicio del tabPanel: Sigma=Sigma0
               ################################################
               
               tabPanel("\\(H_0 : \\mathbf{\\Sigma}=\\mathbf{\\Sigma}_0 \\)",
                        sidebarLayout(
                          sidebarPanel(textInput('sigma0',
                                                 HTML('Matriz \\( \\mathbf{\\Sigma}_0 \\)  para

                    PH: \\( H_0 \\)  :  \\( \\mathbf{\\Sigma} =

                    \\mathbf{\\Sigma}_0  \\) Ejemplo Input: 1,0,0;0,1,0;0,0,1')),
                                       hr(),
                                       numericInput("alfa_sigma",
                                                    p("Valor de \\( \\alpha \\)"),value = 0.05),
                                       selectInput("Prueba_sigma",
                                                   p("Prueba a usar para n pequeña:",
                                                     style="text-align:center"),
                                                   choices=c("LRT test-Mardia (1979)"=1,
                                                             "LRT1 test Rencher-Christensen (2012)"=2,
                                                             "LRT2 test Rencher-Christensen (2012)"=3),
                                                   selected = 1),
                                       hr(),
                                       selectInput("Prueba_sigma_ng",
                                                   p("Prueba a usar para n grande:"
                                                     ,style="text-align:center"),
                                                   choices=c("HotellingsT2"=1),selected = 1),
                                       generateInfo()
                          ),  #### Find del sidebarPanel
                          
                          mainPanel(
                            tabsetPanel(
                              type = "pills",
                              
                              tabPanel("Función de Usuario:",
                                       br(),
                                       fluidRow(column(width=8,
                                                       h4(p("PH sobre la matriz de Var-Cov usando una FU para n pequeña",
                                                            style="color:black;text-align:center")),
                                                       style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=6,
                                                       p('$$\\begin{cases}

                H_0: \\ \\ \\mathbf{\\Sigma}=\\mathbf{\\Sigma}_0 \\\\

                H_a: \\ \\ \\mathbf{\\Sigma}\\neq\\mathbf{\\Sigma}_0

                \\end{cases}$$',
                                                         style="color:black;border:1px solid black;

                background-color:white"))),
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=8,
                                                       p(tags$strong(
                                                         helpText("La matriz de Varianzas-Covarianzas

                                 muestral-$\\mathbf{S}$

                                 de los datos es:" )
                                                       )
                                                       )
                                       )),
                                       br(),
                                       tableOutput('mat_var_cov'),
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=8,
                                                       p(tags$strong(
                                                         helpText("La matriz de Varianzas-Covarianzas-

                                 $\\Sigma_0$ propuesta es:") )
                                                       )
                                       )),
                                       br(),
                                       tableOutput('mat_var_cov_sigma0'),
                                       br(),
                                       tableOutput('PH_Sigma0'),
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=8,
                                                       p(tags$em("Puedes consultar algo sobre la teoría

                            utilizada para este tipo de pruebas en:  "),
                                                         tags$a("Dar click acá:", href="parte2mu0.pdf")
                                                       )
                                       )),
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=8,
                                                       p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

               es mayor o igual que \\( \\alpha \\) para un nivel

               de significancia del \\( (1-\\alpha)100\\% \\),  en

               caso contrario se rechaza."),
                                                         style="background-color:#a9f1a86b"
                                                       ))),
                                       br(),
                                       tableOutput('conclus_sigma0'),
                                       
                                       ### FU n-Grande
                                       hr(),
                                       fluidRow(column(width=8,
                                                       h4(p("PH sobre la matriz de Var-Cov usando una FU n grande",
                                                            style="color:black;text-align:center")),
                                                       style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       tableOutput('PH_Sigma0_ng'),
                                       br(),
                                       tableOutput('conclus_sigma0_ng'),
                                       br()
                                       
                              ),
                              
                              ########### usando-r
                              
                              tabPanel("Usando-R",
                                       br(),
                                       fluidRow(column(width=8,
                                                       h4(p("PH sobre la matriz de Var-Cov usando R para n pequeña",
                                                            style="color:black;text-align:center")),
                                                       style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       verbatimTextOutput("Res_sigma0r"),
                                       br(),
                                       fluidRow(column(width=8,
                                                       p(tags$em("Puedes consultar las ayudas de las funciones del R

                          usadas para estas pruebas en:",
                                                                 tags$a("stets::one_covar_matrix_test()",
                                                                        href="https://fhernanb.github.io/stests/reference/one_covar_matrix_test.html"
                                                                 )
                                                       ),".")
                                       )),
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=8,
                                                       p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

                es mayor o igual que \\( \\alpha \\) para un nivel

                de significancia del \\( (1-\\alpha)100\\% \\),  en

                caso contrario se rechaza."),
                                                         style="background-color:#a9f1a86b"
                                                       ))),
                                       br(),
                                       textOutput("Conclus_PH_sigma0r"),
                                       
                                       ### Usando-r N-Grande
                                       hr(),
                                       fluidRow(column( width=8,
                                                        h4(p("PH sobre el vector de medias usando R para n grande",
                                                             style="color:black;text-align:center")),
                                                        style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       verbatimTextOutput("Res_sigma0r_ng"),
                                       br()
                                       
                              ), # Fin del tabPanel de: Sigma=Sigma_0, Usando-R
                              
                              
                              tabPanel("Teoría",
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=8,
                                                       tags$a("Ver la documentación teórica acá:",
                                                              href="https://fhernanb.github.io/stests/reference/one_covar_matrix_test.html")
                                       ))
                                       
                              )
                              
                            )  ####  Fin del tabsetPanel: Sigma=Sigma0
                          )    ### fin mainPanle
                          
                        )     # fin del sidebarLayout
                        
               )  ### tabPanel: SIgma=igma0
               
             )  ### Fin del tabsetPanel-De una Población
             
             
             ################################################
             ################################################
             ######### FIN DEL PANEL DE UNA POBLACIÓN  ######
             ################################################
             ################################################
             
    ),    ### Fin del tabPanel-De una Población
    
    #####################################
    #####################################
    #### INICIO DOS POBLACIONES #########
    #####################################
    #####################################
    
    tabPanel(h4("PH para dos poblaciones",style={'color:#e905f5;'}),
             
             tabsetPanel(
               
               tabPanel("Datos:",
                        div(
                          sidebarPanel(
                            conditionalPanel(condition = "input.tabs2 == 'Datos:'",
                                             
                                             radioButtons("dataInputa","Elegir los datos a usar:",
                                                          list("Usar datos de muestra" = 1,"Cargar sus Datos" = 2),selected = 1 ),
                                             
                                             conditionalPanel(condition = "input.dataInputa=='2'",
                                                              hr(),
                                                              
                                                              fileInput("uploada","Descargue su arhivo delimitado (10MB_max):",multiple = FALSE,
                                                                        accept = c(
                                                                          "text/csv",
                                                                          "text/comma-separated-values,text/plain",
                                                                          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                                                                          ".csv",
                                                                          ".xlsx"),
                                                                        buttonLabel = "Cargar"),
                                                              
                                                              radioButtons("fileSepDFa","Delimiter:",
                                                                           list("Comma" = 1,"Tab" = 2,"Semicolon" = 3,"Space" = 4),selected = 1),
                                                              
                                                              checkboxInput("myHeada","Nombres de vars. en la primera fila",value = TRUE),
                                                              
                                                              conditionalPanel(condition = "input.fileSepDFa!='1'",
                                                                               
                                                                               checkboxInput("decimal","Usar la coma como decimal",value = FALSE))
                                                              
                                             ),  # Fin de conditional(...input.dataInputa=='2'), ie. Datos2
                                             
                                             selectizeInput("variables1a","Variables a utilizar Grupo-1",choices = NULL,selected = NULL,multiple = TRUE),
                                             
                                             selectizeInput("variables2a","Variables a utilizar Grupo-2",choices = NULL,selected = NULL,multiple = TRUE),
                                             generateInfo()
                                             
                            )  # Find de condition = "input.tabs2 == 'Datos:', ie. Datos
                            
                          ) # fin de sidebarPanel( width = 4)
                          
                        ),  # fin Barra opciones de datos ie. el Div
                        
                        ########################################################
                        ## Inicio Panel Principal De Datos Dos Poblaciones
                        ########################################################
                        
                        mainPanel(
                          fluidRow(column(width=8,
                                          tags$h3(
                                            # tagList(
                                            tags$li(
                                              actionLink("sobre_datos_2Pob","  ",icon("info")),
                                              class="dropdown",
                                              tags$code("Conjunto de datos completo")
                                            )
                                            #)
                                          )
                          )),
                          hr(),
                          dataTableOutput('tabla1a'),
                          hr(),
                          h3(p(code("Muestra de la Población-1"))),
                          hr(),
                          dataTableOutput('tabla2a'),
                          hr(),
                          h3(p(code("Muestra de la Población-2"))),
                          hr(),
                          dataTableOutput('tabla3a')
                        )  ### Find Panel-Principal de Datos2
               ),   ### Fin de tabPanel: "Datos:"
               
               
               #########################################################
               #########################################################
               ######### INICIO PANEL DE PH: Mu1=Mu2
               #########################################################
               #########################################################
               
               tabPanel("\\( H_0:  \\underline{\\mu}_1=\\underline{\\mu}_2 \\)",
                        
                        sidebarLayout(
                          sidebarPanel(
                            
                            textInput('mu0a',
                                      HTML('Entre el vector

                 \\( \\underline{\\delta}_0 \\)  para realizar la PH:

                 \\( H_0 \\)  :  \\( \\underline{\\mu}_1 - \\underline{\\mu}_2

                 = \\underline{\\delta}_0  \\) Ejemplo Input: 0,0,0 Dependiendo de la cantidad de variables')),
                            numericInput("alfaa",p("Entre el valor de \\( \\alpha \\)"),value = 0.05),
                            selectInput("PruebaAnaliticaa", p("Prueba a usar n pequeña:",
                                                              style="text-align:center"),
                                        choices=c("T2.test"=1,"HotellingsT2"=2),
                                        selected = 1),
                            selectInput("PruebaAnalitica_nga",p("Prueba a usar n grande:",
                                                                style="text-align:center"),
                                        choices=c("HotellingsT2"=1),
                                        selected = 1),
                            generateInfo()
                          ),  ### FIn de sidebarPanel(width = 4,....
                          
                          #######################################################
                          #######################################################
                          ## Inicio Panel Principal de Derecha para PH: Mu1=Mu2
                          #######################################################
                          #######################################################
                          
                          mainPanel(
                            
                            ####################################
                            ####################################
                            ##### Inicio Panel de PH Mu1=Mu2
                            ####################################
                            ####################################
                            
                            tabsetPanel(
                              type = "pills",
                              
                              ####################################
                              ## Inicio Panel de PH Mu1=Mu2, FU
                              ####################################
                              
                              tabPanel(withMathJax("Función-Usuario"),
                                       br(),
                                       fluidRow(column(width=8,
                                                       h4(p("PH sobre igualdad de vectores de medias

                usando una FU, para n pequeña, para \\( \\Sigma_1=\\Sigma_2 \\)",
                                                            style="color:black;text-align:center")),
                                                       style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=8,
                                                       p('$$\\begin{cases}

                  H_0: \\ \\ \\underline{\\mu}_1 - \\underline{\\mu}_2  =

                  \\underline{\\delta}_0 \\\\

                  H_a: \\ \\ \\underline{\\mu}_1 - \\underline{\\mu}_2  \\neq

                  \\underline{\\delta}_0

                  \\end{cases}$$',
                                                         style="color:black;border:1px solid black; background-color:white"
                                                       ))),
                                       br(),
                                       tableOutput('PH_mu1_mu2_FU'),
                                       br(),
                                       withMathJax(),
                                       fluidRow(column(width=8,
                                                       p(tags$em("Puedes consultar algo sobre la teoría

                            utilizada para este tipo de pruebas en:  "),
                                                         tags$a("Dar click acá:", href="parte3mu0.pdf")
                                                       )
                                       )),
                                       br(),
                                       fluidRow(column(width=8,
                                                       p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

                  es mayor o igual que \\( \\alpha \\) para un nivel

                  de significancia del \\( (1-\\alpha)100\\% \\),  en

                  caso contrario se rechaza."),
                                                         style="background-color:#a9f1a86b"
                                                       ))),
                                       br(),
                                       tableOutput('conclus2a'),
                                       br(),
                                       
                                       fluidRow(column(width=8,
                                                       h4(p("PH sobre igualdad de vectores de medias

                 usando una FU, para n pequeña para \\( \\Sigma_1\\neq \\Sigma_2\\) Nel and Van

                 Der Merwe-1986",
                                                            style="color:black;text-align:center")),
                                                       style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       tableOutput('PH_mu1_mu2_FU_sigmas_dif'),
                                       br(),
                                       tableOutput('conclus4a'),
                                       hr(),
                                       
                                       ### FU-n-Grande
                                       br(),
                                       
                                       fluidRow(column( width=8,
                                                        h4(p("PH sobre igualdad de vectores de medias para n grande,

                    usando una FU",
                                                             style="color:black;text-align:center")),
                                                        style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       tableOutput('PH_mu1_mu2_FU_NG'),
                                       br(),
                                       tableOutput('conclus3a'),
                                       br()
                                       
                              ), #### Fin de Mu1=Mu2, FU
                              
                              
                              ##############################################
                              ## Inicio Panel de PH Mu1=Mu2, USANDO-R
                              ##############################################
                              
                              tabPanel("Usando-R",
                                       br(),
                                       fluidRow(column(width=8,
                                                       h4(p("PH sobre igualdad de vectores de medias usando R",
                                                            style="color:black;text-align:center")),
                                                       style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       verbatimTextOutput("Res_mu1_mu2_R"),
                                       br(),
                                       withMathJax(),
                                       br(),
                                       fluidRow(column(width=8,
                                                       p(tags$em("Puedes consultar las ayudas de las funciones del R

                          usadas para estas pruebas en:",
                                                                 tags$a("rrcov::T2.test()",
                                                                        href="https://rdrr.io/cran/rrcov/man/T2.test.html"
                                                                 ),
                                                                 tags$a(",  icsnp::HotellingsT2()",
                                                                        href="https://rdrr.io/cran/ICSNP/man/HotellingsT.html"
                                                                 )
                                                                 
                                                       ),".")
                                       )),
                                       br(),
                                       fluidRow(column(width=8,
                                                       p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

                  es mayor o igual que \\( \\alpha \\) para un nivel

                  de significancia del \\( (1-\\alpha)100\\% \\),  en

                  caso contrario se rechaza."),
                                                         style="background-color:#a9f1a86b"
                                                       ))),
                                       br(),
                                       
                                       ### Usando-R N-Grande
                                       hr(),
                                       fluidRow(column( width=8,
                                                        h4(p("Resultados de PH sobre igualdad de vectores de medias

                usando R Para n-grande",
                                                             style="color:black;text-align:center")),
                                                        style="background-color:lavender;border-radius: 10px")),
                                       br(),
                                       verbatimTextOutput("Res_mu1_mu2_R_NG"),
                                       br()
                                       
                              ), # Fin Panel: Mu1=Mu2, USANDO-R
                              
                              ##############################################
                              ## Inicio Panel de Teoría
                              ##############################################
                              
                              tabPanel("Teoría", "1234"
                                       
                                       
                              )
                              
                            )   ### Fin de tabsetPanel(type = "pills",
                          )     ### Fin de mainPanel() Mu1=Mu2
                        )     ### Fin de sidebarLayout()
               ), ### FIN de PANEL mu1=mu2
               
               
               #####################################################
               #####################################################
               ##### Inicio Panel de PH Mu1=Mu2, Muestras Pareadas
               #####################################################
               #####################################################
               
               tabPanel("\\( \\underline{\\mu}_1 = \\underline{\\mu}_2 \\)-Pareadas",
                        
                        sidebarLayout(
                          
                          sidebarPanel(
                            numericInput("alfa1a", p("Valor de \\( \\alpha \\)"),
                                         value = 0.05),
                            br(),
                            selectInput("Prueba_mp",p("Seleccione la prueba pareada a usar:"
                                                      ,style="text-align:center"),
                                        choices=c("approx.hotelling.diff.test"=1),
                                        selected = 1),
                            generateInfo()
                          ),
                          
                          mainPanel(
                            
                            tabsetPanel(type = "pills",
                                        
                                        ##############################################################
                                        ##########  INICIPO PANEL: Mu1=Mu2, MP, FU
                                        ##############################################################
                                        
                                        tabPanel("Función de Usuario",
                                                 br(),
                                                 fluidRow(column( width=8,
                                                                  h4(p("PH sobre igualdad de vectores de de medias

              usando una FU para muestras pareadas",
                                                                       style="color:black;text-align:center")),
                                                                  style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column( width=8,
                                                                  p('$$\\begin{cases}

               H_0: \\ \\ \\underline{\\mu}_1 = \\underline{\\mu}_2 \\\\

               H_a: \\ \\ \\underline{\\mu}_1 \\neq \\underline{\\mu}_2

               \\end{cases}$$',
                                                                    style="color:black;border:1px solid black;background-color:white"
                                                                  ))),
                                                 br(),
                                                 tableOutput('PH_mu1_mu2_FU_MPareadas'),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p(tags$em("Puedes consultar algo sobre la teoría

                            utilizada para este tipo de pruebas en:  "),
                                                                   tags$a("Dar click acá:", href="parte4mu0.pdf")
                                                                 )
                                                 )),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

                es mayor o igual que \\( \\alpha \\) para un nivel

                de significancia del \\( (1-\\alpha)100\\% \\),  en

                caso contrario se rechaza."),
                                                                   style="background-color:#a9f1a86b"
                                                                 ))),
                                                 br(),
                                                 tableOutput('conclus6a'),
                                                 br()
                                                 
                                        ), #### Fin de Panel: Mu1=Mu2, MUESTRAS-PAREADAS, FU
                                        
                                        ##############################################################
                                        ##########  INICIPO PANEL: Mu1=Mu2, MP, USANDO-R
                                        ##############################################################
                                        
                                        tabPanel("Usando R",
                                                 br(),
                                                 fluidRow(column( width=8,
                                                                  h4(p("Resultados de PH sobre igualdad de vectores de medias

                  usando R para muestras pareadas",
                                                                       style="color:black;text-align:center")),
                                                                  style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 verbatimTextOutput("Res_mu1_mu2_R_MPareadas"),
                                                 br(),
                                                 withMathJax(),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 p(tags$em("Puedes consultar las ayudas de las funciones del R

                          usadas para estas pruebas en:",
                                                                           tags$a("ergm::approx.hotelling.diff.test()",
                                                                                  href="https://rdrr.io/cran/ergm/man/approx.hotelling.diff.test.html"
                                                                           )
                                                                 ),".")
                                                 )),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

                es mayor o igual que \\( \\alpha \\) para un nivel

                de significancia del \\( (1-\\alpha)100\\% \\),  en

                caso contrario se rechaza."),
                                                                   style="background-color:#a9f1a86b"
                                                                 ))),
                                                 br()
                                                 
                                        ), ### Fin Mu1=Mu2, Muestras Pareadas, usando-R
                                        
                                        ##############################################
                                        ## Inicio Panel de Teoría
                                        ##############################################
                                        
                                        tabPanel("Teoría", "1234"
                                                 
                                                 
                                        )
                                        
                                        
                            )   ### Fin de tabsetPanel(type = "pills",
                          )     ### Fin de mainPanel() Mu1=Mu2, MUESTRAS_PAREADAS
                        )     ### Fin de sidebarLayout()
               ), ### FIN de PANEL mu1=mu2, MUESTRAS-PAREADAS
               
               
               #####################################################
               #####################################################
               ##### Inicio Panel de PH sigma1=sigma2
               #####################################################
               #####################################################
               
               tabPanel("\\( H_0:  \\Sigma_1=\\Sigma_2 \\)",
                        
                        sidebarLayout(
                          
                          sidebarPanel(
                            
                            numericInput("alfa2a", label = p("Entre el valor de \\( \\alpha \\)"),value = 0.05),
                            br(),
                            selectInput("Prueba_box",p("Seleccione la PH de R a usar:",
                                                       style="text-align:center"),
                                        choices=c("boxM"=1),selected = 1),
                            generateInfo()
                          ),
                          
                          
                          mainPanel(
                            
                            tabsetPanel(type = "pills",
                                        
                                        ##############################################################
                                        ##########  INICIPO PANEL: Sigma1=Sigma2, FU
                                        ##############################################################
                                        
                                        tabPanel("Función de Usuario",
                                                 br(),
                                                 fluidRow(column( width=8,
                                                                  h4(p("Resultados de PH sobre igualdad de matrices de Var-Cov

                 usando una FU", style="color:black;text-align:center")),
                                                                  style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column( width=8,
                                                                  p('$$\\begin{cases}

                  H_0: \\ \\ \\Sigma_1 = \\Sigma_2 \\\\

                  H_a: \\ \\ \\Sigma_1 = \\Sigma_2

                  \\end{cases} $$',
                                                                    style="color:black;border:1px solid black; background-color:white"
                                                                  ))),
                                                 br(),
                                                 tableOutput('PH_sigma1_sigma2_FU'),
                                                 br(),
                                                 withMathJax(),
                                                 fluidRow(column(width=8,
                                                                 p(tags$em("Puedes consultar algo sobre la teoría

                            utilizada para este tipo de pruebas en:  "),
                                                                   tags$a("Dar click acá:", href="parte2mu0.pdf")
                                                                 )
                                                 )),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

                 es mayor o igual que \\( \\alpha \\) para un nivel

                 de significancia del \\( (1-\\alpha)100\\% \\),  en

                 caso contrario se rechaza."),
                                                                   style="background-color:#a9f1a86b"
                                                                 ))),
                                                 br(),
                                                 tableOutput('conclus8a'),
                                                 br()
                                                 
                                        ), ### Fin Panel Sigma1=SIgma2, FU
                                        
                                        
                                        ##############################################################
                                        ##########  INICIPO PANEL: Sigma1=Sigma2, USANDO-R
                                        ##############################################################
                                        
                                        tabPanel("Usando R",
                                                 br(),
                                                 fluidRow(column( width=8,
                                                                  h4(p("Resultados de PH sobre igualdad de matrices de Var-Cov usando R",
                                                                       style="color:black;text-align:center")),
                                                                  style="background-color:lavender;border-radius: 10px")),
                                                 br(),
                                                 verbatimTextOutput("Res_sigma1_sigma2_R"),
                                                 br(),
                                                 withMathJax(),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 p(tags$em("Puedes consultar las ayudas de las funciones del R

                          usadas para estas pruebas en:",
                                                                           tags$a("biotools::boxM()",
                                                                                  href="https://rdrr.io/cran/biotools/man/boxM.html"
                                                                           )
                                                                 ),".")
                                                 )),
                                                 br(),
                                                 fluidRow(column(width=8,
                                                                 p(em("No se rechaza \\(  H_0 \\) si valor p de la prueba

                 es mayor o igual que \\( \\alpha \\) para un nivel

                 de significancia del \\( (1-\\alpha)100\\% \\),  en

                 caso contrario se rechaza."),
                                                                   style="background-color:#a9f1a86b"
                                                                 ))),
                                                 br()
                                                 
                                        ), ### Fin Panel: Sigma1=Sigma2, usando-R
                                        
                                        ##############################################
                                        ## Inicio Panel de Teoría
                                        ##############################################
                                        
                                        tabPanel("Teoría", "1234"
                                                 
                                                 
                                        )
                                        
                            )   ### Fin de tabsetPanel(type = "pills",
                          )     ### Fin de mainPanel() Sigma1=Sigma2
                        )     ### Fin de sidebarLayout()
               ), ### FIN de PANEL Sigma1=Sigma2
               
               id = "tabs2",
               type = "pills"
               
             )    ### Fin del tabPanel   tabsetPanel (Antes de Datos:)
             
    ) ### Fin del tabPanel-De Dos Poblaciones
    
  )  ### Fin del tabsetPanel-Global, ie. De Una y Dos Poblaciones
  
)   # Fin de ui