Upload 3 files
Browse files
global.R
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
if(!require(pacman)) install.packages("pacman");
|
| 4 |
+
|
| 5 |
+
#library(shiny)
|
| 6 |
+
#library(shinythemes)
|
| 7 |
+
#library(car)
|
| 8 |
+
#library(leaps)
|
| 9 |
+
# library(tidyverse)
|
| 10 |
+
# library(magrittr)
|
| 11 |
+
# library(MVN)
|
| 12 |
+
# library(MASS)
|
| 13 |
+
# library(mvtnorm)
|
| 14 |
+
|
| 15 |
+
pacman::p_load(
|
| 16 |
+
pacman,
|
| 17 |
+
shiny,
|
| 18 |
+
shinythemes,
|
| 19 |
+
leaps,
|
| 20 |
+
tidyverse, # gestión y visualización de datos
|
| 21 |
+
magrittr,
|
| 22 |
+
### para NM
|
| 23 |
+
MVN,
|
| 24 |
+
MASS,
|
| 25 |
+
mvtnorm,
|
| 26 |
+
mvnormtest,
|
| 27 |
+
clusterGeneration,
|
| 28 |
+
|
| 29 |
+
flexdashboard,
|
| 30 |
+
### para lectura de datos
|
| 31 |
+
rio, # importación/exportación de datos
|
| 32 |
+
here, # localizar archivos
|
| 33 |
+
readxl,
|
| 34 |
+
|
| 35 |
+
flexdashboard, # versiones dashboard de informes R Markdown
|
| 36 |
+
|
| 37 |
+
plotly, # figuras interactivas
|
| 38 |
+
|
| 39 |
+
knitr,
|
| 40 |
+
HH,
|
| 41 |
+
car,
|
| 42 |
+
rgl,
|
| 43 |
+
sampling,
|
| 44 |
+
### para ACP
|
| 45 |
+
kableExtra,
|
| 46 |
+
FactoMineR, ### Fucntion: PCA(x,x,x,x)
|
| 47 |
+
ade4, ### Function: dudi.pca(x,x,x,x)
|
| 48 |
+
stats, ### FUNCTIONS: prcomp and princomp
|
| 49 |
+
factoextra, ### Extract and Visualize the Results of
|
| 50 |
+
### Multivariate Data Analyse
|
| 51 |
+
gridExtra,
|
| 52 |
+
corrplot,
|
| 53 |
+
DT,
|
| 54 |
+
latex2exp,
|
| 55 |
+
### para pruebas varias
|
| 56 |
+
rrcov,
|
| 57 |
+
ICSNP,
|
| 58 |
+
ppcc,
|
| 59 |
+
ICS,
|
| 60 |
+
|
| 61 |
+
bslib,
|
| 62 |
+
goftest,
|
| 63 |
+
robustbase,
|
| 64 |
+
mixtools,
|
| 65 |
+
ergm,
|
| 66 |
+
biotools,
|
| 67 |
+
gtsummary,
|
| 68 |
+
tools,
|
| 69 |
+
xfun
|
| 70 |
+
|
| 71 |
+
)
|
| 72 |
+
|
| 73 |
+
# library(clusterGeneration)
|
| 74 |
+
# library(DT)
|
| 75 |
+
# library(latex2exp)
|
| 76 |
+
|
| 77 |
+
# library(rrcov)
|
| 78 |
+
# library(ICSNP)
|
| 79 |
+
# library(ppcc)
|
| 80 |
+
# library(ICS)
|
| 81 |
+
#library(mvnormtest)
|
| 82 |
+
|
| 83 |
+
#library(readxl)
|
| 84 |
+
|
| 85 |
+
# library(bslib)
|
| 86 |
+
# library(goftest)
|
| 87 |
+
# library(robustbase)
|
| 88 |
+
# library(mixtools)
|
| 89 |
+
# library(ergm)
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
source("funcionesR/funciones.R")
|
| 93 |
+
#source("modulos/sfasdf.R")
|
| 94 |
+
|
| 95 |
+
#source("funcionesR/paquetes.R")
|
| 96 |
+
|
| 97 |
+
if (!require('devtools')) install.packages('devtools')
|
| 98 |
+
devtools::install_github('fhernanb/stests', force=TRUE)
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
library(stests)
|
server.R
ADDED
|
@@ -0,0 +1,1352 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
server <- function(input, output, session) {
|
| 3 |
+
|
| 4 |
+
### CREACION DE FUNCIONES REACTIVAS ###
|
| 5 |
+
{
|
| 6 |
+
dataM <- reactive({
|
| 7 |
+
|
| 8 |
+
if(input$dataInput==1){
|
| 9 |
+
|
| 10 |
+
inFile <- input$archivo ## Load example data.
|
| 11 |
+
|
| 12 |
+
if(is.null(inFile)) {
|
| 13 |
+
# Generación de datos de muestra
|
| 14 |
+
p <- sample(2:10,1)
|
| 15 |
+
mu=c(rep(0,p) )
|
| 16 |
+
sigma<-round(genPositiveDefMat("eigen",dim=p)$Sigma , 4)
|
| 17 |
+
dt <- round(mvrnorm(n=100, mu,sigma),4)
|
| 18 |
+
dt <- as.data.frame(dt)
|
| 19 |
+
colnames(dt) <- paste("X",1:ncol(dt),sep = "")
|
| 20 |
+
} else { ## Descargar Datos.
|
| 21 |
+
dt <- read.csv(inFile$datapath,
|
| 22 |
+
header=input$header,
|
| 23 |
+
sep=input$sep,
|
| 24 |
+
quote=input$quote)
|
| 25 |
+
|
| 26 |
+
DT::datatable(dt)
|
| 27 |
+
}
|
| 28 |
+
return(dt)
|
| 29 |
+
|
| 30 |
+
} else
|
| 31 |
+
|
| 32 |
+
{
|
| 33 |
+
inFile <- input$upload
|
| 34 |
+
|
| 35 |
+
# mySep <- switch(input$fileSepDF,
|
| 36 |
+
# '1'=",",
|
| 37 |
+
# '2'="\t",
|
| 38 |
+
# '3'=";",
|
| 39 |
+
# '4'=" "
|
| 40 |
+
# )
|
| 41 |
+
|
| 42 |
+
if (is.null(input$upload)){
|
| 43 |
+
return(NULL)
|
| 44 |
+
}
|
| 45 |
+
if (file.info(inFile$datapath)$size <= 20485800){
|
| 46 |
+
# data <- read.table(inFile$datapath,
|
| 47 |
+
# sep = mySep,
|
| 48 |
+
# header = input$myHead,
|
| 49 |
+
# fill = TRUE,
|
| 50 |
+
# dec = ifelse(input$decimal,
|
| 51 |
+
# "," , ".")
|
| 52 |
+
# )
|
| 53 |
+
|
| 54 |
+
data <- rio::import(here::here(inFile$datapath))
|
| 55 |
+
|
| 56 |
+
} else print("El Tamaño del Archivo es
|
| 57 |
+
mayor a 10 MB y no se Puede
|
| 58 |
+
Descargado.")
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
return(data)
|
| 62 |
+
|
| 63 |
+
})
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
# Funciones reactivas para Variables
|
| 67 |
+
variables <- reactive({
|
| 68 |
+
|
| 69 |
+
return(input$variables)
|
| 70 |
+
})
|
| 71 |
+
|
| 72 |
+
# Funciones reactivas para las Variables seleccionadas
|
| 73 |
+
rt <- reactive({
|
| 74 |
+
|
| 75 |
+
tmp <- dataM() %>%
|
| 76 |
+
dplyr::select(input$variables)
|
| 77 |
+
return(tmp)
|
| 78 |
+
})
|
| 79 |
+
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
### FIN DE FUNCIONES REACTIVAS ###
|
| 83 |
+
|
| 84 |
+
#### CREACION DE FUNCIONES DE OBSERVACIÓN ####
|
| 85 |
+
|
| 86 |
+
{
|
| 87 |
+
|
| 88 |
+
# Selecting the category for responseVar.
|
| 89 |
+
|
| 90 |
+
observe({
|
| 91 |
+
data_tmp <- dataM()
|
| 92 |
+
if(!is.null(data_tmp)){
|
| 93 |
+
updateSelectizeInput(session = session,
|
| 94 |
+
inputId = "variables",
|
| 95 |
+
choices = colnames(data_tmp),
|
| 96 |
+
selected = data_tmp)
|
| 97 |
+
} else {
|
| 98 |
+
updateSelectizeInput(session = session,
|
| 99 |
+
inputId = "variables",
|
| 100 |
+
choices = "",
|
| 101 |
+
selected = "")
|
| 102 |
+
}
|
| 103 |
+
})
|
| 104 |
+
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
###### CREACION DE FUNCIONES DE OBSERVACIÓN #######
|
| 108 |
+
|
| 109 |
+
#### CREACIÓN DE LAS DEFINICIONES DE LAS SALIDAS DE DATOS ####
|
| 110 |
+
|
| 111 |
+
#### CREACIÓN DE LAS DEFINICIONES DE LAS SALIDAS DE DATOS ####
|
| 112 |
+
{
|
| 113 |
+
output$tabla1 <- renderDataTable({
|
| 114 |
+
if(input$tabs1 == "Datos"){
|
| 115 |
+
DT::datatable(dataM(),
|
| 116 |
+
#rownames=FALSE,
|
| 117 |
+
#filter = "top",
|
| 118 |
+
options = list(
|
| 119 |
+
pageLength = 5,
|
| 120 |
+
lengthMenu = c(5,10,15,20,25,-1) )
|
| 121 |
+
)
|
| 122 |
+
}
|
| 123 |
+
}
|
| 124 |
+
)
|
| 125 |
+
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
{
|
| 129 |
+
output$tabla2 <- renderDataTable({
|
| 130 |
+
|
| 131 |
+
if(input$tabs1 == "Datos"){
|
| 132 |
+
DT::datatable(rt(),
|
| 133 |
+
#rownames=FALSE,
|
| 134 |
+
#filter = "top",
|
| 135 |
+
options = list(
|
| 136 |
+
pageLength = 5,
|
| 137 |
+
lengthMenu = c(5,10,15,20,25,-1) )
|
| 138 |
+
)
|
| 139 |
+
}
|
| 140 |
+
}
|
| 141 |
+
)
|
| 142 |
+
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
#### Dos Poblaciones
|
| 147 |
+
|
| 148 |
+
### CREACION DE FUNCIONES REACTIVAS ###
|
| 149 |
+
{
|
| 150 |
+
dataMa <- reactive({
|
| 151 |
+
# dataMa <- reactive({ ## Data input.
|
| 152 |
+
if(input$dataInputa==1){ ## Load example data.
|
| 153 |
+
|
| 154 |
+
inFilea <- input$archivo
|
| 155 |
+
if(is.null(inFilea)) {
|
| 156 |
+
# Generación de datos de muestra
|
| 157 |
+
p <- sample(4:10,1)
|
| 158 |
+
mu=c(rep(0,p) )
|
| 159 |
+
sigma<-round(genPositiveDefMat("eigen",dim=p)$Sigma , 4)
|
| 160 |
+
dta <- round(mvrnorm(n=100, mu,sigma),4)
|
| 161 |
+
dta <- as.data.frame(dta)
|
| 162 |
+
colnames(dta) <- paste("X",1:ncol(dta),sep = "")
|
| 163 |
+
dta <- mutate(dta,
|
| 164 |
+
Grupos=as.factor(c(rep(1,nrow(dta)/2),
|
| 165 |
+
rep(2,nrow(dta)/2)) ) )
|
| 166 |
+
} else { ## Descargar Datos.
|
| 167 |
+
dta <- read.csv(inFilea$datapath,
|
| 168 |
+
header=input$header,
|
| 169 |
+
sep=input$sep,
|
| 170 |
+
quote=input$quote)
|
| 171 |
+
|
| 172 |
+
DT::datatable(dta)
|
| 173 |
+
}
|
| 174 |
+
return(dta)
|
| 175 |
+
|
| 176 |
+
} else { ## Cargar Datos
|
| 177 |
+
inFilea <- input$uploada
|
| 178 |
+
mySepa <- switch(input$fileSepDFa,
|
| 179 |
+
'1'=",",
|
| 180 |
+
'2'="\t",
|
| 181 |
+
'3'=";",
|
| 182 |
+
'4'=""
|
| 183 |
+
)
|
| 184 |
+
if (is.null(input$uploada)){
|
| 185 |
+
return(NULL)
|
| 186 |
+
}
|
| 187 |
+
if (file.info(inFilea$datapath)$size <= 20485800){
|
| 188 |
+
# dataa <- read.table(inFilea$datapath,
|
| 189 |
+
# sep = mySepa,
|
| 190 |
+
# header = input$myHeada,
|
| 191 |
+
# fill = TRUE,
|
| 192 |
+
# dec = ifelse(input$decimal,
|
| 193 |
+
# "," , "."
|
| 194 |
+
# )
|
| 195 |
+
# )
|
| 196 |
+
|
| 197 |
+
dataa <- rio::import(here::here(inFilea$datapath))
|
| 198 |
+
|
| 199 |
+
} else print("El Tamaño del Archivo es
|
| 200 |
+
mayor a 10 MB y no se Puede
|
| 201 |
+
Descargado.")
|
| 202 |
+
}
|
| 203 |
+
return(dataa)
|
| 204 |
+
})
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
# Funciones reactivas para Variables
|
| 208 |
+
variables1a <- reactive({
|
| 209 |
+
return(input$variables1a)
|
| 210 |
+
})
|
| 211 |
+
|
| 212 |
+
# Funciones reactivas para las Variables seleccionadas
|
| 213 |
+
# rt2a <- reactive({
|
| 214 |
+
# tmp <- rt2a() %>%
|
| 215 |
+
# dplyr::select(input$variables1)
|
| 216 |
+
# return(tmp)
|
| 217 |
+
# })
|
| 218 |
+
|
| 219 |
+
# Funciones reactivas para Variables
|
| 220 |
+
variables2a <- reactive({
|
| 221 |
+
return(input$variables2a)
|
| 222 |
+
})
|
| 223 |
+
|
| 224 |
+
# Funciones reactivas para las Variables seleccionadas
|
| 225 |
+
# rt3a <- reactive({
|
| 226 |
+
# tmp <- rt3a() %>%
|
| 227 |
+
# dplyr::select(input$variables2)
|
| 228 |
+
# return(tmp)
|
| 229 |
+
# })
|
| 230 |
+
|
| 231 |
+
# Funciones reactivas para las Variables seleccionadas
|
| 232 |
+
# Funciones reactivas para las Variables seleccionadas
|
| 233 |
+
rt2a <- reactive({
|
| 234 |
+
tmp2a <- dataMa() %>% dplyr::filter(Grupos=="1") %>%
|
| 235 |
+
dplyr::select(input$variables1a)
|
| 236 |
+
#dplyr::select(input$pob1)
|
| 237 |
+
return(tmp2a)
|
| 238 |
+
})
|
| 239 |
+
|
| 240 |
+
# Funciones reactivas para las Variables seleccionadas
|
| 241 |
+
rt3a <- reactive({
|
| 242 |
+
tmp3a <- dataMa() %>% dplyr::filter(Grupos=="2") %>%
|
| 243 |
+
dplyr::select(input$variables2a)
|
| 244 |
+
# dplyr::select(input$pob2)
|
| 245 |
+
return(tmp3a)
|
| 246 |
+
})
|
| 247 |
+
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
### FIN DE FUNCIONES REACTIVAS ###
|
| 251 |
+
|
| 252 |
+
#### CREACION DE FUNCIONES DE OBSERVACIÓN ####
|
| 253 |
+
|
| 254 |
+
{
|
| 255 |
+
|
| 256 |
+
# Selecting the category for responseVar.
|
| 257 |
+
|
| 258 |
+
observe({
|
| 259 |
+
data_tmpa <- dataMa()
|
| 260 |
+
if(!is.null(data_tmpa)){
|
| 261 |
+
updateSelectInput(session = session,
|
| 262 |
+
inputId = "variables1a",
|
| 263 |
+
choices = colnames(data_tmpa),
|
| 264 |
+
selected = data_tmpa)
|
| 265 |
+
} else {
|
| 266 |
+
updateSelectInput(session = session,
|
| 267 |
+
inputId = "variables1a",
|
| 268 |
+
choices = "",
|
| 269 |
+
selected = "")
|
| 270 |
+
}
|
| 271 |
+
})
|
| 272 |
+
|
| 273 |
+
observe({
|
| 274 |
+
data_tmpa <- dataMa()
|
| 275 |
+
if(!is.null(data_tmpa)){
|
| 276 |
+
updateSelectInput(session = session,
|
| 277 |
+
inputId = "variables2a",
|
| 278 |
+
choices = colnames(data_tmpa),
|
| 279 |
+
selected = data_tmpa)
|
| 280 |
+
} else {
|
| 281 |
+
updateSelectInput(session = session,
|
| 282 |
+
inputId = "variables2a",
|
| 283 |
+
choices = "",
|
| 284 |
+
selected = "")
|
| 285 |
+
}
|
| 286 |
+
})
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
{
|
| 293 |
+
observeEvent(input$sobre_datos_2Pob, {
|
| 294 |
+
showModal(
|
| 295 |
+
modalDialog("",
|
| 296 |
+
#tagList(
|
| 297 |
+
tags$p("Para el caso de dos poblaciones se carga un
|
| 298 |
+
solo archivo de datos, el cual debe traer
|
| 299 |
+
una columna de nombre: ",
|
| 300 |
+
tags$b( tags$em("Grupos,") ) ,
|
| 301 |
+
"cuyos valores se etiquetan con los
|
| 302 |
+
números 1 y 2." )
|
| 303 |
+
#)
|
| 304 |
+
)
|
| 305 |
+
)
|
| 306 |
+
}
|
| 307 |
+
)
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
{
|
| 312 |
+
observeEvent(input$sobre_datos_muestra, {
|
| 313 |
+
showModal(
|
| 314 |
+
modalDialog("",
|
| 315 |
+
#tagList(
|
| 316 |
+
tags$p("Los ",
|
| 317 |
+
tags$b( tags$em("Datos de Ejemplos,") ) ,
|
| 318 |
+
"se refiere a un conjunto de datos normales
|
| 319 |
+
p-variados (con p entre 2 y 10) que se generan
|
| 320 |
+
cada vez que ejecutas la aplicación con los
|
| 321 |
+
cuales puedes probar la App.
|
| 322 |
+
Igualmente puedes cargar tus propios datos
|
| 323 |
+
mediante la opción: Cargar Datos.
|
| 324 |
+
" )
|
| 325 |
+
#)
|
| 326 |
+
)
|
| 327 |
+
)
|
| 328 |
+
}
|
| 329 |
+
)
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
|
| 333 |
+
|
| 334 |
+
###### CREACION DE FUNCIONES DE OBSERVACIÓN #######
|
| 335 |
+
|
| 336 |
+
#### CREACIÓN DE LAS DEFINICIONES DE LAS SALIDAS DE DATOS ####
|
| 337 |
+
|
| 338 |
+
#### CREACIÓN DE LAS DEFINICIONES DE LAS SALIDAS DE DATOS ####
|
| 339 |
+
{
|
| 340 |
+
output$tabla1a <- renderDataTable({
|
| 341 |
+
if(input$tabs2 == "Datos:"){
|
| 342 |
+
DT::datatable(dataMa(),
|
| 343 |
+
#rownames=FALSE,
|
| 344 |
+
#filter = "top",
|
| 345 |
+
options = list(
|
| 346 |
+
pageLength = 5,
|
| 347 |
+
lengthMenu = c(5,10,15,20,25,-1) )
|
| 348 |
+
)
|
| 349 |
+
}
|
| 350 |
+
}
|
| 351 |
+
)
|
| 352 |
+
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
{
|
| 357 |
+
output$tabla2a <- renderDataTable({
|
| 358 |
+
if(input$tabs2 == "Datos:"){
|
| 359 |
+
DT::datatable(rt2a(),
|
| 360 |
+
#rownames=FALSE,
|
| 361 |
+
#filter = "top",
|
| 362 |
+
options = list(
|
| 363 |
+
pageLength = 5,
|
| 364 |
+
lengthMenu = c(5,10,15,20,25,-1) )
|
| 365 |
+
)
|
| 366 |
+
}
|
| 367 |
+
}
|
| 368 |
+
)
|
| 369 |
+
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
|
| 373 |
+
{
|
| 374 |
+
output$tabla3a <- renderDataTable({
|
| 375 |
+
if(input$tabs2 == "Datos:"){
|
| 376 |
+
DT::datatable(rt3a(),
|
| 377 |
+
#rownames=FALSE,
|
| 378 |
+
#filter = "top",
|
| 379 |
+
options = list(
|
| 380 |
+
pageLength = 5,
|
| 381 |
+
lengthMenu = c(5,10,15,20,25,-1) )
|
| 382 |
+
)
|
| 383 |
+
}
|
| 384 |
+
}
|
| 385 |
+
)
|
| 386 |
+
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
##### Datos para PH mu1_=mu0
|
| 391 |
+
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
#### FIN CREACIÓN DE LAS DEFINICIONES DE LAS SALIDAS DE DATOS ####
|
| 395 |
+
|
| 396 |
+
#### INICIO DE LAS SALIDAS DE RESULTADOS ####
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
### TDODO SOBRE PRUEBAS DE NORMALIDAD
|
| 400 |
+
|
| 401 |
+
## --------------------------------------------------
|
| 402 |
+
## ------ Seleccion de PH_NU-Usando-R: --------------
|
| 403 |
+
|
| 404 |
+
prueba_nu <- reactive({
|
| 405 |
+
|
| 406 |
+
dt <- rt()
|
| 407 |
+
|
| 408 |
+
if(input$PH_NU_Seleccionada == 1){
|
| 409 |
+
|
| 410 |
+
prueba <- mvn(dt,univariateTest=c("SW") )
|
| 411 |
+
|
| 412 |
+
}
|
| 413 |
+
else
|
| 414 |
+
if(input$PH_NU_Seleccionada ==2){
|
| 415 |
+
|
| 416 |
+
prueba <- mvn(dt,univariateTest=c("CVM") )
|
| 417 |
+
}
|
| 418 |
+
else
|
| 419 |
+
if(input$PH_NU_Seleccionada ==3){
|
| 420 |
+
|
| 421 |
+
prueba <- mvn(dt,univariateTest=c("Lillie") )
|
| 422 |
+
}
|
| 423 |
+
else
|
| 424 |
+
if(input$PH_NU_Seleccionada ==4){
|
| 425 |
+
|
| 426 |
+
prueba <- mvn(dt,univariateTest=c("SF") )
|
| 427 |
+
}
|
| 428 |
+
else
|
| 429 |
+
if(input$PH_NU_Seleccionada ==5){
|
| 430 |
+
|
| 431 |
+
prueba <- mvn(dt,univariateTest=c("AD") )
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
prueba$univariateNormality
|
| 435 |
+
|
| 436 |
+
})
|
| 437 |
+
|
| 438 |
+
output$Res_NU <- renderTable({
|
| 439 |
+
prueba_nu()
|
| 440 |
+
}, align='c', bordered = TRUE)
|
| 441 |
+
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
## ------------------------------------------------------------
|
| 445 |
+
## --- Resultados de la PH_NU Seleccionada Usando-R: ----------
|
| 446 |
+
|
| 447 |
+
output$resultados_PH_NU <- renderText({
|
| 448 |
+
|
| 449 |
+
if(input$PH_NU_Seleccionada ==1){
|
| 450 |
+
mensaje='- Los Resultados de la Prueba de Shapiro-Wilk son:'
|
| 451 |
+
}
|
| 452 |
+
else
|
| 453 |
+
if(input$PH_NU_Seleccionada ==2){
|
| 454 |
+
mensaje='- Los Resultados de la Prueba de
|
| 455 |
+
Cramer-von Mises son:'
|
| 456 |
+
}
|
| 457 |
+
else
|
| 458 |
+
if(input$PH_NU_Seleccionada ==3){
|
| 459 |
+
mensaje='- Los Resultados de la Prueba de
|
| 460 |
+
Lilliefors son:'
|
| 461 |
+
}
|
| 462 |
+
else
|
| 463 |
+
if(input$PH_NU_Seleccionada ==4){
|
| 464 |
+
mensaje='- Los Resultados de la Prueba de
|
| 465 |
+
Shapiro-Francia son:'
|
| 466 |
+
}
|
| 467 |
+
else
|
| 468 |
+
if(input$PH_NU_Seleccionada ==5){
|
| 469 |
+
mensaje='- Los Resultados de la Prueba de
|
| 470 |
+
Anderson-Darling son:'
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
mensaje
|
| 474 |
+
|
| 475 |
+
})
|
| 476 |
+
|
| 477 |
+
|
| 478 |
+
## --------------------------------------------------------------------
|
| 479 |
+
## ------ Seleccion de Gráficos Univariados en la PH_NU-Usando-R: -----
|
| 480 |
+
|
| 481 |
+
graficos_nu <- reactive({
|
| 482 |
+
|
| 483 |
+
dt <- rt()
|
| 484 |
+
|
| 485 |
+
if(input$Grafico_Seleccionado ==1){
|
| 486 |
+
|
| 487 |
+
prueba <- mvn(dt,multivariatePlot=c("qq") ) #cambio
|
| 488 |
+
|
| 489 |
+
}
|
| 490 |
+
else
|
| 491 |
+
if(input$Grafico_Seleccionado ==2){
|
| 492 |
+
|
| 493 |
+
prueba <- mvn(dt,univariatePlot=c("histogram") )
|
| 494 |
+
}
|
| 495 |
+
else
|
| 496 |
+
if(input$Grafico_Seleccionado ==3){
|
| 497 |
+
|
| 498 |
+
prueba <- mvn(dt,univariatePlot=c("box") )
|
| 499 |
+
}
|
| 500 |
+
else
|
| 501 |
+
if(input$Grafico_Seleccionado ==4){
|
| 502 |
+
|
| 503 |
+
prueba <- mvn(dt,univariatePlot=c("scatter") )
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
prueba$univariatePlot
|
| 507 |
+
|
| 508 |
+
})
|
| 509 |
+
|
| 510 |
+
|
| 511 |
+
output$Graf_NU <- renderPlot({
|
| 512 |
+
graficos_nu()
|
| 513 |
+
})
|
| 514 |
+
|
| 515 |
+
|
| 516 |
+
## ------------------------------------------------------------
|
| 517 |
+
## --- Resultados de la PH_NM Seleccionada Usando-R: ----------
|
| 518 |
+
|
| 519 |
+
|
| 520 |
+
output$resultados_PH_NM <- renderText({
|
| 521 |
+
|
| 522 |
+
if(input$PH_NM_Seleccionada ==1){
|
| 523 |
+
mensaje='- Los Resultados de la Prueba de Mardia son:'
|
| 524 |
+
}
|
| 525 |
+
else
|
| 526 |
+
if(input$PH_NM_Seleccionada ==2){
|
| 527 |
+
mensaje='- Los Resultados de la Prueba de
|
| 528 |
+
Henze-Zirkler son:'
|
| 529 |
+
}
|
| 530 |
+
else
|
| 531 |
+
if(input$PH_NM_Seleccionada ==3){
|
| 532 |
+
mensaje='- Los Resultados de la Prueba de
|
| 533 |
+
Royston son:'
|
| 534 |
+
}
|
| 535 |
+
else
|
| 536 |
+
if(input$PH_NM_Seleccionada ==4){
|
| 537 |
+
mensaje='- Los Resultados de la Prueba de
|
| 538 |
+
Doornik-Hansen son:'
|
| 539 |
+
}
|
| 540 |
+
# else
|
| 541 |
+
# if(input$PH_NM_Seleccionada ==5){
|
| 542 |
+
# mensaje='- Los Resultados de la Prueba de
|
| 543 |
+
# Shapiro-Wilk- son:'
|
| 544 |
+
# }
|
| 545 |
+
|
| 546 |
+
|
| 547 |
+
mensaje
|
| 548 |
+
|
| 549 |
+
})
|
| 550 |
+
|
| 551 |
+
## --------------------------------------------------
|
| 552 |
+
## ------ Seleccion de PH_NM-Usando-R: --------------
|
| 553 |
+
|
| 554 |
+
prueba_nm_mvn <- reactive({
|
| 555 |
+
|
| 556 |
+
dt <- rt()
|
| 557 |
+
|
| 558 |
+
if(input$PH_NM_Seleccionada == 1){
|
| 559 |
+
|
| 560 |
+
prueba <- mvn(dt,mvnTest=c("mardia") )
|
| 561 |
+
|
| 562 |
+
}
|
| 563 |
+
else
|
| 564 |
+
if(input$PH_NM_Seleccionada ==2){
|
| 565 |
+
|
| 566 |
+
prueba <- mvn(dt,mvnTest=c("hz") )
|
| 567 |
+
}
|
| 568 |
+
else
|
| 569 |
+
if(input$PH_NM_Seleccionada ==3){
|
| 570 |
+
|
| 571 |
+
prueba <- mvn(dt,mvnTest=c("royston") )
|
| 572 |
+
}
|
| 573 |
+
else
|
| 574 |
+
if(input$PH_NM_Seleccionada ==4){
|
| 575 |
+
|
| 576 |
+
prueba <- mvn(dt,mvnTest=c("dh") )
|
| 577 |
+
}
|
| 578 |
+
# else
|
| 579 |
+
# if(input$PH_NM_Seleccionada ==5){
|
| 580 |
+
#
|
| 581 |
+
# prueba <- mshapiro.test(t(dt))
|
| 582 |
+
# }
|
| 583 |
+
|
| 584 |
+
prueba$multivariateNormality
|
| 585 |
+
|
| 586 |
+
})
|
| 587 |
+
|
| 588 |
+
|
| 589 |
+
output$Res_NM <- renderTable({
|
| 590 |
+
prueba_nm_mvn()
|
| 591 |
+
}, align='c', bordered = TRUE)
|
| 592 |
+
|
| 593 |
+
|
| 594 |
+
# ### PNM-Shapiro-Wilk
|
| 595 |
+
#
|
| 596 |
+
# prueba_sw_mvn <- reactive({
|
| 597 |
+
# dt <- rt()
|
| 598 |
+
# if(input$PH_NM_Seleccionada == 5){
|
| 599 |
+
# prueba <- mshapiro.test(t(dt))
|
| 600 |
+
# }
|
| 601 |
+
# else{
|
| 602 |
+
# prueba$multivariateNormality
|
| 603 |
+
# }
|
| 604 |
+
# prueba
|
| 605 |
+
# })
|
| 606 |
+
#
|
| 607 |
+
#
|
| 608 |
+
# output$Res_NM_SW <- renderPrint({
|
| 609 |
+
# prueba_sw_mvn()
|
| 610 |
+
# })
|
| 611 |
+
|
| 612 |
+
|
| 613 |
+
## ----------------------------------------------------------------------
|
| 614 |
+
## ------ Seleccion de Gráficos Multivariados en la PH_NM-Usando-R: -----
|
| 615 |
+
|
| 616 |
+
|
| 617 |
+
graficos_nm <- reactive({
|
| 618 |
+
|
| 619 |
+
dt <- rt()
|
| 620 |
+
|
| 621 |
+
# dt <- dataM()
|
| 622 |
+
|
| 623 |
+
if(input$Grafico_Multi_Seleccionado ==1){
|
| 624 |
+
|
| 625 |
+
prueba <- mvn(dt,multivariatePlot=c("qq"),
|
| 626 |
+
multivariateOutlierMethod="quan",
|
| 627 |
+
showOutliers=TRUE )
|
| 628 |
+
|
| 629 |
+
}
|
| 630 |
+
else
|
| 631 |
+
if(input$Grafico_Multi_Seleccionado ==2){
|
| 632 |
+
|
| 633 |
+
prueba <- mvn(dt,multivariatePlot=c("persp") )
|
| 634 |
+
|
| 635 |
+
# prueba2 <- representa1c_np(dataM()[,1:2],input$alfa)
|
| 636 |
+
}
|
| 637 |
+
else
|
| 638 |
+
if(input$Grafico_Multi_Seleccionado ==3){
|
| 639 |
+
|
| 640 |
+
prueba <- mvn(dt,multivariatePlot=c("contour") )
|
| 641 |
+
}
|
| 642 |
+
|
| 643 |
+
prueba$multivariatePlot
|
| 644 |
+
# prueba2
|
| 645 |
+
|
| 646 |
+
})
|
| 647 |
+
|
| 648 |
+
|
| 649 |
+
output$Graf_NM <- renderPlot({
|
| 650 |
+
graficos_nm()
|
| 651 |
+
})
|
| 652 |
+
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
|
| 656 |
+
## ------------------------------------------------------------
|
| 657 |
+
## --- Resumen Descriptivo de los Datos Utilizados ------------
|
| 658 |
+
|
| 659 |
+
output$PH_RD <- renderTable({
|
| 660 |
+
dt <- rt()
|
| 661 |
+
res<-mvn(dt,mvnTest=c("mardia") )
|
| 662 |
+
res$Descriptive
|
| 663 |
+
}, align='c', bordered = TRUE)
|
| 664 |
+
|
| 665 |
+
|
| 666 |
+
### Mas resúmenes Descriptivos
|
| 667 |
+
|
| 668 |
+
output$Res_Descriptivos_Varios <- renderTable({
|
| 669 |
+
dt <- rt()
|
| 670 |
+
coef_asim <- apply(dt,2,asimetria)
|
| 671 |
+
coef_kurt <- apply(dt,2,kurtosis)
|
| 672 |
+
Res_Des <- data.frame(Asimetría=coef_asim,Kurtosis=coef_kurt)
|
| 673 |
+
Res_Des
|
| 674 |
+
})
|
| 675 |
+
|
| 676 |
+
|
| 677 |
+
## ----------------------------------------------------------------------
|
| 678 |
+
## ------ Seleccion de Otros-Gráficos Varios -----
|
| 679 |
+
|
| 680 |
+
|
| 681 |
+
graficos_elipses <- reactive({
|
| 682 |
+
|
| 683 |
+
dt <- rt()
|
| 684 |
+
|
| 685 |
+
if(input$Graficos_Varios ==1){
|
| 686 |
+
|
| 687 |
+
grafico <- representa(dt)
|
| 688 |
+
|
| 689 |
+
}
|
| 690 |
+
else
|
| 691 |
+
if(input$Graficos_Varios ==2){
|
| 692 |
+
|
| 693 |
+
grafico <- representa1c_np(dt,0.05)
|
| 694 |
+
|
| 695 |
+
}
|
| 696 |
+
else
|
| 697 |
+
if(input$Graficos_Varios ==3){
|
| 698 |
+
|
| 699 |
+
grafico <- representa1c_ng(dt,0.05)
|
| 700 |
+
}
|
| 701 |
+
else
|
| 702 |
+
if(input$Graficos_Varios ==4){
|
| 703 |
+
|
| 704 |
+
grafico <- representa2c_np(dt,0.01,0.05)
|
| 705 |
+
}
|
| 706 |
+
else
|
| 707 |
+
if(input$Graficos_Varios ==5){
|
| 708 |
+
|
| 709 |
+
grafico <- representa2c_ng(dt,0.01,0.05)
|
| 710 |
+
}
|
| 711 |
+
else
|
| 712 |
+
if(input$Graficos_Varios ==6){
|
| 713 |
+
|
| 714 |
+
grafico <- superficie_NB(apply(dt,2,mean),var( dt ) )
|
| 715 |
+
}
|
| 716 |
+
else
|
| 717 |
+
if(input$Graficos_Varios ==7){
|
| 718 |
+
|
| 719 |
+
grafico <- contorno_NB(apply(dt,2,mean),var( dt ) )
|
| 720 |
+
}
|
| 721 |
+
else
|
| 722 |
+
if(input$Graficos_Varios ==8){
|
| 723 |
+
|
| 724 |
+
grafico <- elipse_conf(dt,0.05,1000)
|
| 725 |
+
}
|
| 726 |
+
else
|
| 727 |
+
if(input$Graficos_Varios ==9){
|
| 728 |
+
|
| 729 |
+
grafico <- elipse_conf_IC_T2(dt,0.05,1000)
|
| 730 |
+
}
|
| 731 |
+
else
|
| 732 |
+
if(input$Graficos_Varios ==10){
|
| 733 |
+
|
| 734 |
+
grafico <- elipse_conf_IC_BONF(dt,0.05,1000)
|
| 735 |
+
}
|
| 736 |
+
else
|
| 737 |
+
if(input$Graficos_Varios ==11){
|
| 738 |
+
|
| 739 |
+
grafico <- elipse_conf_IC_tstud(dt,0.05,1000)
|
| 740 |
+
}
|
| 741 |
+
|
| 742 |
+
grafico
|
| 743 |
+
# prueba2
|
| 744 |
+
|
| 745 |
+
})
|
| 746 |
+
|
| 747 |
+
|
| 748 |
+
output$elipses <- renderPlot({
|
| 749 |
+
graficos_elipses()
|
| 750 |
+
})
|
| 751 |
+
|
| 752 |
+
|
| 753 |
+
### TDODO SOBRE PRUEBAS DE HIPÓSTESIS: H : mu=mu_0
|
| 754 |
+
|
| 755 |
+
## ------------------------------------------------------------
|
| 756 |
+
## --- PH_MU_0-Usando Función de Usuario: HT2_mu0(...) --------
|
| 757 |
+
|
| 758 |
+
# PH : mu_0 con función de Usuario
|
| 759 |
+
|
| 760 |
+
output$PH_mu0 <- renderTable({
|
| 761 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 762 |
+
dt <- rt()
|
| 763 |
+
res3 <- HT2_mu0(dt,mu_0,input$alfa)
|
| 764 |
+
res3
|
| 765 |
+
}, align='c', bordered = TRUE)
|
| 766 |
+
|
| 767 |
+
|
| 768 |
+
## ------------------------------------------------------------------------
|
| 769 |
+
## -- Conclusiones de la PH_MU_0-Usando Función de Usuario: HT2_mu0(...) --
|
| 770 |
+
|
| 771 |
+
output$conclus2 <- renderText({
|
| 772 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 773 |
+
dt <- rt()
|
| 774 |
+
res5 <- HT2_mu0(dt,mu_0,input$alfa)
|
| 775 |
+
|
| 776 |
+
ifelse(as.numeric(res5[7]) < input$alfa ,
|
| 777 |
+
paste(strong('Como p = '), res5[7] , ' < ' ,
|
| 778 |
+
input$alfa , withMathJax(' = \\( \\alpha \\); ') , strong('entonces,
|
| 779 |
+
se rechaza H0') , sep="") ,
|
| 780 |
+
paste('Como p = ' , res5[7] ,
|
| 781 |
+
' > ' , input$alfa , withMathJax(' = \\( \\alpha \\) ; '),
|
| 782 |
+
strong('entonces, No se rechaza H0')
|
| 783 |
+
))
|
| 784 |
+
})
|
| 785 |
+
|
| 786 |
+
|
| 787 |
+
## -----------------------------------------------------
|
| 788 |
+
## ---------- Selección de la PH_MU_0-Usando-R ---------
|
| 789 |
+
|
| 790 |
+
prueba_mu0r <- reactive({
|
| 791 |
+
|
| 792 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 793 |
+
|
| 794 |
+
dt <- rt()
|
| 795 |
+
|
| 796 |
+
if(input$PruebaAnalitica == 1){
|
| 797 |
+
|
| 798 |
+
prueba <- T2.test(dt, mu = mu_0 , conf.level = 1-input$alfa)
|
| 799 |
+
|
| 800 |
+
}
|
| 801 |
+
else
|
| 802 |
+
if(input$PruebaAnalitica ==2){
|
| 803 |
+
|
| 804 |
+
prueba <- HotellingsT2(dt,mu=mu_0,test="f")
|
| 805 |
+
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
prueba
|
| 809 |
+
|
| 810 |
+
})
|
| 811 |
+
|
| 812 |
+
output$Res_MU0r <- renderPrint({
|
| 813 |
+
prueba_mu0r()
|
| 814 |
+
})
|
| 815 |
+
|
| 816 |
+
|
| 817 |
+
## -----------------------------------------------------------
|
| 818 |
+
## --- PH_MU_0_N_Grande-Usando Función de Usuario:
|
| 819 |
+
## --- HT2_mu0_ngrande(...) --------
|
| 820 |
+
|
| 821 |
+
# PH : mu_0 con función de Usuario
|
| 822 |
+
|
| 823 |
+
output$PH_mu0_ng <- renderTable({
|
| 824 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 825 |
+
dt <- rt()
|
| 826 |
+
res6 <- HT2_mu0_ngrande(dt,mu_0,input$alfa)
|
| 827 |
+
res6
|
| 828 |
+
}, align='c', bordered = TRUE)
|
| 829 |
+
|
| 830 |
+
|
| 831 |
+
## ----------------------------------------------------------------
|
| 832 |
+
## -- Conclusiones de la PH_MU_0_N_Grande-Usando Función de Usuario:
|
| 833 |
+
## -- HT2_mu0_ngrande(...) --
|
| 834 |
+
|
| 835 |
+
output$conclus2_mu0_ng <- renderText({
|
| 836 |
+
|
| 837 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 838 |
+
|
| 839 |
+
dt <- rt()
|
| 840 |
+
|
| 841 |
+
res8 <- HT2_mu0_ngrande(dt,mu_0,input$alfa)
|
| 842 |
+
|
| 843 |
+
ifelse(as.numeric(res8[4]) < input$alfa ,
|
| 844 |
+
paste(strong('Como p = '), res8[4] , ' < ' ,
|
| 845 |
+
input$alfa , withMathJax(' = \\( \\alpha \\) ; ') , strong('entonces,
|
| 846 |
+
se rechaza H0') , sep="") ,
|
| 847 |
+
paste('Como p = ' , res8[4] ,
|
| 848 |
+
' > ' , input$alfa , withMathJax(' = \\( \\alpha \\) ; '),
|
| 849 |
+
strong('entonces,
|
| 850 |
+
No se rechaza H0') ))
|
| 851 |
+
})
|
| 852 |
+
|
| 853 |
+
|
| 854 |
+
|
| 855 |
+
## --------------------------------------------------------------
|
| 856 |
+
## ---------- Selección de la PH_MU_0_N_Grande Usando-R ---------
|
| 857 |
+
|
| 858 |
+
prueba_mu0r_ng <- reactive({
|
| 859 |
+
|
| 860 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 861 |
+
|
| 862 |
+
dt <- rt()
|
| 863 |
+
|
| 864 |
+
if(input$PruebaAnalitica_ng ==1)
|
| 865 |
+
|
| 866 |
+
prueba <- HotellingsT2(dt,mu=mu_0,test="chi")
|
| 867 |
+
|
| 868 |
+
prueba
|
| 869 |
+
|
| 870 |
+
})
|
| 871 |
+
|
| 872 |
+
output$Res_MU0r_ng <- renderPrint({
|
| 873 |
+
prueba_mu0r_ng()
|
| 874 |
+
})
|
| 875 |
+
|
| 876 |
+
|
| 877 |
+
|
| 878 |
+
############# H_0 : sigma=sigma_0
|
| 879 |
+
|
| 880 |
+
output$mat_var_cov <- renderTable({
|
| 881 |
+
dt <- rt()
|
| 882 |
+
s <- var(rt())
|
| 883 |
+
|
| 884 |
+
round(s,4)
|
| 885 |
+
})
|
| 886 |
+
|
| 887 |
+
output$mat_var_cov_sigma0 <- renderTable({
|
| 888 |
+
dt <- rt()
|
| 889 |
+
sigma00 <- as.numeric(unlist(strsplit(input$sigma0,",")))
|
| 890 |
+
|
| 891 |
+
sigma_0 <- matrix(c(sigma00), nrow=ncol(rt()),
|
| 892 |
+
ncol=ncol(rt()),byrow=TRUE)
|
| 893 |
+
|
| 894 |
+
sigma_0
|
| 895 |
+
})
|
| 896 |
+
|
| 897 |
+
|
| 898 |
+
## ------------------------------------------------------------
|
| 899 |
+
## --- PH_Sigma=Sigma_0-Usando Función de Usuario:
|
| 900 |
+
## sigma_sigma0_npqna(...) --------
|
| 901 |
+
|
| 902 |
+
# PH : mu_0 con función de Usuario
|
| 903 |
+
|
| 904 |
+
output$PH_Sigma0 <- renderTable({
|
| 905 |
+
dt <- rt()
|
| 906 |
+
# mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 907 |
+
|
| 908 |
+
sigma00 <- as.numeric(unlist(strsplit(input$sigma0,",")))
|
| 909 |
+
|
| 910 |
+
sigma_0 <- matrix(c(sigma00), nrow=ncol(rt()),
|
| 911 |
+
ncol=ncol(rt()),byrow=TRUE)
|
| 912 |
+
#dt <- rt()
|
| 913 |
+
res <- sigma_sigma0_npqna(dt,sigma_0,input$alfa_sigma)
|
| 914 |
+
res
|
| 915 |
+
}, align='c', bordered = TRUE)
|
| 916 |
+
|
| 917 |
+
|
| 918 |
+
## ------------------------------------------------------------------------
|
| 919 |
+
## -- Conclusiones de la PH_Sigma=Sigma_0-Usando Función de Usuario:
|
| 920 |
+
## sigma_sigma0_npqna(...) --------
|
| 921 |
+
|
| 922 |
+
output$conclus_sigma0 <- renderText({
|
| 923 |
+
dt <- rt()
|
| 924 |
+
# mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 925 |
+
|
| 926 |
+
sigma00 <- as.numeric(unlist(strsplit(input$sigma0,",")))
|
| 927 |
+
|
| 928 |
+
sigma_0 <- matrix(c(sigma00), nrow=ncol(rt()),
|
| 929 |
+
ncol=ncol(rt()),byrow=TRUE)
|
| 930 |
+
#dt <- rt()
|
| 931 |
+
res <- sigma_sigma0_npqna(dt,sigma_0,input$alfa_sigma)
|
| 932 |
+
res
|
| 933 |
+
|
| 934 |
+
ifelse(as.numeric(res[5]) < input$alfa_sigma ,
|
| 935 |
+
paste(strong('Como p = '), res[5] , ' < ' ,
|
| 936 |
+
input$alfa_sigma , withMathJax(' = \\( \\alpha \\); ') , strong('entonces,
|
| 937 |
+
se rechaza H0') , sep="") ,
|
| 938 |
+
paste('Como p = ' , res[5] ,
|
| 939 |
+
' > ' , input$alfa_sigma , withMathJax(' = \\( \\alpha \\) ; '),
|
| 940 |
+
strong('entonces, No se rechaza H0')
|
| 941 |
+
))
|
| 942 |
+
})
|
| 943 |
+
|
| 944 |
+
|
| 945 |
+
## ------------------------------------------------------------
|
| 946 |
+
## --- PH_Sigma=Sigma_0-Usando Función de Usuario:
|
| 947 |
+
## sigma_sigma0_ngrande(...) --------
|
| 948 |
+
|
| 949 |
+
# PH : mu_0 con función de Usuario
|
| 950 |
+
|
| 951 |
+
output$PH_Sigma0_ng <- renderTable({
|
| 952 |
+
dt <- rt()
|
| 953 |
+
# mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 954 |
+
|
| 955 |
+
sigma00 <- as.numeric(unlist(strsplit(input$sigma0,",")))
|
| 956 |
+
|
| 957 |
+
sigma_0 <- matrix(c(sigma00), nrow=ncol(rt()),
|
| 958 |
+
ncol=ncol(rt()),byrow=TRUE)
|
| 959 |
+
#dt <- rt()
|
| 960 |
+
res <- sigma_sigma0_ngrande(dt,sigma_0,input$alfa_sigma)
|
| 961 |
+
res
|
| 962 |
+
}, align='c', bordered = TRUE)
|
| 963 |
+
|
| 964 |
+
|
| 965 |
+
## ------------------------------------------------------------------------
|
| 966 |
+
## -- Conclusiones de la PH_Sigma=Sigma_0-Usando Función de Usuario:
|
| 967 |
+
## sigma_sigma0_ngrande(...) --------
|
| 968 |
+
|
| 969 |
+
output$conclus_sigma0_ng <- renderText({
|
| 970 |
+
dt <- rt()
|
| 971 |
+
# mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 972 |
+
|
| 973 |
+
sigma00 <- as.numeric(unlist(strsplit(input$sigma0,",")))
|
| 974 |
+
|
| 975 |
+
sigma_0 <- matrix(c(sigma00), nrow=ncol(rt()),
|
| 976 |
+
ncol=ncol(rt()),byrow=TRUE)
|
| 977 |
+
#dt <- rt()
|
| 978 |
+
res <- sigma_sigma0_ngrande(dt,sigma_0,input$alfa_sigma)
|
| 979 |
+
res
|
| 980 |
+
|
| 981 |
+
ifelse(as.numeric(res[4]) < input$alfa_sigma ,
|
| 982 |
+
paste(strong('Como p = '), res[4] , ' < ' ,
|
| 983 |
+
input$alfa_sigma , withMathJax(' = \\( \\alpha \\); ') , strong('entonces,
|
| 984 |
+
se rechaza H0') , sep="") ,
|
| 985 |
+
paste('Como p = ' , res[4] ,
|
| 986 |
+
' > ' , input$alfa_sigma , withMathJax(' = \\( \\alpha \\) ; '),
|
| 987 |
+
strong('entonces, No se rechaza H0')
|
| 988 |
+
))
|
| 989 |
+
})
|
| 990 |
+
|
| 991 |
+
|
| 992 |
+
######## Usando-R
|
| 993 |
+
|
| 994 |
+
## -----------------------------------------------------
|
| 995 |
+
## ---------- Selección de la PH: Sigma=sigma_0-Usando-R ---------
|
| 996 |
+
|
| 997 |
+
prueba_sigma0_r <- reactive({
|
| 998 |
+
dt <- rt()
|
| 999 |
+
|
| 1000 |
+
S <- matrix(var(dt),ncol=ncol(rt()) )
|
| 1001 |
+
|
| 1002 |
+
n <- nrow(dt)
|
| 1003 |
+
|
| 1004 |
+
sigma00 <- as.numeric(unlist(strsplit(input$sigma0,",")))
|
| 1005 |
+
|
| 1006 |
+
sigma_0 <- matrix(c(sigma00), nrow=ncol(rt()),
|
| 1007 |
+
ncol=ncol(rt()),byrow=TRUE)
|
| 1008 |
+
|
| 1009 |
+
if(input$Prueba_sigma == 1){
|
| 1010 |
+
|
| 1011 |
+
prueba <- one_covar_matrix_test(sigma_0, S, n, method = "lrt")
|
| 1012 |
+
|
| 1013 |
+
}
|
| 1014 |
+
else
|
| 1015 |
+
if(input$Prueba_sigma ==2){
|
| 1016 |
+
|
| 1017 |
+
prueba <- one_covar_matrix_test(sigma_0, S, n, method='modlrt1')
|
| 1018 |
+
|
| 1019 |
+
}
|
| 1020 |
+
else
|
| 1021 |
+
if(input$Prueba_sigma ==3){
|
| 1022 |
+
|
| 1023 |
+
prueba <- one_covar_matrix_test(sigma_0, S, n, method='modlrt2')
|
| 1024 |
+
|
| 1025 |
+
}
|
| 1026 |
+
|
| 1027 |
+
|
| 1028 |
+
prueba
|
| 1029 |
+
|
| 1030 |
+
})
|
| 1031 |
+
|
| 1032 |
+
output$Res_sigma0r <- renderPrint({
|
| 1033 |
+
prueba_sigma0_r()
|
| 1034 |
+
})
|
| 1035 |
+
|
| 1036 |
+
|
| 1037 |
+
|
| 1038 |
+
|
| 1039 |
+
|
| 1040 |
+
|
| 1041 |
+
|
| 1042 |
+
|
| 1043 |
+
#### INICIO SALIDAS RESULTADOS DE: PH : mu_1=_mu_2
|
| 1044 |
+
|
| 1045 |
+
#### FIN CREACIÓN DE LAS DEFINICIONES DE LAS SALIDAS DE DATOS ####
|
| 1046 |
+
|
| 1047 |
+
#### INICIO DE LAS SALIDAS DE RESULTADOS ####
|
| 1048 |
+
|
| 1049 |
+
### TDODO SOBRE PRUEBAS DE HIPÓTESIS: H : mu_1=_mu_2
|
| 1050 |
+
|
| 1051 |
+
## ------------------------------------------------------------
|
| 1052 |
+
## --- PH_MU1=MU2-Usando Función de Usuario: HT2_sigmas_iguales(...) --------
|
| 1053 |
+
|
| 1054 |
+
output$PH_mu1_mu2_FU <- renderTable({
|
| 1055 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0a,",")))
|
| 1056 |
+
dt1 <- rt2a()
|
| 1057 |
+
dt2 <- rt3a()
|
| 1058 |
+
res3 <- HT2_sigmas_iguales(dt1,dt2,mu_0,input$alfaa)
|
| 1059 |
+
res3
|
| 1060 |
+
}, align='c', bordered = TRUE)
|
| 1061 |
+
|
| 1062 |
+
|
| 1063 |
+
## ------------------------------------------------------------------------
|
| 1064 |
+
## -- Conclusiones de la PH_MU1=MU2-Usando Función de Usuario: HT2_sigmas_iguales(...) --
|
| 1065 |
+
|
| 1066 |
+
output$conclus2a <- renderText({
|
| 1067 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0a,",")))
|
| 1068 |
+
dt1 <- rt2a()
|
| 1069 |
+
dt2 <- rt3a()
|
| 1070 |
+
res5 <- HT2_sigmas_iguales(dt1,dt2,mu_0,input$alfaa)
|
| 1071 |
+
ifelse(as.numeric(res5[7]) < input$alfaa ,
|
| 1072 |
+
paste(strong('Como p = '), res5[7] , ' < ' ,
|
| 1073 |
+
input$alfaa , withMathJax(' = \\( \\alpha \\); ') , strong('entonces,
|
| 1074 |
+
se rechaza H0') , sep="") ,
|
| 1075 |
+
paste('Como p = ' , res5[7] ,
|
| 1076 |
+
' > ' , input$alfaa , withMathJax(' = \\( \\alpha \\) ; '),
|
| 1077 |
+
strong('entonces, No se rechaza H0')
|
| 1078 |
+
))
|
| 1079 |
+
})
|
| 1080 |
+
|
| 1081 |
+
|
| 1082 |
+
## ------------------------------------------------------------
|
| 1083 |
+
## --- PH_MU1=MU2-Usando Función de Usuario: HT2_sigmas_diferentes(...) --------
|
| 1084 |
+
|
| 1085 |
+
output$PH_mu1_mu2_FU_sigmas_dif <- renderTable({
|
| 1086 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0a,",")))
|
| 1087 |
+
dt1 <- rt2a()
|
| 1088 |
+
dt2 <- rt3a()
|
| 1089 |
+
res3 <- HT2_sigmas_diferentes(dt1,dt2,mu_0,input$alfaa)
|
| 1090 |
+
res3
|
| 1091 |
+
}, align='c', bordered = TRUE)
|
| 1092 |
+
|
| 1093 |
+
|
| 1094 |
+
## ------------------------------------------------------------------------
|
| 1095 |
+
## -- Conclusiones de la PH_MU_0-Usando Función de Usuario: HT2_sigmas_iguales(...) --
|
| 1096 |
+
|
| 1097 |
+
output$conclus4a <- renderText({
|
| 1098 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0a,",")))
|
| 1099 |
+
dt1 <- rt2a()
|
| 1100 |
+
dt2 <- rt3a()
|
| 1101 |
+
res5 <- HT2_sigmas_diferentes(dt1,dt2,mu_0,input$alfaa)
|
| 1102 |
+
ifelse(as.numeric(res5[8]) < input$alfaa ,
|
| 1103 |
+
paste(strong('Como p = '), res5[8] , ' < ' ,
|
| 1104 |
+
input$alfaa , withMathJax(' = \\( \\alpha \\); ') , strong('entonces,
|
| 1105 |
+
se rechaza H0') , sep="") ,
|
| 1106 |
+
paste('Como p = ' , res5[8] ,
|
| 1107 |
+
' > ' , input$alfaa , withMathJax(' = \\( \\alpha \\) ; '),
|
| 1108 |
+
strong('entonces, No se rechaza H0')
|
| 1109 |
+
))
|
| 1110 |
+
})
|
| 1111 |
+
|
| 1112 |
+
|
| 1113 |
+
|
| 1114 |
+
|
| 1115 |
+
## -----------------------------------------------------
|
| 1116 |
+
## ---------- Selección de la PH_MU1=MU2-Usando-R ---------
|
| 1117 |
+
|
| 1118 |
+
prueba_mu0r2 <- reactive({
|
| 1119 |
+
|
| 1120 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0a,",")))
|
| 1121 |
+
|
| 1122 |
+
dt1 <- rt2a()
|
| 1123 |
+
dt2 <- rt3a()
|
| 1124 |
+
|
| 1125 |
+
if(input$PruebaAnaliticaa == 1){
|
| 1126 |
+
|
| 1127 |
+
prueba <- T2.test(dt1, dt2, mu = mu_0 , conf.level = 1-input$alfaa)
|
| 1128 |
+
|
| 1129 |
+
}
|
| 1130 |
+
else
|
| 1131 |
+
if(input$PruebaAnaliticaa ==2){
|
| 1132 |
+
|
| 1133 |
+
prueba <- HotellingsT2(dt1,dt2,mu=mu_0,test="f")
|
| 1134 |
+
|
| 1135 |
+
}
|
| 1136 |
+
|
| 1137 |
+
prueba
|
| 1138 |
+
|
| 1139 |
+
})
|
| 1140 |
+
|
| 1141 |
+
output$Res_mu1_mu2_R <- renderPrint({
|
| 1142 |
+
prueba_mu0r2()
|
| 1143 |
+
})
|
| 1144 |
+
|
| 1145 |
+
|
| 1146 |
+
## ------------------------------------------------------------
|
| 1147 |
+
## --- PH_MU1=MU2-Usando Función de Usuario: HT2_sigmas_iguales_ngrande(...) --------
|
| 1148 |
+
|
| 1149 |
+
output$PH_mu1_mu2_FU_NG <- renderTable({
|
| 1150 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0a,",")))
|
| 1151 |
+
dt1 <- rt2a()
|
| 1152 |
+
dt2 <- rt3a()
|
| 1153 |
+
res3 <- HT2_sigmas_iguales_ngrande(dt1,dt2,mu_0,input$alfaa)
|
| 1154 |
+
res3
|
| 1155 |
+
}, align='c', bordered = TRUE)
|
| 1156 |
+
|
| 1157 |
+
|
| 1158 |
+
## ------------------------------------------------------------------------
|
| 1159 |
+
## -- Conclusiones de la PH_MU_0-Usando Función de Usuario: HT2_sigmas_iguales_ngrande(...) --
|
| 1160 |
+
|
| 1161 |
+
output$conclus3a <- renderText({
|
| 1162 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0a,",")))
|
| 1163 |
+
dt1 <- rt2a()
|
| 1164 |
+
dt2 <- rt3a()
|
| 1165 |
+
res5 <- HT2_sigmas_iguales_ngrande(dt1,dt2,mu_0,input$alfaa)
|
| 1166 |
+
ifelse(as.numeric(res5[4]) < input$alfaa ,
|
| 1167 |
+
paste(strong('Como p = '), res5[4] , ' < ' ,
|
| 1168 |
+
input$alfaa , withMathJax(' = \\( \\alpha \\); ') , strong('entonces,
|
| 1169 |
+
se rechaza H0') , sep="") ,
|
| 1170 |
+
paste('Como p = ' , res5[4] ,
|
| 1171 |
+
' > ' , input$alfaa , withMathJax(' = \\( \\alpha \\) ; '),
|
| 1172 |
+
strong('entonces, No se rechaza H0')
|
| 1173 |
+
))
|
| 1174 |
+
})
|
| 1175 |
+
|
| 1176 |
+
|
| 1177 |
+
|
| 1178 |
+
## -----------------------------------------------------
|
| 1179 |
+
## ---------- Selección de la PH_MU1_MU2-Usando-R-NG ---------
|
| 1180 |
+
|
| 1181 |
+
prueba_mu0r_ng2 <- reactive({
|
| 1182 |
+
|
| 1183 |
+
mu_0 <- as.numeric(unlist(strsplit(input$mu0a,",")))
|
| 1184 |
+
|
| 1185 |
+
dt1 <- rt2a()
|
| 1186 |
+
dt2 <- rt3a()
|
| 1187 |
+
|
| 1188 |
+
if(input$PruebaAnalitica_nga == 1){
|
| 1189 |
+
|
| 1190 |
+
prueba <- HotellingsT2(dt1, dt2, mu = mu_0
|
| 1191 |
+
,test="chi")
|
| 1192 |
+
|
| 1193 |
+
}
|
| 1194 |
+
else
|
| 1195 |
+
if(input$PruebaAnaliticaa ==2){
|
| 1196 |
+
|
| 1197 |
+
prueba <- HotellingsT2(dt1,dt2,mu=mu_0,test="chi")
|
| 1198 |
+
|
| 1199 |
+
}
|
| 1200 |
+
|
| 1201 |
+
prueba
|
| 1202 |
+
|
| 1203 |
+
})
|
| 1204 |
+
|
| 1205 |
+
output$Res_mu1_mu2_R_NG <- renderPrint({
|
| 1206 |
+
prueba_mu0r_ng2()
|
| 1207 |
+
})
|
| 1208 |
+
|
| 1209 |
+
|
| 1210 |
+
## ------------------------------------------------------------
|
| 1211 |
+
## --- PH_Mu1=Mu2-PAREADA, Usando Función de Usuario: HT2_pareadas(...) --------
|
| 1212 |
+
|
| 1213 |
+
output$PH_mu1_mu2_FU_MPareadas <- renderTable({
|
| 1214 |
+
dt1 <- rt2a()
|
| 1215 |
+
dt2 <- rt3a()
|
| 1216 |
+
res <- HT2_pareadas(dt1,dt2,input$alfa1a)
|
| 1217 |
+
res
|
| 1218 |
+
}, align='c', bordered = TRUE)
|
| 1219 |
+
|
| 1220 |
+
|
| 1221 |
+
## ------------------------------------------------------------------------
|
| 1222 |
+
## -- Conclusiones de la PH_MU_0-Usando Función de Usuario: HT2_pareadas(...) --
|
| 1223 |
+
|
| 1224 |
+
output$conclus6a <- renderText({
|
| 1225 |
+
dt1 <- rt2a()
|
| 1226 |
+
dt2 <- rt3a()
|
| 1227 |
+
res5 <- HT2_pareadas(dt1,dt2,input$alfa1a)
|
| 1228 |
+
|
| 1229 |
+
ifelse(as.numeric(res5[7]) < input$alfa1a ,
|
| 1230 |
+
paste(strong('Como p = '), res5[7] , ' < ' ,
|
| 1231 |
+
input$alfa1a , withMathJax(' = \\( \\alpha \\); ') , strong('entonces,
|
| 1232 |
+
se rechaza H0') , sep="") ,
|
| 1233 |
+
paste('Como p = ' , res5[7] ,
|
| 1234 |
+
' > ' , input$alfa1a , withMathJax(' = \\( \\alpha \\) ; '),
|
| 1235 |
+
strong('entonces, No se rechaza H0')
|
| 1236 |
+
))
|
| 1237 |
+
})
|
| 1238 |
+
|
| 1239 |
+
## ------------------------------------------------------------
|
| 1240 |
+
## --- PH_Mu1=Mu2-Muestra Pareada Usando R (...) --------
|
| 1241 |
+
|
| 1242 |
+
## -----------------------------------------------------
|
| 1243 |
+
## ---------- Selección de la PH para: sigma1=sigma2-Usando-R, M-Pareada ---------
|
| 1244 |
+
|
| 1245 |
+
prueba_mu0r92 <- reactive({
|
| 1246 |
+
dt1 <- rt2a()
|
| 1247 |
+
dt2 <- rt3a()
|
| 1248 |
+
|
| 1249 |
+
dt <- as.data.frame(rbind(dt1,dt2) )
|
| 1250 |
+
|
| 1251 |
+
Grupos <- as.factor(
|
| 1252 |
+
c( rep(1,nrow(dt1)) , rep(2,nrow(dt2) ) ) )
|
| 1253 |
+
|
| 1254 |
+
# dt <- as.matrix(dt)
|
| 1255 |
+
|
| 1256 |
+
if(input$Prueba_mp == 1){
|
| 1257 |
+
|
| 1258 |
+
prueba <- ergm::approx.hotelling.diff.test(dt1,dt2,
|
| 1259 |
+
assume.indep = FALSE,
|
| 1260 |
+
var.equal = FALSE)
|
| 1261 |
+
|
| 1262 |
+
}
|
| 1263 |
+
else
|
| 1264 |
+
if(input$Prueba_mp == 2){
|
| 1265 |
+
|
| 1266 |
+
prueba <- ergm::approx.hotelling.diff.test(dt1,dt2,
|
| 1267 |
+
assume.indep = FALSE,
|
| 1268 |
+
var.equal = FALSE)
|
| 1269 |
+
|
| 1270 |
+
}
|
| 1271 |
+
|
| 1272 |
+
prueba
|
| 1273 |
+
|
| 1274 |
+
})
|
| 1275 |
+
|
| 1276 |
+
output$Res_mu1_mu2_R_MPareadas <- renderPrint({
|
| 1277 |
+
prueba_mu0r92()
|
| 1278 |
+
})
|
| 1279 |
+
|
| 1280 |
+
|
| 1281 |
+
## ------------------------------------------------------------
|
| 1282 |
+
## --- PH_sigma1=sigma2-Usando Función de Usuario: prueba_M_Box2(...) --------
|
| 1283 |
+
|
| 1284 |
+
output$PH_sigma1_sigma2_FU <- renderTable({
|
| 1285 |
+
# mu_0 <- as.numeric(unlist(strsplit(input$mu0,",")))
|
| 1286 |
+
dt1 <- rt2a()
|
| 1287 |
+
dt2 <- rt3a()
|
| 1288 |
+
res <- prueba_M_Box2(dt1,dt2,input$alfa2a)
|
| 1289 |
+
res
|
| 1290 |
+
}, align='c', bordered = TRUE)
|
| 1291 |
+
|
| 1292 |
+
|
| 1293 |
+
## ------------------------------------------------------------------------
|
| 1294 |
+
## -- Conclusiones de la PH_sigma1=sigma2-Usando Función de Usuario: prueba_M_Box2(...) --
|
| 1295 |
+
|
| 1296 |
+
output$conclus8a <- renderText({
|
| 1297 |
+
dt1 <- rt2a()
|
| 1298 |
+
dt2 <- rt3a()
|
| 1299 |
+
res5 <- prueba_M_Box2(dt1,dt2,input$alfa2a)
|
| 1300 |
+
ifelse(as.numeric(res5[6]) < input$alfa2a ,
|
| 1301 |
+
paste(strong('Como p = '), res5[6] , ' < ' ,
|
| 1302 |
+
input$alfa2a , withMathJax(' = \\( \\alpha \\); ') , strong('entonces,
|
| 1303 |
+
se rechaza H0') , sep="") ,
|
| 1304 |
+
paste('Como p = ' , res5[6] ,
|
| 1305 |
+
' > ' , input$alfa2a , withMathJax(' = \\( \\alpha \\) ; '),
|
| 1306 |
+
strong('entonces, No se rechaza H0')
|
| 1307 |
+
))
|
| 1308 |
+
})
|
| 1309 |
+
|
| 1310 |
+
|
| 1311 |
+
## -----------------------------------------------------
|
| 1312 |
+
## ---------- Selección de la PH para: sigma1=sigma2-Usando-R ---------
|
| 1313 |
+
|
| 1314 |
+
prueba_mu0r82 <- reactive({
|
| 1315 |
+
dt1 <- rt2a()
|
| 1316 |
+
dt2 <- rt3a()
|
| 1317 |
+
|
| 1318 |
+
dt <- as.data.frame(rbind(dt1,dt2) )
|
| 1319 |
+
|
| 1320 |
+
Grupos <- as.factor(
|
| 1321 |
+
c( rep(1,nrow(dt1)) , rep(2,nrow(dt2) ) ) )
|
| 1322 |
+
|
| 1323 |
+
# dt <- as.matrix(dt)
|
| 1324 |
+
|
| 1325 |
+
if(input$Prueba_box == 1){
|
| 1326 |
+
|
| 1327 |
+
prueba <- biotools::boxM(dt,Grupos)
|
| 1328 |
+
|
| 1329 |
+
}
|
| 1330 |
+
else
|
| 1331 |
+
if(input$Prueba_box == 2){
|
| 1332 |
+
|
| 1333 |
+
prueba <- biotools::boxM(dt,Grupos)
|
| 1334 |
+
|
| 1335 |
+
}
|
| 1336 |
+
|
| 1337 |
+
prueba
|
| 1338 |
+
|
| 1339 |
+
})
|
| 1340 |
+
|
| 1341 |
+
output$Res_sigma1_sigma2_R <- renderPrint({
|
| 1342 |
+
prueba_mu0r82()
|
| 1343 |
+
})
|
| 1344 |
+
|
| 1345 |
+
|
| 1346 |
+
|
| 1347 |
+
|
| 1348 |
+
|
| 1349 |
+
}
|
| 1350 |
+
|
| 1351 |
+
|
| 1352 |
+
|
ui.R
ADDED
|
@@ -0,0 +1,1155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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ymous"),
|
| 11 |
+
HTML('<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>'),
|
| 12 |
+
HTML('<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"></script>'),
|
| 13 |
+
HTML('
|
| 14 |
+
<script>
|
| 15 |
+
document.addEventListener("DOMContentLoaded", function(){
|
| 16 |
+
renderMathInElement(document.body, {
|
| 17 |
+
delimiters: [{left: "$", right: "$", display: false}]
|
| 18 |
+
});
|
| 19 |
+
})
|
| 20 |
+
</script>')
|
| 21 |
+
),
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
#theme = shinytheme("simplex"),
|
| 26 |
+
theme = shinytheme("cerulean"),
|
| 27 |
+
# theme = shinytheme("united"),
|
| 28 |
+
# theme = shinytheme("journal"),
|
| 29 |
+
|
| 30 |
+
# Application title
|
| 31 |
+
withMathJax(),
|
| 32 |
+
tags$style(type="text/css",
|
| 33 |
+
"body {padding-top: 5px;
|
| 34 |
+
color: purple; background-color: white}"),
|
| 35 |
+
|
| 36 |
+
titlePanel(h2("Pruebas de Hipótesis Multivariadas",
|
| 37 |
+
style={'background-color:aquamarine;'})),
|
| 38 |
+
|
| 39 |
+
#########################################################
|
| 40 |
+
#########################################################
|
| 41 |
+
#### INICIO TABSETPANEL-GLOBAL DE UNA Y DOS POBLACIONES
|
| 42 |
+
#########################################################
|
| 43 |
+
#########################################################
|
| 44 |
+
|
| 45 |
+
tabsetPanel(
|
| 46 |
+
|
| 47 |
+
#########################################################
|
| 48 |
+
#########################################################
|
| 49 |
+
#### INICIO TABPANEL-DE UNA POBLACIÓN
|
| 50 |
+
#########################################################
|
| 51 |
+
#########################################################
|
| 52 |
+
|
| 53 |
+
tabPanel(h4("PH para una población",style={'color:#e905f5;'}),
|
| 54 |
+
|
| 55 |
+
# position = "fixed-top",
|
| 56 |
+
|
| 57 |
+
# Sidebar
|
| 58 |
+
tabsetPanel(
|
| 59 |
+
id = "tabs1",
|
| 60 |
+
type = "pills",
|
| 61 |
+
|
| 62 |
+
################################################
|
| 63 |
+
### Inicio del tabPanel Datos
|
| 64 |
+
################################################
|
| 65 |
+
|
| 66 |
+
tabPanel("Datos",
|
| 67 |
+
# Barra de Opciones de Datos
|
| 68 |
+
div(
|
| 69 |
+
sidebarPanel(
|
| 70 |
+
conditionalPanel(condition = "input.tabs1 == 'Datos'",
|
| 71 |
+
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:"),
|
| 72 |
+
#radioButtons("dataInput","Elegir los Datos a Usar:",
|
| 73 |
+
list("Datos simulados" = 1,"Cargar datos" = 2), selected = 1),
|
| 74 |
+
|
| 75 |
+
conditionalPanel(condition = "input.dataInput=='2'",
|
| 76 |
+
fileInput("upload","Descargue su arhivo delimitado (10MB_max):",multiple = FALSE,
|
| 77 |
+
accept = c(
|
| 78 |
+
"text/csv",
|
| 79 |
+
"text/comma-separated-values,text/plain",
|
| 80 |
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
| 81 |
+
".csv",
|
| 82 |
+
".xlsx"),
|
| 83 |
+
buttonLabel = "Cargar"),
|
| 84 |
+
radioButtons("fileSepDF","Separador de datos:",list("Coma" = 1,"Tabulador" = 2,"Semicoma" = 3,"Espacio" = 4),selected = 1),
|
| 85 |
+
checkboxInput("myHead","Variables en la fila-1",value = TRUE),
|
| 86 |
+
|
| 87 |
+
conditionalPanel("input.fileSepDF!='1'",
|
| 88 |
+
checkboxInput("decimal","Usa la coma como decimal",value = FALSE))
|
| 89 |
+
),
|
| 90 |
+
selectizeInput("variables","Variables a usar",choices = NULL,selected = NULL,multiple = TRUE),
|
| 91 |
+
generateInfo())
|
| 92 |
+
)# fin de barra lateral (de sidebar Panel)
|
| 93 |
+
), # fin Barra opciones de datos ie. el Div
|
| 94 |
+
#### Panel principal del panel-1
|
| 95 |
+
mainPanel(
|
| 96 |
+
fluidRow(column(width=8,
|
| 97 |
+
tags$h3(
|
| 98 |
+
# tagList(
|
| 99 |
+
tags$li(
|
| 100 |
+
actionLink("sobre_datos_muestra"," ",icon("info")),
|
| 101 |
+
class="dropdown",
|
| 102 |
+
tags$code("Conjunto de datos completo")
|
| 103 |
+
)
|
| 104 |
+
#)
|
| 105 |
+
)
|
| 106 |
+
)),
|
| 107 |
+
hr(),
|
| 108 |
+
dataTableOutput('tabla1'),
|
| 109 |
+
hr(),
|
| 110 |
+
h3(p(code("Conjunto de datos filtrado"))),
|
| 111 |
+
hr(),
|
| 112 |
+
dataTableOutput('tabla2')
|
| 113 |
+
) ## fin del mainPanel
|
| 114 |
+
), ## fin del tabPanel Datos
|
| 115 |
+
|
| 116 |
+
################################################
|
| 117 |
+
### Inicio del tabPanel Pruebas de Normalidad
|
| 118 |
+
################################################
|
| 119 |
+
|
| 120 |
+
tabPanel("Pruebas de normalidad",
|
| 121 |
+
sidebarLayout(
|
| 122 |
+
sidebarPanel(
|
| 123 |
+
selectInput("PH_NU_Seleccionada",p("Normalidad univariada:",style=" text-align:center"),
|
| 124 |
+
choices=c("SW:Shapiro-Wilk"=1,
|
| 125 |
+
"CMV:Cramer-von Mises"=2,
|
| 126 |
+
"Lilliefors"=3,
|
| 127 |
+
"SF:Shapiro-Francia"=4,
|
| 128 |
+
"AD:Anderson-Darling"=5),
|
| 129 |
+
selected = 1),
|
| 130 |
+
|
| 131 |
+
selectInput("Grafico_Seleccionado",p("Grafico univariado",style=" text-align:center"),
|
| 132 |
+
choices=c("QQ-Plot"=1,
|
| 133 |
+
"Histograma"=2,
|
| 134 |
+
"Box-Plot"=3,
|
| 135 |
+
"Scatter-Plot"=4),
|
| 136 |
+
selected = 2),
|
| 137 |
+
|
| 138 |
+
selectInput("PH_NM_Seleccionada",p("Normalidad multivariada:",style=" text-align:center"),
|
| 139 |
+
choices=c("Mardia"=1,
|
| 140 |
+
"hz:Henze-Zirkler"=2,
|
| 141 |
+
"Royston"=3,
|
| 142 |
+
"dh:Doornik-Hansen"=4),
|
| 143 |
+
# "Shapiro-Wilk-NM"=5),
|
| 144 |
+
selected = 3),
|
| 145 |
+
|
| 146 |
+
selectInput("Grafico_Multi_Seleccionado",p("Gráfico multivariado:",style=" text-align:center"),
|
| 147 |
+
choices=c("QQ-Plot_Chi_Cuadrado"=1,
|
| 148 |
+
"Perspectivas"=2,
|
| 149 |
+
"Contonros"=3),
|
| 150 |
+
selected = 1),
|
| 151 |
+
|
| 152 |
+
selectInput("Graficos_Varios",p("Otros gráficos:",style=" text-align:center"),
|
| 153 |
+
choices=c("Dispersión"=1,
|
| 154 |
+
"Disp_1Elipse_np"=2,
|
| 155 |
+
# "Disp_1Elipse_ng"=3,
|
| 156 |
+
"Disp_2Elipses_np"=4,
|
| 157 |
+
#"Disp_2Elipses_ng"=5,
|
| 158 |
+
"Superficie_NB"=6,
|
| 159 |
+
"contornos_NB"=7,
|
| 160 |
+
"elipse_conf"=8,
|
| 161 |
+
"elipse_conf_IC_T2"=9,
|
| 162 |
+
"elipse_conf_IC_BONF"=10,
|
| 163 |
+
"elipse_conf_IC_tstud"=11),
|
| 164 |
+
selected = 2),
|
| 165 |
+
generateInfo(),
|
| 166 |
+
), #### fin de sidebarPanel-contenidos PNU
|
| 167 |
+
|
| 168 |
+
#############################################
|
| 169 |
+
## Inicio Panel Principal de Derecha PH-NORM
|
| 170 |
+
#############################################
|
| 171 |
+
|
| 172 |
+
mainPanel(
|
| 173 |
+
tabsetPanel(type = "pills",
|
| 174 |
+
|
| 175 |
+
##############################
|
| 176 |
+
## Inicio Panel de PH NU
|
| 177 |
+
##############################
|
| 178 |
+
|
| 179 |
+
tabPanel(withMathJax("\\(H_0 : Datos\\sim N_1\\)"),
|
| 180 |
+
br(),
|
| 181 |
+
fluidRow(column(width=8,
|
| 182 |
+
h4(p("Resumen descriptivo de los datos",
|
| 183 |
+
style="color:black;text-align:center")) ,
|
| 184 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 185 |
+
br(),
|
| 186 |
+
tableOutput('PH_RD'),
|
| 187 |
+
br(),
|
| 188 |
+
fluidRow(column(width=8,
|
| 189 |
+
h4(p("Coeficientes de asimetría y kurtosis univariados",
|
| 190 |
+
style="color:black;text-align:center")),
|
| 191 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 192 |
+
br(),
|
| 193 |
+
tableOutput('Res_Descriptivos_Varios'),
|
| 194 |
+
|
| 195 |
+
#### PH de N_1
|
| 196 |
+
hr(),
|
| 197 |
+
fluidRow(column(width=8,
|
| 198 |
+
h4(p("PH Sobre normalidad univariada",
|
| 199 |
+
style="color:black;text-align:center")),
|
| 200 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 201 |
+
br(),
|
| 202 |
+
withMathJax(),
|
| 203 |
+
fluidRow(column(width=8,
|
| 204 |
+
p('$$\\begin{cases}
|
| 205 |
+
H_0: \\ \\ \\text{Las variables individuales son NU} \\\\
|
| 206 |
+
H_a: \\ \\ \\text{Las variables individuales no son NU}
|
| 207 |
+
\\end{cases}
|
| 208 |
+
$$',
|
| 209 |
+
style="color:black;border:1px solid black;
|
| 210 |
+
background-color:white"))),
|
| 211 |
+
br(),
|
| 212 |
+
h4(textOutput("resultados_PH_NU"),
|
| 213 |
+
style={'color:red;'}),
|
| 214 |
+
|
| 215 |
+
br(),
|
| 216 |
+
tableOutput('Res_NU'),
|
| 217 |
+
br(),
|
| 218 |
+
fluidRow(column(width=8,
|
| 219 |
+
p(tags$em("Puedes consultar las ayudas de las funciones del R
|
| 220 |
+
usadas para estas pruebas en:",
|
| 221 |
+
tags$a("MVN::mvn()",
|
| 222 |
+
href="https://rdrr.io/cran/MVN/man/mvn.html"
|
| 223 |
+
)
|
| 224 |
+
),".")
|
| 225 |
+
)),
|
| 226 |
+
br(),
|
| 227 |
+
withMathJax(),
|
| 228 |
+
fluidRow(column(width=8,
|
| 229 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 230 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 231 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 232 |
+
caso contrario se rechaza."),
|
| 233 |
+
style="background-color:#a9f1a86b"
|
| 234 |
+
))),
|
| 235 |
+
br(),
|
| 236 |
+
|
| 237 |
+
fluidRow(column(width=8,
|
| 238 |
+
h4(p("Graficos univariados de los datos",
|
| 239 |
+
style="color:black;text-align:center")),
|
| 240 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 241 |
+
br(),
|
| 242 |
+
plotOutput('Graf_NU'),
|
| 243 |
+
br()
|
| 244 |
+
), # Fin del panel de PH NU
|
| 245 |
+
|
| 246 |
+
##############################
|
| 247 |
+
## Inicio Panel de PH NM
|
| 248 |
+
##############################
|
| 249 |
+
tabPanel(withMathJax("\\(H_0 : Datos\\sim N_p\\)"),
|
| 250 |
+
br(),
|
| 251 |
+
fluidRow(column( width=8,
|
| 252 |
+
h4(p("PH Sobre normalidad multivarida (NM)",
|
| 253 |
+
style="color:black;text-align:center")),
|
| 254 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 255 |
+
br(),
|
| 256 |
+
withMathJax(),
|
| 257 |
+
fluidRow(column(width=8,
|
| 258 |
+
p('$$\\begin{cases}
|
| 259 |
+
H_0: \\ \\ \\text{Los datos son NM} \\\\
|
| 260 |
+
H_a: \\ \\ \\text{Los datos no son NM}
|
| 261 |
+
\\end{cases}$$',
|
| 262 |
+
style="color:black;border:1px solid black;
|
| 263 |
+
background-color:white"))),
|
| 264 |
+
br(),
|
| 265 |
+
h4(textOutput("resultados_PH_NM"),
|
| 266 |
+
style={'color:red;'}),
|
| 267 |
+
br(),
|
| 268 |
+
tableOutput('Res_NM'),
|
| 269 |
+
# br(),
|
| 270 |
+
# tableOutput('Res_NM_SW'),
|
| 271 |
+
br(),
|
| 272 |
+
withMathJax(),
|
| 273 |
+
fluidRow(column(width=8,
|
| 274 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 275 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 276 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 277 |
+
caso contrario se rechaza."),
|
| 278 |
+
style="background-color:#a9f1a86b"
|
| 279 |
+
))),
|
| 280 |
+
br(),
|
| 281 |
+
fluidRow(column(width=8,
|
| 282 |
+
h4(p("Graficos multivariados de los datos",
|
| 283 |
+
style="color:black;text-align:center")),
|
| 284 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 285 |
+
br(),
|
| 286 |
+
plotOutput('Graf_NM'),
|
| 287 |
+
|
| 288 |
+
## Otros gráficos
|
| 289 |
+
hr(),
|
| 290 |
+
fluidRow(column(width=8,
|
| 291 |
+
h4(p("Otros gráficos de interés",
|
| 292 |
+
style="color:black;text-align:center")) ,
|
| 293 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 294 |
+
br(),
|
| 295 |
+
plotOutput('elipses'),
|
| 296 |
+
br()
|
| 297 |
+
), # Fin del panel de PH NM
|
| 298 |
+
|
| 299 |
+
###################################################
|
| 300 |
+
#### Inicio del panel de Teoría
|
| 301 |
+
###################################################
|
| 302 |
+
tabPanel("Teoría", "123"
|
| 303 |
+
|
| 304 |
+
), #### Fin del panel de Teoría
|
| 305 |
+
|
| 306 |
+
) #end tabsetPanel-pills ie. del panel derecho de salidas
|
| 307 |
+
) # end mainPanel ie. del panel pricipal
|
| 308 |
+
) ### fin del sidebarLayout
|
| 309 |
+
), ### fin del tabPanel: Pruebas de normalidad
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
################################################
|
| 313 |
+
### Inicio del tabPanel Pruebas: Mu=Mu0
|
| 314 |
+
################################################
|
| 315 |
+
|
| 316 |
+
tabPanel("\\(H_0 : \\underline{\\mu}=\\underline{\\mu}_0 \\)",
|
| 317 |
+
sidebarLayout(
|
| 318 |
+
sidebarPanel(textInput('mu0',
|
| 319 |
+
HTML('Por favor ingrese el vector \\( \\underline{\\mu}_0 \\) para la
|
| 320 |
+
PH \\( H_0 \\) : \\( \\underline{\\mu} =
|
| 321 |
+
\\underline{\\mu}_0 \\). \n Por ejemplo si el vector \\(\\mu_0\\)\ es (0,0,0), usted debe ingresar 0,0,0')), # Arreglar el mu
|
| 322 |
+
hr(),
|
| 323 |
+
numericInput("alfa", p("Ingrese el valor de \\( \\alpha \\)"),value = 0.05),
|
| 324 |
+
selectInput("PruebaAnalitica", p("Elija la prueba a usar para n pequeña:",
|
| 325 |
+
style="text-align:center"),
|
| 326 |
+
choices=c("T2.test"=1,"HotellingsT2"=2),
|
| 327 |
+
selected = 1),
|
| 328 |
+
hr(),
|
| 329 |
+
selectInput("PruebaAnalitica_ng",p("Prueba a usar para n grande:"
|
| 330 |
+
,style="text-align:center"),
|
| 331 |
+
choices=c("HotellingsT2"=1),selected = 1),
|
| 332 |
+
generateInfo()
|
| 333 |
+
), #### Find del sidebarPanel
|
| 334 |
+
|
| 335 |
+
################################################
|
| 336 |
+
## Inicio Panel Principal de Derecha PH-Mu=Mu0
|
| 337 |
+
################################################
|
| 338 |
+
|
| 339 |
+
mainPanel(
|
| 340 |
+
tabsetPanel(type = "pills",
|
| 341 |
+
|
| 342 |
+
##################################
|
| 343 |
+
## Inicio Panel de PH Mu=Mu0, FU
|
| 344 |
+
##################################
|
| 345 |
+
|
| 346 |
+
tabPanel("Función-Usuario",
|
| 347 |
+
br(),
|
| 348 |
+
fluidRow(column(width=8,
|
| 349 |
+
h4(p("PH sobre el vector de medias usando una FU para n pequeña",
|
| 350 |
+
style="color:black;text-align:center")),
|
| 351 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 352 |
+
br(),
|
| 353 |
+
withMathJax(),
|
| 354 |
+
fluidRow(column(width=6,
|
| 355 |
+
p('$$\\begin{cases}
|
| 356 |
+
H_0: \\ \\ \\underline{\\mu}=\\underline{\\mu}_0 \\\\
|
| 357 |
+
H_a: \\ \\ \\underline{\\mu}\\neq\\underline{\\mu}_0
|
| 358 |
+
\\end{cases}$$',
|
| 359 |
+
style="color:black;border:1px solid black;
|
| 360 |
+
background-color:white"))),
|
| 361 |
+
br(),
|
| 362 |
+
tableOutput('PH_mu0'),
|
| 363 |
+
br(),
|
| 364 |
+
withMathJax(),
|
| 365 |
+
fluidRow(column(width=8,
|
| 366 |
+
p(tags$em("Puedes consultar algo sobre la teoría
|
| 367 |
+
utilizada para este tipo de pruebas en: "),
|
| 368 |
+
tags$a("Dar click acá:", href="parte1mu0.pdf")
|
| 369 |
+
)
|
| 370 |
+
)),
|
| 371 |
+
br(),
|
| 372 |
+
withMathJax(),
|
| 373 |
+
fluidRow(column(width=8,
|
| 374 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 375 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 376 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 377 |
+
caso contrario se rechaza."),
|
| 378 |
+
style="background-color:#a9f1a86b"
|
| 379 |
+
))),
|
| 380 |
+
br(),
|
| 381 |
+
tableOutput('conclus2'),
|
| 382 |
+
|
| 383 |
+
hr(), ### FU n-Grande
|
| 384 |
+
fluidRow(column( width=8,
|
| 385 |
+
h4(p("PH sobre el vector de medias usando una FU para n grande",
|
| 386 |
+
style="color:black;text-align:center")),
|
| 387 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 388 |
+
br(),
|
| 389 |
+
tableOutput('PH_mu0_ng'),
|
| 390 |
+
br(),
|
| 391 |
+
tableOutput('conclus2_mu0_ng'),
|
| 392 |
+
br()
|
| 393 |
+
|
| 394 |
+
), # Fin del tabPanel de: Mu=Mu0, FU
|
| 395 |
+
|
| 396 |
+
########################################
|
| 397 |
+
## Inicio Panel de PH Mu=Mu0, USANDO-R
|
| 398 |
+
#######################################
|
| 399 |
+
|
| 400 |
+
tabPanel("Usando-R",
|
| 401 |
+
br(),
|
| 402 |
+
fluidRow(column(width=8,
|
| 403 |
+
h4(p("PH sobre el vector de medias usando R para n pequeña",
|
| 404 |
+
style="color:black;text-align:center")),
|
| 405 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 406 |
+
br(),
|
| 407 |
+
verbatimTextOutput("Res_MU0r"),
|
| 408 |
+
br(),
|
| 409 |
+
fluidRow(column(width=8,
|
| 410 |
+
p(tags$em("Para mayor informacion sobre las funciones usadas consultar los siguientes enlaces:",
|
| 411 |
+
tags$a("rrcov::T2.test()",
|
| 412 |
+
href="https://rdrr.io/cran/rrcov/man/T2.test.html"
|
| 413 |
+
),
|
| 414 |
+
tags$a(", icsnp::HotellingsT2()",
|
| 415 |
+
href="https://rdrr.io/cran/ICSNP/man/HotellingsT.html"
|
| 416 |
+
)
|
| 417 |
+
),".")
|
| 418 |
+
)),
|
| 419 |
+
br(),
|
| 420 |
+
withMathJax(),
|
| 421 |
+
fluidRow(column(width=8,
|
| 422 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 423 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 424 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 425 |
+
caso contrario se rechaza."),
|
| 426 |
+
style="background-color:#a9f1a86b"
|
| 427 |
+
))),
|
| 428 |
+
br(),
|
| 429 |
+
textOutput("Conclus_PH_mu0r"),
|
| 430 |
+
|
| 431 |
+
### Usando-r N-Grande
|
| 432 |
+
hr(),
|
| 433 |
+
fluidRow(column( width=8,
|
| 434 |
+
h4(p("PH sobre el vector de medias usando R para n grande",
|
| 435 |
+
style="color:black;text-align:center")),
|
| 436 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 437 |
+
br(),
|
| 438 |
+
verbatimTextOutput("Res_MU0r_ng"),
|
| 439 |
+
br()
|
| 440 |
+
|
| 441 |
+
), # Fin del tabPanel de: Mu=Mu0, Usando-R
|
| 442 |
+
|
| 443 |
+
###########################################
|
| 444 |
+
## Inicio Panel de Teoría
|
| 445 |
+
##########################################
|
| 446 |
+
|
| 447 |
+
tabPanel("Teoría",
|
| 448 |
+
br(),
|
| 449 |
+
withMathJax(),
|
| 450 |
+
fluidRow(column(width=8,
|
| 451 |
+
tags$a("Ver la documentación teórica acá:",
|
| 452 |
+
href=" ")
|
| 453 |
+
))
|
| 454 |
+
|
| 455 |
+
) #### Fin del tabPanel: Teoría
|
| 456 |
+
|
| 457 |
+
) ### Fin del tabsetPanel (de pills)
|
| 458 |
+
) ### Fin del mainPanel ie. del panel pricipal
|
| 459 |
+
) ### Fin del sidebarLayout
|
| 460 |
+
), ### Fin del tabPanel Mu=Mu0
|
| 461 |
+
|
| 462 |
+
################################################
|
| 463 |
+
### Inicio del tabPanel: Sigma=Sigma0
|
| 464 |
+
################################################
|
| 465 |
+
|
| 466 |
+
tabPanel("\\(H_0 : \\mathbf{\\Sigma}=\\mathbf{\\Sigma}_0 \\)",
|
| 467 |
+
sidebarLayout(
|
| 468 |
+
sidebarPanel(textInput('sigma0',
|
| 469 |
+
HTML('Matriz \\( \\mathbf{\\Sigma}_0 \\) para
|
| 470 |
+
PH: \\( H_0 \\) : \\( \\mathbf{\\Sigma} =
|
| 471 |
+
\\mathbf{\\Sigma}_0 \\) Ejemplo Input: 1,0,0;0,1,0;0,0,1')),
|
| 472 |
+
hr(),
|
| 473 |
+
numericInput("alfa_sigma",
|
| 474 |
+
p("Valor de \\( \\alpha \\)"),value = 0.05),
|
| 475 |
+
selectInput("Prueba_sigma",
|
| 476 |
+
p("Prueba a usar para n pequeña:",
|
| 477 |
+
style="text-align:center"),
|
| 478 |
+
choices=c("LRT test-Mardia (1979)"=1,
|
| 479 |
+
"LRT1 test Rencher-Christensen (2012)"=2,
|
| 480 |
+
"LRT2 test Rencher-Christensen (2012)"=3),
|
| 481 |
+
selected = 1),
|
| 482 |
+
hr(),
|
| 483 |
+
selectInput("Prueba_sigma_ng",
|
| 484 |
+
p("Prueba a usar para n grande:"
|
| 485 |
+
,style="text-align:center"),
|
| 486 |
+
choices=c("HotellingsT2"=1),selected = 1),
|
| 487 |
+
generateInfo()
|
| 488 |
+
), #### Find del sidebarPanel
|
| 489 |
+
|
| 490 |
+
mainPanel(
|
| 491 |
+
tabsetPanel(
|
| 492 |
+
type = "pills",
|
| 493 |
+
|
| 494 |
+
tabPanel("Función de Usuario:",
|
| 495 |
+
br(),
|
| 496 |
+
fluidRow(column(width=8,
|
| 497 |
+
h4(p("PH sobre la matriz de Var-Cov usando una FU para n pequeña",
|
| 498 |
+
style="color:black;text-align:center")),
|
| 499 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 500 |
+
br(),
|
| 501 |
+
withMathJax(),
|
| 502 |
+
fluidRow(column(width=6,
|
| 503 |
+
p('$$\\begin{cases}
|
| 504 |
+
H_0: \\ \\ \\mathbf{\\Sigma}=\\mathbf{\\Sigma}_0 \\\\
|
| 505 |
+
H_a: \\ \\ \\mathbf{\\Sigma}\\neq\\mathbf{\\Sigma}_0
|
| 506 |
+
\\end{cases}$$',
|
| 507 |
+
style="color:black;border:1px solid black;
|
| 508 |
+
background-color:white"))),
|
| 509 |
+
br(),
|
| 510 |
+
withMathJax(),
|
| 511 |
+
fluidRow(column(width=8,
|
| 512 |
+
p(tags$strong(
|
| 513 |
+
helpText("La matriz de Varianzas-Covarianzas
|
| 514 |
+
muestral-$\\mathbf{S}$
|
| 515 |
+
de los datos es:" )
|
| 516 |
+
)
|
| 517 |
+
)
|
| 518 |
+
)),
|
| 519 |
+
br(),
|
| 520 |
+
tableOutput('mat_var_cov'),
|
| 521 |
+
br(),
|
| 522 |
+
withMathJax(),
|
| 523 |
+
fluidRow(column(width=8,
|
| 524 |
+
p(tags$strong(
|
| 525 |
+
helpText("La matriz de Varianzas-Covarianzas-
|
| 526 |
+
$\\Sigma_0$ propuesta es:") )
|
| 527 |
+
)
|
| 528 |
+
)),
|
| 529 |
+
br(),
|
| 530 |
+
tableOutput('mat_var_cov_sigma0'),
|
| 531 |
+
br(),
|
| 532 |
+
tableOutput('PH_Sigma0'),
|
| 533 |
+
br(),
|
| 534 |
+
withMathJax(),
|
| 535 |
+
fluidRow(column(width=8,
|
| 536 |
+
p(tags$em("Puedes consultar algo sobre la teoría
|
| 537 |
+
utilizada para este tipo de pruebas en: "),
|
| 538 |
+
tags$a("Dar click acá:", href="parte2mu0.pdf")
|
| 539 |
+
)
|
| 540 |
+
)),
|
| 541 |
+
br(),
|
| 542 |
+
withMathJax(),
|
| 543 |
+
fluidRow(column(width=8,
|
| 544 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 545 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 546 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 547 |
+
caso contrario se rechaza."),
|
| 548 |
+
style="background-color:#a9f1a86b"
|
| 549 |
+
))),
|
| 550 |
+
br(),
|
| 551 |
+
tableOutput('conclus_sigma0'),
|
| 552 |
+
|
| 553 |
+
### FU n-Grande
|
| 554 |
+
hr(),
|
| 555 |
+
fluidRow(column(width=8,
|
| 556 |
+
h4(p("PH sobre la matriz de Var-Cov usando una FU n grande",
|
| 557 |
+
style="color:black;text-align:center")),
|
| 558 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 559 |
+
br(),
|
| 560 |
+
tableOutput('PH_Sigma0_ng'),
|
| 561 |
+
br(),
|
| 562 |
+
tableOutput('conclus_sigma0_ng'),
|
| 563 |
+
br()
|
| 564 |
+
|
| 565 |
+
),
|
| 566 |
+
|
| 567 |
+
########### usando-r
|
| 568 |
+
|
| 569 |
+
tabPanel("Usando-R",
|
| 570 |
+
br(),
|
| 571 |
+
fluidRow(column(width=8,
|
| 572 |
+
h4(p("PH sobre la matriz de Var-Cov usando R para n pequeña",
|
| 573 |
+
style="color:black;text-align:center")),
|
| 574 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 575 |
+
br(),
|
| 576 |
+
verbatimTextOutput("Res_sigma0r"),
|
| 577 |
+
br(),
|
| 578 |
+
fluidRow(column(width=8,
|
| 579 |
+
p(tags$em("Puedes consultar las ayudas de las funciones del R
|
| 580 |
+
usadas para estas pruebas en:",
|
| 581 |
+
tags$a("stets::one_covar_matrix_test()",
|
| 582 |
+
href="https://fhernanb.github.io/stests/reference/one_covar_matrix_test.html"
|
| 583 |
+
)
|
| 584 |
+
),".")
|
| 585 |
+
)),
|
| 586 |
+
br(),
|
| 587 |
+
withMathJax(),
|
| 588 |
+
fluidRow(column(width=8,
|
| 589 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 590 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 591 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 592 |
+
caso contrario se rechaza."),
|
| 593 |
+
style="background-color:#a9f1a86b"
|
| 594 |
+
))),
|
| 595 |
+
br(),
|
| 596 |
+
textOutput("Conclus_PH_sigma0r"),
|
| 597 |
+
|
| 598 |
+
### Usando-r N-Grande
|
| 599 |
+
hr(),
|
| 600 |
+
fluidRow(column( width=8,
|
| 601 |
+
h4(p("PH sobre el vector de medias usando R para n grande",
|
| 602 |
+
style="color:black;text-align:center")),
|
| 603 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 604 |
+
br(),
|
| 605 |
+
verbatimTextOutput("Res_sigma0r_ng"),
|
| 606 |
+
br()
|
| 607 |
+
|
| 608 |
+
), # Fin del tabPanel de: Sigma=Sigma_0, Usando-R
|
| 609 |
+
|
| 610 |
+
|
| 611 |
+
tabPanel("Teoría",
|
| 612 |
+
br(),
|
| 613 |
+
withMathJax(),
|
| 614 |
+
fluidRow(column(width=8,
|
| 615 |
+
tags$a("Ver la documentación teórica acá:",
|
| 616 |
+
href="https://fhernanb.github.io/stests/reference/one_covar_matrix_test.html")
|
| 617 |
+
))
|
| 618 |
+
|
| 619 |
+
)
|
| 620 |
+
|
| 621 |
+
) #### Fin del tabsetPanel: Sigma=Sigma0
|
| 622 |
+
) ### fin mainPanle
|
| 623 |
+
|
| 624 |
+
) # fin del sidebarLayout
|
| 625 |
+
|
| 626 |
+
) ### tabPanel: SIgma=igma0
|
| 627 |
+
|
| 628 |
+
) ### Fin del tabsetPanel-De una Población
|
| 629 |
+
|
| 630 |
+
|
| 631 |
+
################################################
|
| 632 |
+
################################################
|
| 633 |
+
######### FIN DEL PANEL DE UNA POBLACIÓN ######
|
| 634 |
+
################################################
|
| 635 |
+
################################################
|
| 636 |
+
|
| 637 |
+
), ### Fin del tabPanel-De una Población
|
| 638 |
+
|
| 639 |
+
#####################################
|
| 640 |
+
#####################################
|
| 641 |
+
#### INICIO DOS POBLACIONES #########
|
| 642 |
+
#####################################
|
| 643 |
+
#####################################
|
| 644 |
+
|
| 645 |
+
tabPanel(h4("PH para dos poblaciones",style={'color:#e905f5;'}),
|
| 646 |
+
|
| 647 |
+
tabsetPanel(
|
| 648 |
+
|
| 649 |
+
tabPanel("Datos:",
|
| 650 |
+
div(
|
| 651 |
+
sidebarPanel(
|
| 652 |
+
conditionalPanel(condition = "input.tabs2 == 'Datos:'",
|
| 653 |
+
|
| 654 |
+
radioButtons("dataInputa","Elegir los datos a usar:",
|
| 655 |
+
list("Usar datos de muestra" = 1,"Cargar sus Datos" = 2),selected = 1 ),
|
| 656 |
+
|
| 657 |
+
conditionalPanel(condition = "input.dataInputa=='2'",
|
| 658 |
+
hr(),
|
| 659 |
+
|
| 660 |
+
fileInput("uploada","Descargue su arhivo delimitado (10MB_max):",multiple = FALSE,
|
| 661 |
+
accept = c(
|
| 662 |
+
"text/csv",
|
| 663 |
+
"text/comma-separated-values,text/plain",
|
| 664 |
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
| 665 |
+
".csv",
|
| 666 |
+
".xlsx"),
|
| 667 |
+
buttonLabel = "Cargar"),
|
| 668 |
+
|
| 669 |
+
radioButtons("fileSepDFa","Delimiter:",
|
| 670 |
+
list("Comma" = 1,"Tab" = 2,"Semicolon" = 3,"Space" = 4),selected = 1),
|
| 671 |
+
|
| 672 |
+
checkboxInput("myHeada","Nombres de vars. en la primera fila",value = TRUE),
|
| 673 |
+
|
| 674 |
+
conditionalPanel(condition = "input.fileSepDFa!='1'",
|
| 675 |
+
|
| 676 |
+
checkboxInput("decimal","Usar la coma como decimal",value = FALSE))
|
| 677 |
+
|
| 678 |
+
), # Fin de conditional(...input.dataInputa=='2'), ie. Datos2
|
| 679 |
+
|
| 680 |
+
selectizeInput("variables1a","Variables a utilizar Grupo-1",choices = NULL,selected = NULL,multiple = TRUE),
|
| 681 |
+
|
| 682 |
+
selectizeInput("variables2a","Variables a utilizar Grupo-2",choices = NULL,selected = NULL,multiple = TRUE),
|
| 683 |
+
generateInfo()
|
| 684 |
+
|
| 685 |
+
) # Find de condition = "input.tabs2 == 'Datos:', ie. Datos
|
| 686 |
+
|
| 687 |
+
) # fin de sidebarPanel( width = 4)
|
| 688 |
+
|
| 689 |
+
), # fin Barra opciones de datos ie. el Div
|
| 690 |
+
|
| 691 |
+
########################################################
|
| 692 |
+
## Inicio Panel Principal De Datos Dos Poblaciones
|
| 693 |
+
########################################################
|
| 694 |
+
|
| 695 |
+
mainPanel(
|
| 696 |
+
fluidRow(column(width=8,
|
| 697 |
+
tags$h3(
|
| 698 |
+
# tagList(
|
| 699 |
+
tags$li(
|
| 700 |
+
actionLink("sobre_datos_2Pob"," ",icon("info")),
|
| 701 |
+
class="dropdown",
|
| 702 |
+
tags$code("Conjunto de datos completo")
|
| 703 |
+
)
|
| 704 |
+
#)
|
| 705 |
+
)
|
| 706 |
+
)),
|
| 707 |
+
hr(),
|
| 708 |
+
dataTableOutput('tabla1a'),
|
| 709 |
+
hr(),
|
| 710 |
+
h3(p(code("Muestra de la Población-1"))),
|
| 711 |
+
hr(),
|
| 712 |
+
dataTableOutput('tabla2a'),
|
| 713 |
+
hr(),
|
| 714 |
+
h3(p(code("Muestra de la Población-2"))),
|
| 715 |
+
hr(),
|
| 716 |
+
dataTableOutput('tabla3a')
|
| 717 |
+
) ### Find Panel-Principal de Datos2
|
| 718 |
+
), ### Fin de tabPanel: "Datos:"
|
| 719 |
+
|
| 720 |
+
|
| 721 |
+
#########################################################
|
| 722 |
+
#########################################################
|
| 723 |
+
######### INICIO PANEL DE PH: Mu1=Mu2
|
| 724 |
+
#########################################################
|
| 725 |
+
#########################################################
|
| 726 |
+
|
| 727 |
+
tabPanel("\\( H_0: \\underline{\\mu}_1=\\underline{\\mu}_2 \\)",
|
| 728 |
+
|
| 729 |
+
sidebarLayout(
|
| 730 |
+
sidebarPanel(
|
| 731 |
+
|
| 732 |
+
textInput('mu0a',
|
| 733 |
+
HTML('Entre el vector
|
| 734 |
+
\\( \\underline{\\delta}_0 \\) para realizar la PH:
|
| 735 |
+
\\( H_0 \\) : \\( \\underline{\\mu}_1 - \\underline{\\mu}_2
|
| 736 |
+
= \\underline{\\delta}_0 \\) Ejemplo Input: 0,0,0 Dependiendo de la cantidad de variables')),
|
| 737 |
+
numericInput("alfaa",p("Entre el valor de \\( \\alpha \\)"),value = 0.05),
|
| 738 |
+
selectInput("PruebaAnaliticaa", p("Prueba a usar n pequeña:",
|
| 739 |
+
style="text-align:center"),
|
| 740 |
+
choices=c("T2.test"=1,"HotellingsT2"=2),
|
| 741 |
+
selected = 1),
|
| 742 |
+
selectInput("PruebaAnalitica_nga",p("Prueba a usar n grande:",
|
| 743 |
+
style="text-align:center"),
|
| 744 |
+
choices=c("HotellingsT2"=1),
|
| 745 |
+
selected = 1),
|
| 746 |
+
generateInfo()
|
| 747 |
+
), ### FIn de sidebarPanel(width = 4,....
|
| 748 |
+
|
| 749 |
+
#######################################################
|
| 750 |
+
#######################################################
|
| 751 |
+
## Inicio Panel Principal de Derecha para PH: Mu1=Mu2
|
| 752 |
+
#######################################################
|
| 753 |
+
#######################################################
|
| 754 |
+
|
| 755 |
+
mainPanel(
|
| 756 |
+
|
| 757 |
+
####################################
|
| 758 |
+
####################################
|
| 759 |
+
##### Inicio Panel de PH Mu1=Mu2
|
| 760 |
+
####################################
|
| 761 |
+
####################################
|
| 762 |
+
|
| 763 |
+
tabsetPanel(
|
| 764 |
+
type = "pills",
|
| 765 |
+
|
| 766 |
+
####################################
|
| 767 |
+
## Inicio Panel de PH Mu1=Mu2, FU
|
| 768 |
+
####################################
|
| 769 |
+
|
| 770 |
+
tabPanel(withMathJax("Función-Usuario"),
|
| 771 |
+
br(),
|
| 772 |
+
fluidRow(column(width=8,
|
| 773 |
+
h4(p("PH sobre igualdad de vectores de medias
|
| 774 |
+
usando una FU, para n pequeña, para \\( \\Sigma_1=\\Sigma_2 \\)",
|
| 775 |
+
style="color:black;text-align:center")),
|
| 776 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 777 |
+
br(),
|
| 778 |
+
withMathJax(),
|
| 779 |
+
fluidRow(column(width=8,
|
| 780 |
+
p('$$\\begin{cases}
|
| 781 |
+
H_0: \\ \\ \\underline{\\mu}_1 - \\underline{\\mu}_2 =
|
| 782 |
+
\\underline{\\delta}_0 \\\\
|
| 783 |
+
H_a: \\ \\ \\underline{\\mu}_1 - \\underline{\\mu}_2 \\neq
|
| 784 |
+
\\underline{\\delta}_0
|
| 785 |
+
\\end{cases}$$',
|
| 786 |
+
style="color:black;border:1px solid black; background-color:white"
|
| 787 |
+
))),
|
| 788 |
+
br(),
|
| 789 |
+
tableOutput('PH_mu1_mu2_FU'),
|
| 790 |
+
br(),
|
| 791 |
+
withMathJax(),
|
| 792 |
+
fluidRow(column(width=8,
|
| 793 |
+
p(tags$em("Puedes consultar algo sobre la teoría
|
| 794 |
+
utilizada para este tipo de pruebas en: "),
|
| 795 |
+
tags$a("Dar click acá:", href="parte3mu0.pdf")
|
| 796 |
+
)
|
| 797 |
+
)),
|
| 798 |
+
br(),
|
| 799 |
+
fluidRow(column(width=8,
|
| 800 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 801 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 802 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 803 |
+
caso contrario se rechaza."),
|
| 804 |
+
style="background-color:#a9f1a86b"
|
| 805 |
+
))),
|
| 806 |
+
br(),
|
| 807 |
+
tableOutput('conclus2a'),
|
| 808 |
+
br(),
|
| 809 |
+
|
| 810 |
+
fluidRow(column(width=8,
|
| 811 |
+
h4(p("PH sobre igualdad de vectores de medias
|
| 812 |
+
usando una FU, para n pequeña para \\( \\Sigma_1\\neq \\Sigma_2\\) Nel and Van
|
| 813 |
+
Der Merwe-1986",
|
| 814 |
+
style="color:black;text-align:center")),
|
| 815 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 816 |
+
br(),
|
| 817 |
+
tableOutput('PH_mu1_mu2_FU_sigmas_dif'),
|
| 818 |
+
br(),
|
| 819 |
+
tableOutput('conclus4a'),
|
| 820 |
+
hr(),
|
| 821 |
+
|
| 822 |
+
### FU-n-Grande
|
| 823 |
+
br(),
|
| 824 |
+
|
| 825 |
+
fluidRow(column( width=8,
|
| 826 |
+
h4(p("PH sobre igualdad de vectores de medias para n grande,
|
| 827 |
+
usando una FU",
|
| 828 |
+
style="color:black;text-align:center")),
|
| 829 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 830 |
+
br(),
|
| 831 |
+
tableOutput('PH_mu1_mu2_FU_NG'),
|
| 832 |
+
br(),
|
| 833 |
+
tableOutput('conclus3a'),
|
| 834 |
+
br()
|
| 835 |
+
|
| 836 |
+
), #### Fin de Mu1=Mu2, FU
|
| 837 |
+
|
| 838 |
+
|
| 839 |
+
##############################################
|
| 840 |
+
## Inicio Panel de PH Mu1=Mu2, USANDO-R
|
| 841 |
+
##############################################
|
| 842 |
+
|
| 843 |
+
tabPanel("Usando-R",
|
| 844 |
+
br(),
|
| 845 |
+
fluidRow(column(width=8,
|
| 846 |
+
h4(p("PH sobre igualdad de vectores de medias usando R",
|
| 847 |
+
style="color:black;text-align:center")),
|
| 848 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 849 |
+
br(),
|
| 850 |
+
verbatimTextOutput("Res_mu1_mu2_R"),
|
| 851 |
+
br(),
|
| 852 |
+
withMathJax(),
|
| 853 |
+
br(),
|
| 854 |
+
fluidRow(column(width=8,
|
| 855 |
+
p(tags$em("Puedes consultar las ayudas de las funciones del R
|
| 856 |
+
usadas para estas pruebas en:",
|
| 857 |
+
tags$a("rrcov::T2.test()",
|
| 858 |
+
href="https://rdrr.io/cran/rrcov/man/T2.test.html"
|
| 859 |
+
),
|
| 860 |
+
tags$a(", icsnp::HotellingsT2()",
|
| 861 |
+
href="https://rdrr.io/cran/ICSNP/man/HotellingsT.html"
|
| 862 |
+
)
|
| 863 |
+
|
| 864 |
+
),".")
|
| 865 |
+
)),
|
| 866 |
+
br(),
|
| 867 |
+
fluidRow(column(width=8,
|
| 868 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 869 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 870 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 871 |
+
caso contrario se rechaza."),
|
| 872 |
+
style="background-color:#a9f1a86b"
|
| 873 |
+
))),
|
| 874 |
+
br(),
|
| 875 |
+
|
| 876 |
+
### Usando-R N-Grande
|
| 877 |
+
hr(),
|
| 878 |
+
fluidRow(column( width=8,
|
| 879 |
+
h4(p("Resultados de PH sobre igualdad de vectores de medias
|
| 880 |
+
usando R Para n-grande",
|
| 881 |
+
style="color:black;text-align:center")),
|
| 882 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 883 |
+
br(),
|
| 884 |
+
verbatimTextOutput("Res_mu1_mu2_R_NG"),
|
| 885 |
+
br()
|
| 886 |
+
|
| 887 |
+
), # Fin Panel: Mu1=Mu2, USANDO-R
|
| 888 |
+
|
| 889 |
+
##############################################
|
| 890 |
+
## Inicio Panel de Teoría
|
| 891 |
+
##############################################
|
| 892 |
+
|
| 893 |
+
tabPanel("Teoría", "1234"
|
| 894 |
+
|
| 895 |
+
|
| 896 |
+
)
|
| 897 |
+
|
| 898 |
+
) ### Fin de tabsetPanel(type = "pills",
|
| 899 |
+
) ### Fin de mainPanel() Mu1=Mu2
|
| 900 |
+
) ### Fin de sidebarLayout()
|
| 901 |
+
), ### FIN de PANEL mu1=mu2
|
| 902 |
+
|
| 903 |
+
|
| 904 |
+
#####################################################
|
| 905 |
+
#####################################################
|
| 906 |
+
##### Inicio Panel de PH Mu1=Mu2, Muestras Pareadas
|
| 907 |
+
#####################################################
|
| 908 |
+
#####################################################
|
| 909 |
+
|
| 910 |
+
tabPanel("\\( \\underline{\\mu}_1 = \\underline{\\mu}_2 \\)-Pareadas",
|
| 911 |
+
|
| 912 |
+
sidebarLayout(
|
| 913 |
+
|
| 914 |
+
sidebarPanel(
|
| 915 |
+
numericInput("alfa1a", p("Valor de \\( \\alpha \\)"),
|
| 916 |
+
value = 0.05),
|
| 917 |
+
br(),
|
| 918 |
+
selectInput("Prueba_mp",p("Seleccione la prueba pareada a usar:"
|
| 919 |
+
,style="text-align:center"),
|
| 920 |
+
choices=c("approx.hotelling.diff.test"=1),
|
| 921 |
+
selected = 1),
|
| 922 |
+
generateInfo()
|
| 923 |
+
),
|
| 924 |
+
|
| 925 |
+
mainPanel(
|
| 926 |
+
|
| 927 |
+
tabsetPanel(type = "pills",
|
| 928 |
+
|
| 929 |
+
##############################################################
|
| 930 |
+
########## INICIPO PANEL: Mu1=Mu2, MP, FU
|
| 931 |
+
##############################################################
|
| 932 |
+
|
| 933 |
+
tabPanel("Función de Usuario",
|
| 934 |
+
br(),
|
| 935 |
+
fluidRow(column( width=8,
|
| 936 |
+
h4(p("PH sobre igualdad de vectores de de medias
|
| 937 |
+
usando una FU para muestras pareadas",
|
| 938 |
+
style="color:black;text-align:center")),
|
| 939 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 940 |
+
br(),
|
| 941 |
+
withMathJax(),
|
| 942 |
+
fluidRow(column( width=8,
|
| 943 |
+
p('$$\\begin{cases}
|
| 944 |
+
H_0: \\ \\ \\underline{\\mu}_1 = \\underline{\\mu}_2 \\\\
|
| 945 |
+
H_a: \\ \\ \\underline{\\mu}_1 \\neq \\underline{\\mu}_2
|
| 946 |
+
\\end{cases}$$',
|
| 947 |
+
style="color:black;border:1px solid black;background-color:white"
|
| 948 |
+
))),
|
| 949 |
+
br(),
|
| 950 |
+
tableOutput('PH_mu1_mu2_FU_MPareadas'),
|
| 951 |
+
br(),
|
| 952 |
+
withMathJax(),
|
| 953 |
+
fluidRow(column(width=8,
|
| 954 |
+
p(tags$em("Puedes consultar algo sobre la teoría
|
| 955 |
+
utilizada para este tipo de pruebas en: "),
|
| 956 |
+
tags$a("Dar click acá:", href="parte4mu0.pdf")
|
| 957 |
+
)
|
| 958 |
+
)),
|
| 959 |
+
br(),
|
| 960 |
+
fluidRow(column(width=8,
|
| 961 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 962 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 963 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 964 |
+
caso contrario se rechaza."),
|
| 965 |
+
style="background-color:#a9f1a86b"
|
| 966 |
+
))),
|
| 967 |
+
br(),
|
| 968 |
+
tableOutput('conclus6a'),
|
| 969 |
+
br()
|
| 970 |
+
|
| 971 |
+
), #### Fin de Panel: Mu1=Mu2, MUESTRAS-PAREADAS, FU
|
| 972 |
+
|
| 973 |
+
##############################################################
|
| 974 |
+
########## INICIPO PANEL: Mu1=Mu2, MP, USANDO-R
|
| 975 |
+
##############################################################
|
| 976 |
+
|
| 977 |
+
tabPanel("Usando R",
|
| 978 |
+
br(),
|
| 979 |
+
fluidRow(column( width=8,
|
| 980 |
+
h4(p("Resultados de PH sobre igualdad de vectores de medias
|
| 981 |
+
usando R para muestras pareadas",
|
| 982 |
+
style="color:black;text-align:center")),
|
| 983 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 984 |
+
br(),
|
| 985 |
+
verbatimTextOutput("Res_mu1_mu2_R_MPareadas"),
|
| 986 |
+
br(),
|
| 987 |
+
withMathJax(),
|
| 988 |
+
br(),
|
| 989 |
+
fluidRow(column(width=8,
|
| 990 |
+
p(tags$em("Puedes consultar las ayudas de las funciones del R
|
| 991 |
+
usadas para estas pruebas en:",
|
| 992 |
+
tags$a("ergm::approx.hotelling.diff.test()",
|
| 993 |
+
href="https://rdrr.io/cran/ergm/man/approx.hotelling.diff.test.html"
|
| 994 |
+
)
|
| 995 |
+
),".")
|
| 996 |
+
)),
|
| 997 |
+
br(),
|
| 998 |
+
fluidRow(column(width=8,
|
| 999 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 1000 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 1001 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 1002 |
+
caso contrario se rechaza."),
|
| 1003 |
+
style="background-color:#a9f1a86b"
|
| 1004 |
+
))),
|
| 1005 |
+
br()
|
| 1006 |
+
|
| 1007 |
+
), ### Fin Mu1=Mu2, Muestras Pareadas, usando-R
|
| 1008 |
+
|
| 1009 |
+
##############################################
|
| 1010 |
+
## Inicio Panel de Teoría
|
| 1011 |
+
##############################################
|
| 1012 |
+
|
| 1013 |
+
tabPanel("Teoría", "1234"
|
| 1014 |
+
|
| 1015 |
+
|
| 1016 |
+
)
|
| 1017 |
+
|
| 1018 |
+
|
| 1019 |
+
) ### Fin de tabsetPanel(type = "pills",
|
| 1020 |
+
) ### Fin de mainPanel() Mu1=Mu2, MUESTRAS_PAREADAS
|
| 1021 |
+
) ### Fin de sidebarLayout()
|
| 1022 |
+
), ### FIN de PANEL mu1=mu2, MUESTRAS-PAREADAS
|
| 1023 |
+
|
| 1024 |
+
|
| 1025 |
+
#####################################################
|
| 1026 |
+
#####################################################
|
| 1027 |
+
##### Inicio Panel de PH sigma1=sigma2
|
| 1028 |
+
#####################################################
|
| 1029 |
+
#####################################################
|
| 1030 |
+
|
| 1031 |
+
tabPanel("\\( H_0: \\Sigma_1=\\Sigma_2 \\)",
|
| 1032 |
+
|
| 1033 |
+
sidebarLayout(
|
| 1034 |
+
|
| 1035 |
+
sidebarPanel(
|
| 1036 |
+
|
| 1037 |
+
numericInput("alfa2a", label = p("Entre el valor de \\( \\alpha \\)"),value = 0.05),
|
| 1038 |
+
br(),
|
| 1039 |
+
selectInput("Prueba_box",p("Seleccione la PH de R a usar:",
|
| 1040 |
+
style="text-align:center"),
|
| 1041 |
+
choices=c("boxM"=1),selected = 1),
|
| 1042 |
+
generateInfo()
|
| 1043 |
+
),
|
| 1044 |
+
|
| 1045 |
+
|
| 1046 |
+
mainPanel(
|
| 1047 |
+
|
| 1048 |
+
tabsetPanel(type = "pills",
|
| 1049 |
+
|
| 1050 |
+
##############################################################
|
| 1051 |
+
########## INICIPO PANEL: Sigma1=Sigma2, FU
|
| 1052 |
+
##############################################################
|
| 1053 |
+
|
| 1054 |
+
tabPanel("Funci��n de Usuario",
|
| 1055 |
+
br(),
|
| 1056 |
+
fluidRow(column( width=8,
|
| 1057 |
+
h4(p("Resultados de PH sobre igualdad de matrices de Var-Cov
|
| 1058 |
+
usando una FU", style="color:black;text-align:center")),
|
| 1059 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 1060 |
+
br(),
|
| 1061 |
+
withMathJax(),
|
| 1062 |
+
fluidRow(column( width=8,
|
| 1063 |
+
p('$$\\begin{cases}
|
| 1064 |
+
H_0: \\ \\ \\Sigma_1 = \\Sigma_2 \\\\
|
| 1065 |
+
H_a: \\ \\ \\Sigma_1 = \\Sigma_2
|
| 1066 |
+
\\end{cases} $$',
|
| 1067 |
+
style="color:black;border:1px solid black; background-color:white"
|
| 1068 |
+
))),
|
| 1069 |
+
br(),
|
| 1070 |
+
tableOutput('PH_sigma1_sigma2_FU'),
|
| 1071 |
+
br(),
|
| 1072 |
+
withMathJax(),
|
| 1073 |
+
fluidRow(column(width=8,
|
| 1074 |
+
p(tags$em("Puedes consultar algo sobre la teoría
|
| 1075 |
+
utilizada para este tipo de pruebas en: "),
|
| 1076 |
+
tags$a("Dar click acá:", href="parte2mu0.pdf")
|
| 1077 |
+
)
|
| 1078 |
+
)),
|
| 1079 |
+
br(),
|
| 1080 |
+
fluidRow(column(width=8,
|
| 1081 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 1082 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 1083 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 1084 |
+
caso contrario se rechaza."),
|
| 1085 |
+
style="background-color:#a9f1a86b"
|
| 1086 |
+
))),
|
| 1087 |
+
br(),
|
| 1088 |
+
tableOutput('conclus8a'),
|
| 1089 |
+
br()
|
| 1090 |
+
|
| 1091 |
+
), ### Fin Panel Sigma1=SIgma2, FU
|
| 1092 |
+
|
| 1093 |
+
|
| 1094 |
+
##############################################################
|
| 1095 |
+
########## INICIPO PANEL: Sigma1=Sigma2, USANDO-R
|
| 1096 |
+
##############################################################
|
| 1097 |
+
|
| 1098 |
+
tabPanel("Usando R",
|
| 1099 |
+
br(),
|
| 1100 |
+
fluidRow(column( width=8,
|
| 1101 |
+
h4(p("Resultados de PH sobre igualdad de matrices de Var-Cov usando R",
|
| 1102 |
+
style="color:black;text-align:center")),
|
| 1103 |
+
style="background-color:lavender;border-radius: 10px")),
|
| 1104 |
+
br(),
|
| 1105 |
+
verbatimTextOutput("Res_sigma1_sigma2_R"),
|
| 1106 |
+
br(),
|
| 1107 |
+
withMathJax(),
|
| 1108 |
+
br(),
|
| 1109 |
+
fluidRow(column(width=8,
|
| 1110 |
+
p(tags$em("Puedes consultar las ayudas de las funciones del R
|
| 1111 |
+
usadas para estas pruebas en:",
|
| 1112 |
+
tags$a("biotools::boxM()",
|
| 1113 |
+
href="https://rdrr.io/cran/biotools/man/boxM.html"
|
| 1114 |
+
)
|
| 1115 |
+
),".")
|
| 1116 |
+
)),
|
| 1117 |
+
br(),
|
| 1118 |
+
fluidRow(column(width=8,
|
| 1119 |
+
p(em("No se rechaza \\( H_0 \\) si valor p de la prueba
|
| 1120 |
+
es mayor o igual que \\( \\alpha \\) para un nivel
|
| 1121 |
+
de significancia del \\( (1-\\alpha)100\\% \\), en
|
| 1122 |
+
caso contrario se rechaza."),
|
| 1123 |
+
style="background-color:#a9f1a86b"
|
| 1124 |
+
))),
|
| 1125 |
+
br()
|
| 1126 |
+
|
| 1127 |
+
), ### Fin Panel: Sigma1=Sigma2, usando-R
|
| 1128 |
+
|
| 1129 |
+
##############################################
|
| 1130 |
+
## Inicio Panel de Teoría
|
| 1131 |
+
##############################################
|
| 1132 |
+
|
| 1133 |
+
tabPanel("Teoría", "1234"
|
| 1134 |
+
|
| 1135 |
+
|
| 1136 |
+
)
|
| 1137 |
+
|
| 1138 |
+
) ### Fin de tabsetPanel(type = "pills",
|
| 1139 |
+
) ### Fin de mainPanel() Sigma1=Sigma2
|
| 1140 |
+
) ### Fin de sidebarLayout()
|
| 1141 |
+
), ### FIN de PANEL Sigma1=Sigma2
|
| 1142 |
+
|
| 1143 |
+
id = "tabs2",
|
| 1144 |
+
type = "pills"
|
| 1145 |
+
|
| 1146 |
+
) ### Fin del tabPanel tabsetPanel (Antes de Datos:)
|
| 1147 |
+
|
| 1148 |
+
) ### Fin del tabPanel-De Dos Poblaciones
|
| 1149 |
+
|
| 1150 |
+
) ### Fin del tabsetPanel-Global, ie. De Una y Dos Poblaciones
|
| 1151 |
+
|
| 1152 |
+
) # Fin de ui
|
| 1153 |
+
|
| 1154 |
+
|
| 1155 |
+
|