Re: [R-es] Friedman
Perdone , tiene ud razón , si funciona El 11/12/19, Jose Betancourt B. escribió: > Estimado, eliminé el 6 que sobra y sigue dando el mismo resultado > > El 11/12/19, José Trujillo Carmona escribió: >> En la tabla inferior se ha colado un "6" al inicio de la fila, por eso >> al copia y pegar no se lee correctamente. >> >> En la orden: >> >>> y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, >>>23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, >>>26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, >>>32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, >>>26.65),nrow=6, ncol=6, >>>dimnames=list(1:6,LETTERS[1:6])) >> >> Después del 4.33 aparece el 30.58 (inicio de la segunda columna) >> >> En la tabla: >> >> A B CD E F >> 3.88 30.58 25.24 4.44 29.41 38.87 >> 5.64 30.14 33.52 7.94 30.72 33.12 >> 5.76 16.92 25.45 4.04 32.92 39.15 >> 4.25 23.19 18.85 4.40 28.23 28.06 >> 5.91 26.74 20.45 4.23 23.35 38.23 >> 6 4.33 10.91 26.67 4.36 12.00 26.65 >> >> Hay un seis adicional al pie de la primera columna, en una especie de >> columna 0 fantasma. >> >> Saludos. >> >> >> El 11/12/19 a las 14:10, Jose Betancourt B. escribió: >>> Estimados >>> >>> Este es el test de friedman que se logra asi >>> >>> library(PMCMR) >>> y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, >>>23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, >>>26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, >>>32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, >>>26.65),nrow=6, ncol=6, >>>dimnames=list(1:6,LETTERS[1:6])) >>> print(y) >>> friedman.test(y) >>> durbin.test(y) >>> >>> RESULTADO >>> Friedman rank sum test >>> data: y >>> Friedman chi-squared = 23.333, df = 5, p-value = 0.0002915 >>> durbin.test(y) >>> Durbin rank sum test >>> data: y >>> Durbin chi-squared = 23.333, df = 5, p-value = 0.0002915 >>> >>> === >>> Me pregunto porque no obtengo ese resultado al copiar en clipboard >>> estos datos o al leerlos desde excel >>> >>> >>> >>> A B CD E F >>> 3.88 30.58 25.24 4.44 29.41 38.87 >>> 5.64 30.14 33.52 7.94 30.72 33.12 >>> 5.76 16.92 25.45 4.04 32.92 39.15 >>> 4.25 23.19 18.85 4.40 28.23 28.06 >>> 5.91 26.74 20.45 4.23 23.35 38.23 >>> 6 4.33 10.91 26.67 4.36 12.00 26.65 >>> >>> y <- read.table("clipboard", header = TRUE) >>> y >>> >>> Me da esta información >>> friedman.test(y) >>> Error in friedman.test.default(y) : >>>argument "groups" is missing, with no default >>> >>> EN RESUMEN QUISIERA LEER ESTOS DATOS DESDE EXCEL, CSV , TXT O >>> CLIPBOARD Y QUE ME HAGA EL ANÁLISIS >>> >>> Saludos >>> José >>> >>> ___ >>> R-help-es mailing list >>> R-help-es@r-project.org >>> https://stat.ethz.ch/mailman/listinfo/r-help-es >> >> ___ >> R-help-es mailing list >> R-help-es@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-help-es >> > > > -- > Dr. Jose A. Betancourt Bethencourt > Universidad de Ciencias Medicas Carlos j. Finlay > -- Dr. Jose A. Betancourt Bethencourt Universidad de Ciencias Medicas Carlos j. Finlay ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
Re: [R-es] Friedman
Estimado, eliminé el 6 que sobra y sigue dando el mismo resultado El 11/12/19, José Trujillo Carmona escribió: > En la tabla inferior se ha colado un "6" al inicio de la fila, por eso > al copia y pegar no se lee correctamente. > > En la orden: > >> y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, >>23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, >>26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, >>32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, >>26.65),nrow=6, ncol=6, >>dimnames=list(1:6,LETTERS[1:6])) > > Después del 4.33 aparece el 30.58 (inicio de la segunda columna) > > En la tabla: > > A B CD E F > 3.88 30.58 25.24 4.44 29.41 38.87 > 5.64 30.14 33.52 7.94 30.72 33.12 > 5.76 16.92 25.45 4.04 32.92 39.15 > 4.25 23.19 18.85 4.40 28.23 28.06 > 5.91 26.74 20.45 4.23 23.35 38.23 > 6 4.33 10.91 26.67 4.36 12.00 26.65 > > Hay un seis adicional al pie de la primera columna, en una especie de > columna 0 fantasma. > > Saludos. > > > El 11/12/19 a las 14:10, Jose Betancourt B. escribió: >> Estimados >> >> Este es el test de friedman que se logra asi >> >> library(PMCMR) >> y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, >>23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, >>26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, >>32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, >>26.65),nrow=6, ncol=6, >>dimnames=list(1:6,LETTERS[1:6])) >> print(y) >> friedman.test(y) >> durbin.test(y) >> >> RESULTADO >> Friedman rank sum test >> data: y >> Friedman chi-squared = 23.333, df = 5, p-value = 0.0002915 >> >>> durbin.test(y) >> Durbin rank sum test >> data: y >> Durbin chi-squared = 23.333, df = 5, p-value = 0.0002915 >> >> === >> Me pregunto porque no obtengo ese resultado al copiar en clipboard >> estos datos o al leerlos desde excel >> >> >> >> A B CD E F >> 3.88 30.58 25.24 4.44 29.41 38.87 >> 5.64 30.14 33.52 7.94 30.72 33.12 >> 5.76 16.92 25.45 4.04 32.92 39.15 >> 4.25 23.19 18.85 4.40 28.23 28.06 >> 5.91 26.74 20.45 4.23 23.35 38.23 >> 6 4.33 10.91 26.67 4.36 12.00 26.65 >> >> y <- read.table("clipboard", header = TRUE) >> y >> >> Me da esta información >> friedman.test(y) >> Error in friedman.test.default(y) : >>argument "groups" is missing, with no default >> >> EN RESUMEN QUISIERA LEER ESTOS DATOS DESDE EXCEL, CSV , TXT O >> CLIPBOARD Y QUE ME HAGA EL ANÁLISIS >> >> Saludos >> José >> >> ___ >> R-help-es mailing list >> R-help-es@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-help-es > > ___ > R-help-es mailing list > R-help-es@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-help-es > -- Dr. Jose A. Betancourt Bethencourt Universidad de Ciencias Medicas Carlos j. Finlay ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
Re: [R-es] Friedman
Una vez corregido el error de la última fila, el procedimiento funciona: > y <- read.table("clipboard", header = TRUE) > friedman.test(as.matrix(y)) Friedman rank sum test data: as.matrix(y) Friedman chi-squared = 23.333, df = 5, p-value = 0.0002915 Hay que tener en cuenta que el test de friedman admite dos forma de entrada de los datos, bien mediante la definición de grupos y bloques o bien mediante una matriz en la que las columnas son los niveles del factor (grupos) y las filas son los bloques: ## Default S3 method: friedman.test(y, groups, blocks, ...) ... ... groups: a vector giving the group for the corresponding elements of y if this is a vector; ignored if y is a matrix. read.table crea un dataframe, no una matriz. Saludos El 11/12/19 a las 14:10, Jose Betancourt B. escribió: > Estimados > > Este es el test de friedman que se logra asi > > library(PMCMR) > y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, >23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, >26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, >32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, >26.65),nrow=6, ncol=6, >dimnames=list(1:6,LETTERS[1:6])) > print(y) > friedman.test(y) > durbin.test(y) > > RESULTADO > Friedman rank sum test > data: y > Friedman chi-squared = 23.333, df = 5, p-value = 0.0002915 > >> durbin.test(y) > Durbin rank sum test > data: y > Durbin chi-squared = 23.333, df = 5, p-value = 0.0002915 > > === > Me pregunto porque no obtengo ese resultado al copiar en clipboard > estos datos o al leerlos desde excel > > > > A B CD E F > 3.88 30.58 25.24 4.44 29.41 38.87 > 5.64 30.14 33.52 7.94 30.72 33.12 > 5.76 16.92 25.45 4.04 32.92 39.15 > 4.25 23.19 18.85 4.40 28.23 28.06 > 5.91 26.74 20.45 4.23 23.35 38.23 > 6 4.33 10.91 26.67 4.36 12.00 26.65 > > y <- read.table("clipboard", header = TRUE) > y > > Me da esta información > friedman.test(y) > Error in friedman.test.default(y) : >argument "groups" is missing, with no default > > EN RESUMEN QUISIERA LEER ESTOS DATOS DESDE EXCEL, CSV , TXT O > CLIPBOARD Y QUE ME HAGA EL ANÁLISIS > > Saludos > José > > ___ > R-help-es mailing list > R-help-es@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-help-es [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
Re: [R-es] Friedman
En la tabla inferior se ha colado un "6" al inicio de la fila, por eso al copia y pegar no se lee correctamente. En la orden: y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, 23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, 26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, 32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, 26.65),nrow=6, ncol=6, dimnames=list(1:6,LETTERS[1:6])) Después del 4.33 aparece el 30.58 (inicio de la segunda columna) En la tabla: A B CD E F 3.88 30.58 25.24 4.44 29.41 38.87 5.64 30.14 33.52 7.94 30.72 33.12 5.76 16.92 25.45 4.04 32.92 39.15 4.25 23.19 18.85 4.40 28.23 28.06 5.91 26.74 20.45 4.23 23.35 38.23 6 4.33 10.91 26.67 4.36 12.00 26.65 Hay un seis adicional al pie de la primera columna, en una especie de columna 0 fantasma. Saludos. El 11/12/19 a las 14:10, Jose Betancourt B. escribió: Estimados Este es el test de friedman que se logra asi library(PMCMR) y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, 23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, 26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, 32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, 26.65),nrow=6, ncol=6, dimnames=list(1:6,LETTERS[1:6])) print(y) friedman.test(y) durbin.test(y) RESULTADO Friedman rank sum test data: y Friedman chi-squared = 23.333, df = 5, p-value = 0.0002915 durbin.test(y) Durbin rank sum test data: y Durbin chi-squared = 23.333, df = 5, p-value = 0.0002915 === Me pregunto porque no obtengo ese resultado al copiar en clipboard estos datos o al leerlos desde excel A B CD E F 3.88 30.58 25.24 4.44 29.41 38.87 5.64 30.14 33.52 7.94 30.72 33.12 5.76 16.92 25.45 4.04 32.92 39.15 4.25 23.19 18.85 4.40 28.23 28.06 5.91 26.74 20.45 4.23 23.35 38.23 6 4.33 10.91 26.67 4.36 12.00 26.65 y <- read.table("clipboard", header = TRUE) y Me da esta información friedman.test(y) Error in friedman.test.default(y) : argument "groups" is missing, with no default EN RESUMEN QUISIERA LEER ESTOS DATOS DESDE EXCEL, CSV , TXT O CLIPBOARD Y QUE ME HAGA EL ANÁLISIS Saludos José ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
[R-es] Friedman
Estimados Este es el test de friedman que se logra asi library(PMCMR) y <- matrix(c( 3.88, 5.64, 5.76, 4.25, 5.91, 4.33, 30.58, 30.14, 16.92, 23.19, 26.74, 10.91, 25.24, 33.52, 25.45, 18.85, 20.45, 26.67, 4.44, 7.94, 4.04, 4.4, 4.23, 4.36, 29.41, 30.72, 32.92, 28.23, 23.35, 12, 38.87, 33.12, 39.15, 28.06, 38.23, 26.65),nrow=6, ncol=6, dimnames=list(1:6,LETTERS[1:6])) print(y) friedman.test(y) durbin.test(y) RESULTADO Friedman rank sum test data: y Friedman chi-squared = 23.333, df = 5, p-value = 0.0002915 > durbin.test(y) Durbin rank sum test data: y Durbin chi-squared = 23.333, df = 5, p-value = 0.0002915 === Me pregunto porque no obtengo ese resultado al copiar en clipboard estos datos o al leerlos desde excel A B CD E F 3.88 30.58 25.24 4.44 29.41 38.87 5.64 30.14 33.52 7.94 30.72 33.12 5.76 16.92 25.45 4.04 32.92 39.15 4.25 23.19 18.85 4.40 28.23 28.06 5.91 26.74 20.45 4.23 23.35 38.23 6 4.33 10.91 26.67 4.36 12.00 26.65 y <- read.table("clipboard", header = TRUE) y Me da esta información friedman.test(y) Error in friedman.test.default(y) : argument "groups" is missing, with no default EN RESUMEN QUISIERA LEER ESTOS DATOS DESDE EXCEL, CSV , TXT O CLIPBOARD Y QUE ME HAGA EL ANÁLISIS Saludos José ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es