library(foreign, pos = 4)
library(Rcmdr)
## Loading required package: splines
## The Commander GUI is launched only in interactive sessions
library(psych)
investigacion <- read.spss("D:/cosas/Facultad/2014/psicometria/psicometria.sav",
use.value.labels = FALSE, to.data.frame = TRUE)
# Escala de Logro
reliability(cov(investigacion[, c("vg9", "vg10", "vg11", "vg12")], use = "complete.obs"))
## Alpha reliability = 0.7102
## Standardized alpha = 0.7204
##
## Reliability deleting each item in turn:
## Alpha Std.Alpha r(item, total)
## vg9 0.5821 0.5913 0.6070
## vg10 0.6095 0.6252 0.5582
## vg11 0.6115 0.6200 0.5587
## vg12 0.7724 0.7734 0.3039
# Escala de Sociabilidad
reliability(cov(investigacion[, c("vg1", "vg2", "vg3", "vg4")], use = "complete.obs"))
## Alpha reliability = 0.7665
## Standardized alpha = 0.7698
##
## Reliability deleting each item in turn:
## Alpha Std.Alpha r(item, total)
## vg1 0.6687 0.6724 0.6444
## vg2 0.8129 0.8127 0.3742
## vg3 0.6548 0.6580 0.6709
## vg4 0.6917 0.6963 0.6036
# Escala de Presencia
reliability(cov(investigacion[, c("vg5", "vg6", "vg7", "vg8")], use = "complete.obs"))
## Alpha reliability = 0.739
## Standardized alpha = 0.7406
##
## Reliability deleting each item in turn:
## Alpha Std.Alpha r(item, total)
## vg5 0.6896 0.6903 0.5147
## vg6 0.6318 0.6343 0.6200
## vg7 0.7183 0.7219 0.4595
## vg8 0.6756 0.6750 0.5395
factorial <- investigacion[, c(4:14)]
# Varimax con 3 componentes
fit <- factanal(factorial, 3, rotation = "varimax")
print(fit, digits = 2, cutoff = 0.25, sort = TRUE)
##
## Call:
## factanal(x = factorial, factors = 3, rotation = "varimax")
##
## Uniquenesses:
## vg1 vg2 vg3 vg4 vg5 vg6 vg7 vg8 vg9 vg10 vg11
## 0.37 0.77 0.22 0.56 0.71 0.25 0.76 0.46 0.43 0.63 0.29
##
## Loadings:
## Factor1 Factor2 Factor3
## vg1 0.79
## vg3 0.87
## vg4 0.66
## vg9 0.75
## vg10 0.60
## vg11 0.83
## vg5 0.52
## vg6 0.29 0.82
## vg8 0.70
## vg2 0.39
## vg7 0.49
##
## Factor1 Factor2 Factor3
## SS loadings 2.00 1.82 1.73
## Proportion Var 0.18 0.17 0.16
## Cumulative Var 0.18 0.35 0.50
##
## Test of the hypothesis that 3 factors are sufficient.
## The chi square statistic is 69.76 on 25 degrees of freedom.
## The p-value is 4.17e-06
Siendo los items vg1, vg2, vg3 y vg4 de la escala de Sociabilidad
Los items vg5, vg6, vg7 y vg8 de la escala de Presencia
Y los items vg9, vg10, vg11 y vg12 de la escala de Logro
investigacionNw <- read.spss("D:/cosas/Facultad/2014/psicometria/nuevos.sav",
use.value.labels = FALSE, to.data.frame = TRUE)
# Escala de Logro
reliability(cov(investigacionNw[, c("vg9", "vg10", "vg11", "vg12")], use = "complete.obs"))
## Alpha reliability = 0.6045
## Standardized alpha = 0.6259
##
## Reliability deleting each item in turn:
## Alpha Std.Alpha r(item, total)
## vg9 0.4812 0.4971 0.4629
## vg10 0.5022 0.5368 0.4248
## vg11 0.5126 0.5249 0.4272
## vg12 0.6441 0.6516 0.2723
# Escala de Sociabilidad
reliability(cov(investigacionNw[, c("vg1", "vg2", "vg3", "vg4")], use = "complete.obs"))
## Alpha reliability = 0.8298
## Standardized alpha = 0.8294
##
## Reliability deleting each item in turn:
## Alpha Std.Alpha r(item, total)
## vg1 0.7589 0.7586 0.7143
## vg2 0.8538 0.8538 0.4964
## vg3 0.7500 0.7496 0.7330
## vg4 0.7675 0.7668 0.6957
# Escala de Presencia
reliability(cov(investigacionNw[, c("vg5", "vg6", "vg7", "vg8", "vg14", "vg15")],
use = "complete.obs"))
## Alpha reliability = 0.8252
## Standardized alpha = 0.8289
##
## Reliability deleting each item in turn:
## Alpha Std.Alpha r(item, total)
## vg5 0.8014 0.8069 0.5753
## vg6 0.7683 0.7691 0.7482
## vg7 0.8186 0.8237 0.4897
## vg8 0.7893 0.7924 0.6328
## vg14 0.8059 0.8119 0.5506
## vg15 0.7979 0.8010 0.5941
factorial <- investigacionNw[, c(4:15, 17, 18)]
# Varimax con 3 componentes
fit <- factanal(factorial, 3, rotation = "varimax")
print(fit, digits = 2, cutoff = 0.25, sort = TRUE)
##
## Call:
## factanal(x = factorial, factors = 3, rotation = "varimax")
##
## Uniquenesses:
## vg1 vg2 vg3 vg4 vg5 vg6 vg7 vg8 vg9 vg10 vg11 vg12 vg14 vg15
## 0.29 0.73 0.17 0.48 0.66 0.15 0.71 0.44 0.66 0.74 0.42 0.63 0.72 0.42
##
## Loadings:
## Factor1 Factor2 Factor3
## vg5 0.57
## vg6 0.90
## vg7 0.51
## vg8 0.74
## vg15 0.72
## vg1 0.82
## vg2 0.51
## vg3 0.89
## vg4 0.71
## vg12 0.50 0.29
## vg9 0.58
## vg11 0.76
## vg10 0.47
## vg14 0.49
##
## Factor1 Factor2 Factor3
## SS loadings 2.79 2.56 1.43
## Proportion Var 0.20 0.18 0.10
## Cumulative Var 0.20 0.38 0.48
##
## Test of the hypothesis that 3 factors are sufficient.
## The chi square statistic is 114.1 on 52 degrees of freedom.
## The p-value is 1.5e-06
Siendo los items vg1, vg2, vg3, vg4 de la escala de Sociabilidad
Los items vg5, vg6, vg7, vg8, vg14, vg15 de la escala de Presencia
Y los items vg9, vg10, vg11 y vg12 de la escala de Logro
uno <- sapply(investigacion[4:15], mean, na.rm = TRUE)
dos <- sapply(investigacion[4:15], mean, na.rm = TRUE)
describeBy(investigacion[1], group = investigacion$sexo, mat = FALSE, type = 3)
## group: 0
## vars n mean sd median trimmed mad min max range skew kurtosis
## edad 1 144 24.14 5.16 24 23.78 3.71 15 56 41 1.85 8.92
## se
## edad 0.43
## --------------------------------------------------------
## group: 1
## vars n mean sd median trimmed mad min max range skew kurtosis
## edad 1 40 23.55 6.29 22.5 22.81 4.45 15 53 38 2.56 9.59
## se
## edad 0.99
describeBy(investigacion[3], group = investigacion$sexo, mat = FALSE, type = 3)
## group: 0
## vars n mean sd median trimmed mad min max range skew
## horas 1 146 30.04 84.25 15 16.48 14.83 0 600 600 6.35
## kurtosis se
## horas 40.05 6.97
## --------------------------------------------------------
## group: 1
## vars n mean sd median trimmed mad min max range skew kurtosis
## horas 1 40 11.35 14.25 5 8.06 4.45 0 60 60 1.98 3.09
## se
## horas 2.25
counts <- table(investigacion$sexo, investigacion$estiloJuego)
barplot(counts, main = "Distribución de Estilo de Juego por sexo", xlab = "Estilo de Juego",
names = c("Social", "Presencia", "Logro", "Sin preferencia"), col = c("darkgray",
"lightgray"), legend = c("Hombre", "Mujer"), beside = TRUE)
boxplot(investigacion$horas ~ investigacion$estiloJuego, data = investigacion,
main = "Horas por estilo de Juego", outline = FALSE, xlab = "Estilo de Juego",
names = c("Social", "Presencia", "Logro", "Sin preferencia"), ylab = "Horas")