relatório /guia de uso interno - não é para publicar - nao houve preocupações com a norma culta ou adequações ABNT
O objetivo desse documento é gerar fatores/divisões em issues em duas técnicas de análise fatorial - PCA/ACP (Análise dos componentes principais) e AFE (análise fatorial exploratória)-, além de testar com duas formas de lidar com missing - listwise deletion e imputação como sugerido por King(2001) - inicialmente testaremos os dados no caso uruguaio. Posteriormente, será replicado o mesmo para o Brasil. A base de dados será o latinobarometro onda 2018.
O foco desse documento é a obtenção de um molde para realizar em outras empreitadas. A testagem via TRI, bem como em outros países e ondas poderá seguir os caminhos aqui apresentandos.
As issues que se enquadram na proposta a serem testadas aqui já foram previamente recodificadas e selecionadas em etapas anteriores (não listadas aqui). As 12 issues constam listadas abaixo:
N- Código — ISSUE — Escala — direcionamento
1- P24ST — Democracia melhor? — 1 a 4 — 1 + democrático
2- P15STGBSC.H — Confiança: Inst. Eleitorais — 1 a 4 — 1 + confiança
3- P15STGBSC.G — Confiança: Part. Pol. — 1 a 4 — 1 + confiança
4- P15STGBSC.F — Confiança: Poder Jud. — 1 a 4 — 1 + confiança
5- P15STGBSC.D — Confiança: Congresso — 1 a 4 — 1 + confiança
6- P15STGBSC.B — Confiança: Polícia — 1 a 4 — 1 + confiança
7- P15STGBSC.A — Confiança: Forças Armadas — 1 a 4 — 1 + confiança
8- P15STGBSC.C — Confiança: Igreja — 1 a 4 — 1 + confiança
9 - P25ST — Tolera corrupção, desde que resolva probl. — 1 a 4 — 1 + concorda muito
10 - P26ST —- Visão Pró Mercado — 1 a 4 - 1 + pró mercado
11- P67STC — confia que o voto seja secreta —- dummy —- 1 confia, 0 não (foi recodificada)
12- P43Nrecod_machismo — homens são melhores que mulheres no trabalho —- dummy — 1 machista e 0 não -(foi recodificada)
obs para ver como a questão é escrita ver questionário latinobarometro onda 2018.
o que se segue é dividido nas seguintes partes
1- pacotes e dados
2- URU
2.1 URU factor listwise deletion - ACP
2.2 URU factor missing imputation - ACP
2.3 URU factor listwise deletion - AFE
2.4 URU factor missing imputation - AFE
2.5 Considerações achados sobre URUGUAY
3 BRA
3.1 BRA factor listwise deletion - ACP
3.2 BRA factor missing imputation - ACP
3.3 BRA factor listwise deletion - AFE
3.4 BRA factor missing imputation - AFE
3.5 Considerações achados sobre BRA
4 - comparação BRA x URU
library(lavaan)
library(dplyr)
library(tidyverse)
library(memisc)
library(semPlot)
library(psych)
library(GPArotation)
require(corrplot)
library(readr)
bra <- read_csv("D:/SCRIPTS TALK ABOUT/mice experiment/bases_nacionais/bra.csv") # brasil geral
bra2 <- read_csv("D:/SCRIPTS TALK ABOUT/mice experiment/bases_nacionais/bra2.csv") # brasil com listwise delete
uru <- read_csv("D:/SCRIPTS TALK ABOUT/mice experiment/bases_nacionais/uru.csv") # uru geral
uru2 <- read_csv("D:/SCRIPTS TALK ABOUT/mice experiment/bases_nacionais/uru2.csv") # uru com listwise delete
library(ggcorrplot)
library("mice")
library("VIM")
library(huxtable)
nrow(uru)
## [1] 1200
nrow(uru2)
## [1] 833
A base uru2 contém apenas 833 casos, ao invés de 1200, em virutde de listwise deletion.
A base uru contem todos os casos e tem 1200 - ainda consta os NAS - vamos proceder imputação pelo pacote mice na seção 2.2
Isso também pode ser visualizado com as estatísticas descritivas dessas duas bases
summary(uru)
## P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D
## Min. :1.00 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:1.00 1st Qu.:2.000 1st Qu.:3.000 1st Qu.:2.000 1st Qu.:2.000
## Median :2.00 Median :2.000 Median :3.000 Median :3.000 Median :3.000
## Mean :1.89 Mean :2.545 Mean :3.235 Mean :2.798 Mean :2.908
## 3rd Qu.:2.00 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000
## Max. :4.00 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000
## NA's :66 NA's :78 NA's :32 NA's :50 NA's :64
## P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:2.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:2.000
## Median :2.000 Median :2.000 Median :3.000 Median :3.000
## Mean :2.371 Mean :2.233 Mean :2.843 Mean :2.789
## 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:3.000
## Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000
## NA's :9 NA's :47 NA's :44 NA's :75
## P26ST P67STC P43Nrecod_machismo
## Min. :1.000 Min. :0.0000 Min. :0.00000
## 1st Qu.:2.000 1st Qu.:0.0000 1st Qu.:0.00000
## Median :2.000 Median :0.0000 Median :0.00000
## Mean :2.242 Mean :0.4282 Mean :0.02385
## 3rd Qu.:3.000 3rd Qu.:1.0000 3rd Qu.:0.00000
## Max. :4.000 Max. :1.0000 Max. :1.00000
## NA's :153 NA's :65 NA's :26
acima sem listwise deletion - uru
abaixo com a remoção listwise deletion - uru 2
summary(uru2)
## P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.00 Min. :1.000
## 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:3.000 1st Qu.:2.00 1st Qu.:2.000
## Median :2.000 Median :2.000 Median :3.000 Median :3.00 Median :3.000
## Mean :1.836 Mean :2.459 Mean :3.203 Mean :2.75 Mean :2.857
## 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.00 3rd Qu.:4.000
## Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.00 Max. :4.000
## P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.00 Min. :1.000
## 1st Qu.:2.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:2.00 1st Qu.:2.000
## Median :2.000 Median :2.000 Median :3.000 Median :3.00 Median :2.000
## Mean :2.353 Mean :2.239 Mean :2.868 Mean :2.79 Mean :2.245
## 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:3.00 3rd Qu.:3.000
## Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.00 Max. :4.000
## P67STC P43Nrecod_machismo
## Min. :0.0000 Min. :0.00000
## 1st Qu.:0.0000 1st Qu.:0.00000
## Median :0.0000 Median :0.00000
## Mean :0.4142 Mean :0.01921
## 3rd Qu.:1.0000 3rd Qu.:0.00000
## Max. :1.0000 Max. :1.00000
perceba como há uma mudança o que justifica a tentativa de rodar testes com imputação de missings - como farei na seção 2.2
Antes vamos seguir a ordem pré-estabelecida
matcor <- cor(uru2)
corrplot(matcor, method="color")
ggcorrplot(matcor, hc.order = TRUE,
type = "lower",
lab = TRUE,
lab_size = 3,
method="circle",
colors = c("tomato2", "white", "springgreen3"),
title="Correlograma - base de dados exemplo 1",
ggtheme=theme_bw)
percebemos a uma primeira vista - que há correlaçãoes fracas e médias entre as variáveis - nessa primeira aproximação serve para visualizar correlações - não será mais necessária, nem repetida na seção 2.3
uru2 -> base
cortest.bartlett(base)
## R was not square, finding R from data
## $chisq
## [1] 1692.407
##
## $p.value
## [1] 5.946338e-310
##
## $df
## [1] 66
KMO(base)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = base)
## Overall MSA = 0.76
## MSA for each item =
## P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F
## 0.78 0.82 0.83 0.83
## P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C
## 0.79 0.67 0.57 0.74
## P25ST P26ST P67STC P43Nrecod_machismo
## 0.55 0.53 0.87 0.60
todos acima de 0,5
fit<-princomp(base,cor=TRUE)#cor=true = ACP - menos exigente
summary(fit)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.7288183 1.2711290 1.07034330 1.02669853 0.95642445
## Proportion of Variance 0.2490677 0.1346474 0.09546956 0.08784249 0.07622898
## Cumulative Proportion 0.2490677 0.3837151 0.47918470 0.56702718 0.64325616
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.9343036 0.89033151 0.84909359 0.76074280 0.68330235
## Proportion of Variance 0.0727436 0.06605752 0.06007999 0.04822747 0.03890851
## Cumulative Proportion 0.7159998 0.78205728 0.84213727 0.89036474 0.92927325
## Comp.11 Comp.12
## Standard deviation 0.66569729 0.63684233
## Proportion of Variance 0.03692941 0.03379735
## Cumulative Proportion 0.96620265 1.00000000
até 4 factores é ok - embora possa ser feito com menos
screeplot(fit)
PCAfitvarimax<-principal(base, nfactors=4,
n.obs=1200, rotate="varimax",scores=TRUE)
PCAfitvarimax$values
## [1] 2.9888127 1.6157689 1.1456348 1.0541099 0.9147477 0.8729232 0.7926902
## [8] 0.7209599 0.5787296 0.4669021 0.4431529 0.4055681
PCAfitvarimax$loadings
##
## Loadings:
## RC1 RC2 RC3 RC4
## P24ST 0.476 -0.106 0.269 0.329
## P15STGBSC.H 0.771 0.117 0.119
## P15STGBSC.G 0.734 -0.124
## P15STGBSC.F 0.725 0.183
## P15STGBSC.D 0.810
## P15STGBSC.B 0.227 0.769 -0.131
## P15STGBSC.A 0.856
## P15STGBSC.C 0.533 0.265 -0.181
## P25ST 0.697 -0.331
## P26ST 0.187 0.744 0.284
## P67STC 0.418 0.255
## P43Nrecod_machismo 0.803
##
## RC1 RC2 RC3 RC4
## SS loadings 2.781 1.716 1.223 1.085
## Proportion Var 0.232 0.143 0.102 0.090
## Cumulative Var 0.232 0.375 0.477 0.567
ACP_URU_Listwise_4_FACT <- PCAfitvarimax$loadings # salvar para depois
eis os 4 fatores -acima de 0.4 fatora junto SS loadings ok - para ver mais detalhes - pasta acessar o objeto PCAfitvarimax criado acima
O primeiro fator (RC1) tem relação com confiança e crença na democracia /
O segundo fator RC2 tem relação com confiança em institições mais ligadas a pautas conservadoras, como forças de segurança e igreja
o terceiro fator RC3 dialoga com preocupações materialistas - visão pró-mercado e tolerância a corrupção
o quarto fator RC4 relaciona-se com posição das mulheres no mercado de trabalho.
antes de rodar é necessário imputar missings
agora é chegada a hora de imputar valores pros missings faltantes - conforme sugerido em literatura - o pacote mice será utilizado aqui - a base nova gerada a partir de ‘uru’ a ser chamada de uru3 conterá 1200 casos, os missings serão imputados mediantes técnicas apontadas no código abaixo. A principal fonte de referencia é King 2001 e Buuren, S. van; Groothuis-Oudshoorn, K.(2010)
obs uru3 poderá também ser utilizado em 2.4 é possível definir a técnica de cada variavel - aqui vamos optar pela métrica padrão pmn - mas é possível alterar mendiante apontamentos
em Buuren, S. van; Groothuis-Oudshoorn, K.(2010) Journal of statistical software, volume in press, pp. 1 - 68 (Article)
imp <- mice(uru, seed=23109)# IMPORTANTE: é importante repetir o seed para sempre gerar a mesma imputação
##
## iter imp variable
## 1 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 1 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 1 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 1 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 1 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
foram 5 iterações (que é o padrão do pacote mice) - gerando cinco bancos de dados aleatórios
stripplot(imp, pch=20, cex=1.2)
os pontos azuis representam os dados reais e os vermelhos os imputados
com <- complete(imp, "long")
a título de curisidade o objeto com acima cria uma data base de 6000 casos (= 1200 x 5). Isso repete os casos conhecidos 5 vezes e as missing imputations também uma variável dessa data base diz de qual iteração o dado é oriundo
table(com$.imp)
##
## 1 2 3 4 5
## 1200 1200 1200 1200 1200
veja que todas tem 1200 casos
Qual delas pegar? - é possível rodar os testes com todas - rodar mais imputações - para obter uma individualmente basta o código: basenova1 <- complete(imp, 1)
nesse caso pego um- para esse guia vamos pegar a imputação 1 e chamar esse objeto de uru3 e aí sim rodar as téncias de análise fatorial com ele - tanto aqui em 2.2, quanto em 2.4
uru3 <- complete(imp, 1)
nrow(uru3)
## [1] 1200
summary(uru3)
## P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D
## Min. :1.0 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:1.0 1st Qu.:2.000 1st Qu.:3.000 1st Qu.:2.000 1st Qu.:2.000
## Median :2.0 Median :2.500 Median :3.000 Median :3.000 Median :3.000
## Mean :1.9 Mean :2.562 Mean :3.233 Mean :2.807 Mean :2.909
## 3rd Qu.:2.0 3rd Qu.:3.250 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:4.000
## Max. :4.0 Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.000
## P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.00 Min. :1.00
## 1st Qu.:2.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:2.00 1st Qu.:2.00
## Median :2.000 Median :2.000 Median :3.000 Median :3.00 Median :2.00
## Mean :2.376 Mean :2.238 Mean :2.847 Mean :2.79 Mean :2.25
## 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:3.00 3rd Qu.:3.00
## Max. :4.000 Max. :4.000 Max. :4.000 Max. :4.00 Max. :4.00
## P67STC P43Nrecod_machismo
## Min. :0.0000 Min. :0.00000
## 1st Qu.:0.0000 1st Qu.:0.00000
## Median :0.0000 Median :0.00000
## Mean :0.4267 Mean :0.02417
## 3rd Qu.:1.0000 3rd Qu.:0.00000
## Max. :1.0000 Max. :1.00000
veja como uru 3 tem 1200 casos e zero NA´s
Existem diagnósticos para ver se sua imputação está boa - elas constam na literatura Buuren, S. van; Groothuis-Oudshoorn, K. (2010) - não farei aqui nesse guia
é só repetir o que fiz com uru2 em uru3 - e gerar um objeto no final para comparar
matcor3 <- cor(uru3)
ggcorrplot(matcor3, hc.order = TRUE,
type = "lower",
lab = TRUE,
lab_size = 3,
method="circle",
colors = c("tomato2", "white", "springgreen3"),
title="Correlograma - base de dados exemplo 1",
ggtheme=theme_bw)
uru3 -> base
cortest.bartlett(base)
## R was not square, finding R from data
## $chisq
## [1] 2561.404
##
## $p.value
## [1] 0
##
## $df
## [1] 66
KMO(base)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = base)
## Overall MSA = 0.78
## MSA for each item =
## P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F
## 0.80 0.83 0.82 0.84
## P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C
## 0.81 0.71 0.59 0.76
## P25ST P26ST P67STC P43Nrecod_machismo
## 0.55 0.51 0.86 0.68
todos acima de 0.5
fit<-princomp(base,cor=TRUE)#cor=true = ACP - menos exigente
summary(fit)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.7657329 1.2385229 1.06357101 1.02216046 0.95897605
## Proportion of Variance 0.2598177 0.1278282 0.09426527 0.08706767 0.07663626
## Cumulative Proportion 0.2598177 0.3876460 0.48191126 0.56897892 0.64561518
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.92727240 0.89952306 0.85037787 0.76412564 0.67571522
## Proportion of Variance 0.07165284 0.06742848 0.06026188 0.04865733 0.03804926
## Cumulative Proportion 0.71726802 0.78469650 0.84495837 0.89361571 0.93166496
## Comp.11 Comp.12
## Standard deviation 0.65093330 0.62952862
## Proportion of Variance 0.03530951 0.03302552
## Cumulative Proportion 0.96697448 1.00000000
também 4 possíveis igual em 2.1
screeplot(fit)
PCAfitvarimax<-principal(base, nfactors=4,
n.obs=1200,rotate="varimax",scores=TRUE)
PCAfitvarimax$values
## [1] 3.1178128 1.5339390 1.1311833 1.0448120 0.9196351 0.8598341 0.8091417
## [8] 0.7231425 0.5838880 0.4565911 0.4237142 0.3963063
PCAfitvarimax$loadings
##
## Loadings:
## RC1 RC2 RC3 RC4
## P24ST 0.482 0.282 0.427
## P15STGBSC.H 0.773 0.140 0.141
## P15STGBSC.G 0.734 -0.156
## P15STGBSC.F 0.714 0.234
## P15STGBSC.D 0.804 0.120
## P15STGBSC.B 0.269 0.753 -0.103 0.112
## P15STGBSC.A 0.859
## P15STGBSC.C 0.574 0.163 -0.267
## P25ST 0.656 -0.286
## P26ST 0.143 0.776 0.199
## P67STC 0.443 0.107
## P43Nrecod_machismo 0.800
##
## RC1 RC2 RC3 RC4
## SS loadings 2.801 1.761 1.169 1.097
## Proportion Var 0.233 0.147 0.097 0.091
## Cumulative Var 0.233 0.380 0.478 0.569
ACP_URU_MICE_4_FACT <- PCAfitvarimax$loadings # salvar para depois
a unica diferença entre esse da 2.2 e o da 2.1 é o fato de que P24ST fatorou no factor 4 juntamente com o 1 - o restante das análises perdura - o mais democrata é menos machista e vice-versa
é só repetir o que fiz na seção 2.1 com a técnica AFE ao invés de ACP - e gerar um objeto no final para comparar - base = (uru2)
uru2 -> base
fit<-princomp(base,cor=FALSE)#cor=FALSE = AFE - mais exigente
summary(fit)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.597550 1.2316162 0.9661058 0.81598472 0.7377641
## Proportion of Variance 0.301412 0.1791441 0.1102303 0.07863497 0.0642816
## Cumulative Proportion 0.301412 0.4805561 0.5907864 0.66942138 0.7337030
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.69163742 0.67308354 0.65224869 0.59353781 0.55860143
## Proportion of Variance 0.05649482 0.05350442 0.05024329 0.04160528 0.03685155
## Cumulative Proportion 0.79019780 0.84370222 0.89394551 0.93555079 0.97240234
## Comp.11 Comp.12
## Standard deviation 0.46389149 0.135956376
## Proportion of Variance 0.02541467 0.002182985
## Cumulative Proportion 0.99781701 1.000000000
Aqui somente dois factores - a suspeita é pq o AFE é mais exigente que o PCA (TABACHINICK; FIDELL, 2007)
screeplot(fit)
vamos de 2 fatores
AFEfitvarimax<-psych::fa(base, nfactors=2,
n.obs=1200,rotate="varimax",scores=TRUE)
AFEfitvarimax$values
## [1] 2.44136423 1.14082842 0.26795743 0.20508275 0.06739023 0.03283521
## [7] -0.01423725 -0.05218516 -0.06633643 -0.09049801 -0.12918633 -0.22079899
AFEfitvarimax$loadings
##
## Loadings:
## MR1 MR2
## P24ST 0.371
## P15STGBSC.H 0.729
## P15STGBSC.G 0.629
## P15STGBSC.F 0.667 0.129
## P15STGBSC.D 0.758
## P15STGBSC.B 0.264 0.521
## P15STGBSC.A 0.903
## P15STGBSC.C 0.104 0.349
## P25ST 0.101
## P26ST 0.198
## P67STC 0.333
## P43Nrecod_machismo
##
## MR1 MR2
## SS loadings 2.286 1.297
## Proportion Var 0.190 0.108
## Cumulative Var 0.190 0.299
AFE_URU_Listwise_2_FACT <- AFEfitvarimax$loadings # salvar para depois
A primeira e as quatro últimas questões não tem carga fatorial adequada(>0.4).
Os dados propiciam as demais é possível perceber dois fatores - o primeiro - MR1- diz respeito à confiança institucional e o segundo - MR2- refere-se a confiança nas forças de segurança.
IMPORTANTE
Os valores de RC1, RC2, RC3, RC4, MR1 e MR2 podem gerar scores individuais e depois serem rodados em regressões ou analises bivariadas.
é só repetir o que fiz na seção 2.2 com a técnica AFE ao invés de ACP - e gerar um objeto no final para comparar - base = (uru3)
uru3 -> base
fit<-princomp(base,cor=FALSE)#cor=FALSE = AFE - mais exigente
summary(fit)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.6629719 1.2180294 0.9636596 0.80373231 0.74754356
## Proportion of Variance 0.3188665 0.1710624 0.1070746 0.07448382 0.06443356
## Cumulative Proportion 0.3188665 0.4899289 0.5970035 0.67148736 0.73592092
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.6979236 0.67709537 0.65667925 0.59620144 0.56502210
## Proportion of Variance 0.0561636 0.05286142 0.04972167 0.04098502 0.03681035
## Cumulative Proportion 0.7920845 0.84494593 0.89466760 0.93565262 0.97246297
## Comp.11 Comp.12
## Standard deviation 0.46446674 0.151969231
## Proportion of Variance 0.02487416 0.002662873
## Cumulative Proportion 0.99733713 1.000000000
também 2
screeplot(fit)
AFEfitvarimax<-psych::fa(base, nfactors=2,
n.obs=1200,rotate="varimax",scores=TRUE)
AFEfitvarimax$values
## [1] 2.58127495 1.08521014 0.24962976 0.20287065 0.06758763 0.01938465
## [7] -0.01813074 -0.06020467 -0.06718396 -0.07938041 -0.12486678 -0.18970624
AFEfitvarimax$loadings
##
## Loadings:
## MR1 MR2
## P24ST 0.404
## P15STGBSC.H 0.738 0.144
## P15STGBSC.G 0.619 0.109
## P15STGBSC.F 0.659 0.199
## P15STGBSC.D 0.742 0.126
## P15STGBSC.B 0.292 0.547
## P15STGBSC.A 0.913
## P15STGBSC.C 0.355
## P25ST
## P26ST 0.146
## P67STC 0.334
## P43Nrecod_machismo
##
## MR1 MR2
## SS loadings 2.292 1.374
## Proportion Var 0.191 0.115
## Cumulative Var 0.191 0.306
AFE_URU_MICE_2_FACT <- AFEfitvarimax$loadings # salvar para depois
O acrescimo dos casos com mice - muda um pouco o primeiro fator de MR1 - acrescendo a adesão à democracia às questões relativas à confiança institucional - MR2 ficou igual.
O numero de fatores e questões acrescidas mudam a depender da técnica redução ou imputação adotada , mas é fato que questões de legitimidade do regime parecem ser uma divisão do público uruguaio, bem como acerca da confiança em instituições mais tradicionais como forças armadas e polícia (além de igreja em alguns casos)
nrow(bra)
## [1] 1204
1204 é o N base do Brasil - bruta
nrow(bra2)
## [1] 1013
cai para 1013 com listwise deletion
matcor <- cor(bra2)
corrplot(matcor, method="color")
ggcorrplot(matcor, hc.order = TRUE,
type = "lower",
lab = TRUE,
lab_size = 3,
method="circle",
colors = c("tomato2", "white", "springgreen3"),
title="Correlograma - base de dados exemplo 1",
ggtheme=theme_bw)
Vamos para rodar a ACP -…
bra2 -> base
cortest.bartlett(base)
## R was not square, finding R from data
## $chisq
## [1] 1710.481
##
## $p.value
## [1] 9.932043e-314
##
## $df
## [1] 66
KMO(base)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = base)
## Overall MSA = 0.79
## MSA for each item =
## P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F
## 0.67 0.82 0.80 0.83
## P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C
## 0.80 0.75 0.78 0.84
## P25ST P26ST P67STC P43Nrecod_machismo
## 0.59 0.70 0.79 0.48
a questão do machismo ficou abaixo de 0.48 - uma possibilidade é deletá-la - por ser um guia vamos mantê-lo
fit<-princomp(base,cor=TRUE)#cor=true = ACP - menos exigente
summary(fit)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.7371300 1.1179882 1.07875131 1.01626600 0.98660522
## Proportion of Variance 0.2514684 0.1041581 0.09697537 0.08606638 0.08111582
## Cumulative Proportion 0.2514684 0.3556265 0.45260188 0.53866826 0.61978408
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.95397577 0.86796410 0.85551000 0.81633675 0.7346182
## Proportion of Variance 0.07583915 0.06278014 0.06099145 0.05553381 0.0449720
## Cumulative Proportion 0.69562323 0.75840337 0.81939481 0.87492862 0.9199006
## Comp.11 Comp.12
## Standard deviation 0.71747280 0.66815072
## Proportion of Variance 0.04289727 0.03720212
## Cumulative Proportion 0.96279788 1.00000000
4 fatores
PCAfitvarimax<-principal(base, nfactors=4,
n.obs=1204,rotate="varimax",scores=TRUE)
PCAfitvarimax$values
## [1] 3.0176206 1.2498975 1.1637044 1.0327966 0.9733899 0.9100698 0.7533617
## [8] 0.7318974 0.6664057 0.5396639 0.5147672 0.4464254
PCAfitvarimax$loadings
##
## Loadings:
## RC1 RC2 RC3 RC4
## P24ST 0.156 0.784
## P15STGBSC.H 0.535 0.478
## P15STGBSC.G 0.149 0.684
## P15STGBSC.F 0.584 0.414 0.137 -0.110
## P15STGBSC.D 0.279 0.710
## P15STGBSC.B 0.776 0.168
## P15STGBSC.A 0.768 0.107 0.148
## P15STGBSC.C 0.374 0.315 -0.228 0.205
## P25ST -0.302 0.529 0.393
## P26ST 0.154 0.735
## P67STC 0.238 0.437
## P43Nrecod_machismo 0.195 -0.825
##
## RC1 RC2 RC3 RC4
## SS loadings 2.187 1.880 1.279 1.118
## Proportion Var 0.182 0.157 0.107 0.093
## Cumulative Var 0.182 0.339 0.445 0.539
PCA_BRA_Listwise_4_FACT <- PCAfitvarimax$loadings # salvar para depois
Meio dificil de interpretar
-Primeiro factor - RC1 - confiança Justiça eleitoral , confiança poder judicial, policia e forças armadas - nome pensado: CONFIANÇA INSTITUIÇÕES JURÍDICO/POLICIAIS
SEGUNDO FACTOR - RC2 - confiança justiç eleitoral, partidos políticos,poder judicial,congresso,visão sobre corrupção - nome posssível: Confiança regime político
Terceiro FACTOR - RC3 - contra democracia, pró mercado - nome possível: Democracia/Mercado
quarto factor - machismo - COMPETÊNCIA FEMININA
confiança igreja não fatorou (>0.4)
Antes de rodar , fazer a imputação
.
imp <- mice(bra, seed=23109)# IMPORTANTE: é importante repetir o seed do uru para sempre gerar a mesma imputação
##
## iter imp variable
## 1 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 1 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 1 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 1 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 1 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 2 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 3 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 4 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 1 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 2 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 3 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 4 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
## 5 5 P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C P25ST P26ST P67STC P43Nrecod_machismo
bra3 <- complete(imp, 1)
bra3 é agora o data frame para as seções 3.2 e 3.4.
. …
bra3 -> base
fit<-princomp(base,cor=TRUE)#cor=TRUE = PCA - menos exigente
summary(fit)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.7693092 1.1051701 1.0686762 1.01145809 0.98498348
## Proportion of Variance 0.2608713 0.1017834 0.0951724 0.08525396 0.08084937
## Cumulative Proportion 0.2608713 0.3626547 0.4578271 0.54308103 0.62393040
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.95938016 0.86508456 0.84293076 0.80804004 0.72430310
## Proportion of Variance 0.07670086 0.06236427 0.05921102 0.05441073 0.04371792
## Cumulative Proportion 0.70063126 0.76299554 0.82220656 0.87661728 0.92033520
## Comp.11 Comp.12
## Standard deviation 0.71274926 0.66930269
## Proportion of Variance 0.04233429 0.03733051
## Cumulative Proportion 0.96266949 1.00000000
4 também como em 3.1
KMO(base)
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = base)
## Overall MSA = 0.8
## MSA for each item =
## P24ST P15STGBSC.H P15STGBSC.G P15STGBSC.F
## 0.69 0.83 0.81 0.84
## P15STGBSC.D P15STGBSC.B P15STGBSC.A P15STGBSC.C
## 0.81 0.77 0.80 0.85
## P25ST P26ST P67STC P43Nrecod_machismo
## 0.64 0.74 0.77 0.44
PCAfitvarimax<-principal(base, nfactors=4,
n.obs=1204,rotate="varimax",scores=TRUE)
PCAfitvarimax$values
## [1] 3.1304552 1.2214009 1.1420688 1.0230475 0.9701925 0.9204103 0.7483713
## [8] 0.7105323 0.6529287 0.5246150 0.5080115 0.4479661
PCAfitvarimax$loadings
##
## Loadings:
## RC2 RC1 RC3 RC4
## P24ST 0.782
## P15STGBSC.H 0.625 0.410
## P15STGBSC.G 0.668 0.122 0.237
## P15STGBSC.F 0.521 0.507 0.129
## P15STGBSC.D 0.753 0.187 0.101
## P15STGBSC.B 0.107 0.774 0.198
## P15STGBSC.A 0.178 0.761 0.114
## P15STGBSC.C 0.194 0.483 -0.145 0.265
## P25ST 0.317 -0.208 0.170 0.609
## P26ST 0.108 0.742
## P67STC 0.192 -0.132 0.408
## P43Nrecod_machismo 0.330 -0.179 -0.711
##
## RC2 RC1 RC3 RC4
## SS loadings 2.018 1.976 1.319 1.204
## Proportion Var 0.168 0.165 0.110 0.100
## Cumulative Var 0.168 0.333 0.443 0.543
PCA_BRA_MICE_4_FACT <- PCAfitvarimax$loadings # salvar para depois
Houve mudnaças em relação ao apontado na seção 3.1
o primeiro factor RC1 engloba -> confiança Justiça eleitoral, Partidos Políticos, Poder Judicial e Congresso - nome possível: Confiança instituições políticas
O segundo factor RC2 engloba -> Confiança Justiça Eleitoral, Poder Judicial, Forças Policiais e Armadas, além da igreja - nome possível: Confiança Juridico/Policial
O terceiro factor RC3 é o mesmo no caso da listwise deletion (RC3 em 3.1)
O quarto factor RC4 é uma miscelância - engloba visao sobre corrupção, posição sobre crença da securidade do voto e sobre competência da mulher no trabalho - difícil nomear
Possíveis ações - reduzir factores ou cortar a questão machismo que deu baixo Kaiser-Meyer-Olkin factor adequacy
voltar a usar bra2
bra2 -> base
fit<-princomp(base,cor=FALSE)#cor=FALSE = AFE - mais exigente
summary(fit)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.5540562 1.1110436 1.0603159 0.89396376 0.85038800
## Proportion of Variance 0.2742962 0.1402001 0.1276900 0.09076661 0.08213354
## Cumulative Proportion 0.2742962 0.4144963 0.5421863 0.63295294 0.71508649
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.84555036 0.67812776 0.64350759 0.63188103 0.51747280
## Proportion of Variance 0.08120173 0.05222872 0.04703202 0.04534787 0.03041315
## Cumulative Proportion 0.79628821 0.84851693 0.89554895 0.94089683 0.97130998
## Comp.11 Comp.12
## Standard deviation 0.46714632 0.185420763
## Proportion of Variance 0.02478519 0.003904838
## Cumulative Proportion 0.99609516 1.000000000
como AFE é mais exigente, deu 3 factores
AFEfitvarimax<-psych::fa(base, nfactors=3,
n.obs=1204,rotate="varimax",scores=TRUE)
AFEfitvarimax$values
## [1] 2.43792901 0.71127510 0.54830925 0.23509232 0.10144402 0.05286734
## [7] 0.01603766 -0.01378443 -0.03555527 -0.06698064 -0.13519716 -0.15392431
AFEfitvarimax$loadings
##
## Loadings:
## MR1 MR3 MR2
## P24ST 0.818
## P15STGBSC.H 0.409 0.454 0.156
## P15STGBSC.G 0.160 0.523 0.137
## P15STGBSC.F 0.460 0.399 0.215
## P15STGBSC.D 0.232 0.665 0.107
## P15STGBSC.B 0.695 0.223
## P15STGBSC.A 0.665 0.161 0.117
## P15STGBSC.C 0.305 0.241
## P25ST 0.243
## P26ST 0.115 0.294
## P67STC 0.201
## P43Nrecod_machismo
##
## MR1 MR3 MR2
## SS loadings 1.492 1.281 0.925
## Proportion Var 0.124 0.107 0.077
## Cumulative Var 0.124 0.231 0.308
AFE_BRA_Listwise_3_FACT <- AFEfitvarimax$loadings # salvar para depoi
Confiança igreja, visão sobre mercado, corrupção e machismo não fatoram (>0.4)
Factor 1 - Confiança Justiça eleitoral, Poder Judicial, Polícia e Forças Armadas - possível nome: Confiança Jurídico/Policial
Factor 2 - Confiança Justiça Eleitoral, Partido Político, Congresso - possível nome: Confiança Institucional democrática ???
Factor 3 - Adesão democrática
VAMOS VER ABAIXO COM A BASE MAIS “CHEIA”
bra3 -> base
fit<-princomp(base,cor=FALSE)#cor=FALSE = AFE - mais exigente
summary(fit)
## Importance of components:
## Comp.1 Comp.2 Comp.3 Comp.4 Comp.5
## Standard deviation 1.6141819 1.1067757 1.0676611 0.90879305 0.85994813
## Proportion of Variance 0.2873544 0.1350928 0.1257129 0.09108418 0.08155629
## Cumulative Proportion 0.2873544 0.4224472 0.5481601 0.63924431 0.72080060
## Comp.6 Comp.7 Comp.8 Comp.9 Comp.10
## Standard deviation 0.83694499 0.69059669 0.65872994 0.63101678 0.52065039
## Proportion of Variance 0.07725148 0.05259712 0.04785505 0.04391317 0.02989547
## Cumulative Proportion 0.79805208 0.85064920 0.89850425 0.94241742 0.97231289
## Comp.11 Comp.12
## Standard deviation 0.46393668 0.189249443
## Proportion of Variance 0.02373725 0.003949864
## Cumulative Proportion 0.99605014 1.000000000
3 também como em 3.3
AFEfitvarimax<-psych::fa(base, nfactors=3,
n.obs=1204,rotate="varimax",scores=TRUE)
AFEfitvarimax$values
## [1] 2.56837066 0.96616530 0.51740965 0.25329063 0.08448294 0.05407660
## [7] 0.02597227 -0.01564966 -0.03914376 -0.06336594 -0.13394616 -0.16668132
AFEfitvarimax$loadings
##
## Loadings:
## MR1 MR3 MR2
## P24ST 0.997
## P15STGBSC.H 0.426 0.455 0.121
## P15STGBSC.G 0.197 0.533 0.135
## P15STGBSC.F 0.506 0.380 0.151
## P15STGBSC.D 0.265 0.667 0.101
## P15STGBSC.B 0.708 0.152
## P15STGBSC.A 0.662 0.163
## P15STGBSC.C 0.320 0.216
## P25ST 0.255
## P26ST 0.181 0.112 0.258
## P67STC 0.173
## P43Nrecod_machismo
##
## MR1 MR3 MR2
## SS loadings 1.628 1.264 1.159
## Proportion Var 0.136 0.105 0.097
## Cumulative Var 0.136 0.241 0.338
AFE_BRA_MICE_3_FACT <- AFEfitvarimax$loadings # salvar para depois
os achados se assemelham à seção anterior (3.3)
preliminarmente os factores de confiança tiveram sinal esperado, os mais confiantes em um aspecto tendem a ser mais confiantes em geral. Outras issues não aparecem tão forte - a exceção é adesão democrática que fatorou sozinha nas duas AFES
Vamos repetir os resultados dos dois testes mais exigentes (MICE imputation e AFE) para os dois países -
AFE_URU_MICE_2_FACT
##
## Loadings:
## MR1 MR2
## P24ST 0.404
## P15STGBSC.H 0.738 0.144
## P15STGBSC.G 0.619 0.109
## P15STGBSC.F 0.659 0.199
## P15STGBSC.D 0.742 0.126
## P15STGBSC.B 0.292 0.547
## P15STGBSC.A 0.913
## P15STGBSC.C 0.355
## P25ST
## P26ST 0.146
## P67STC 0.334
## P43Nrecod_machismo
##
## MR1 MR2
## SS loadings 2.292 1.374
## Proportion Var 0.191 0.115
## Cumulative Var 0.191 0.306
AFE_BRA_MICE_3_FACT
##
## Loadings:
## MR1 MR3 MR2
## P24ST 0.997
## P15STGBSC.H 0.426 0.455 0.121
## P15STGBSC.G 0.197 0.533 0.135
## P15STGBSC.F 0.506 0.380 0.151
## P15STGBSC.D 0.265 0.667 0.101
## P15STGBSC.B 0.708 0.152
## P15STGBSC.A 0.662 0.163
## P15STGBSC.C 0.320 0.216
## P25ST 0.255
## P26ST 0.181 0.112 0.258
## P67STC 0.173
## P43Nrecod_machismo
##
## MR1 MR3 MR2
## SS loadings 1.628 1.264 1.159
## Proportion Var 0.136 0.105 0.097
## Cumulative Var 0.136 0.241 0.338
.