Introducción

Lo primero se procede a la carga de paquetes que puedan ser necesarios: * foreign para poder leer los ficheros de SPSS * lavaan para construir modelos SEM

Carga de datos

Se procede a leer los resultados de las encuestas a un data frame llamado ddd y cuyo resumen se muestra a continuación, previa eliminación de los registros que contengan datos NA:

setwd('/home/jb/git/Entrepreneur/')
# ddd = read.spss(file="Emprendimiento2016.sav",to.data.frame=TRUE)
# save(ddd,file="Emprendimiento2016.RData")
load(file="Emprendimiento2016.RData")
# summary(ddd)
jdx=apply(is.na(ddd),1,sum) == 0
ddna=ddd[jdx,]
colnames(ddna)= iconv(colnames(ddna),'utf-8','ascii',sub='')
summary(ddna)
##      CODIGO            UNI            PAIS          EDAD      
##  Min.   : 11002   UPM    :412   España  :412   Min.   :19.00  
##  1st Qu.: 21059   MILAN  :245   Italia  :727   1st Qu.:22.00  
##  Median : 41075   TUB    :213   México  :200   Median :23.00  
##  Mean   : 42867   PARMA  :202   Suecia  :221   Mean   :23.61  
##  3rd Qu.: 63016   MEXICO :200   Alemania:213   3rd Qu.:25.00  
##  Max.   :150452   POLIBA :140                  Max.   :52.00  
##                   (Other):361                                 
##     GENERO                 CARRERA       CURSO          PASNAC     
##  Hombre:1173   Organización    :456   último:1773   Min.   :1.000  
##  Mujer : 600   Industriales    :587                 1st Qu.:2.000  
##                Química         :330                 Median :2.000  
##                Ing. Civil      :400                 Mean   :2.617  
##                Ing. Informática:  0                 3rd Qu.:3.000  
##                                                     Max.   :6.000  
##                                                                    
##   PASNACPADRE     PASNACMADRE        CLASESOCIAL          ClaseSocial2
##  Min.   :1.000   Min.   :1.000   Baja      : 61   Baja-MedioBaja:797  
##  1st Qu.:2.000   1st Qu.:2.000   Media-Baja:736   Alta-MedioAlta:976  
##  Median :2.000   Median :2.000   Media-Alta:929                       
##  Mean   :2.605   Mean   :2.608   Alta      : 47                       
##  3rd Qu.:3.000   3rd Qu.:3.000                                        
##  Max.   :6.000   Max.   :6.000                                        
##                                                                       
##          ESTPADRE           ESTMADRE       OCUPACIONPADRE
##  Sin estudios:139   Sin estudios:154   Funcionario:405   
##  Secundaria  :480   Secundaria  :547   Empleado   :633   
##  FP          :395   FP          :400   Empresario :453   
##  Universidad :759   Universidad :672   Desempleado: 63   
##                                        Otro       :219   
##                                                          
##                                                          
##      OCUPACIONMADRE   ENTORNONEG    V2.1Individualismo       V2.2Feminidad
##  Funcionario:438    Min.   :0.000   Min.   :1.000      Muy Masculino:121  
##  Empleado   :537    1st Qu.:0.000   1st Qu.:3.000      Masculino    :225  
##  Empresario :210    Median :1.000   Median :4.000      Medio        :520  
##  Desempleado:298    Mean   :0.727   Mean   :3.813      Femenino     :627  
##  Otro       :290    3rd Qu.:1.000   3rd Qu.:5.000      Muy femenino :280  
##                     Max.   :2.000   Max.   :6.000                         
##                                                                           
##     V2.2MasculinidadINV       V2.3NoAversin      V2.3.AversinINV
##  Muy femenino :280      Alta aversión:331   Baja aversión: 97   
##  Femenino     :627      Aversión     :542   Poca aversión:301   
##  Medio        :520      Medio        :502   Medio        :502   
##  Masculino    :225      Poca aversión:301   Aversión     :542   
##  Muy Masculino:121      Baja aversión: 97   Alta aversión:331   
##                                                                 
##                                                                 
##            V2.4Colectivismo        V2.4IndividualismoINV
##  Muy Individualista: 83     Muy Colectivista  :270      
##  Individualista    :197     Colectivista      :693      
##  Medio             :530     Medio             :530      
##  Colectivista      :693     Individualista    :197      
##  Muy Colectivista  :270     Muy Individualista: 83      
##                                                         
##                                                         
##         V2.5Aversin       V2.6Masculinidad        V2.7Aversin 
##  Baja aversión:110   Muy femenino : 29     Baja aversión: 27  
##  Poca aversión:301   Femenino     : 98     Poca aversión:120  
##  Medio        :473   Medio        :389     Medio        :413  
##  Aversión     :493   Masculino    :726     Aversión     :741  
##  Alta aversión:396   Muy Masculino:531     Alta aversión:472  
##                                                               
##                                                               
##           V2.8Individualismo V2.9Innovacin      V2.10IT     
##  Muy Colectivista  : 29      Min.   :1.000   Min.   :1.000  
##  Colectivista      :127      1st Qu.:2.000   1st Qu.:1.000  
##  Medio             :386      Median :3.000   Median :2.000  
##  Individualista    :635      Mean   :3.092   Mean   :2.389  
##  Muy Individualista:596      3rd Qu.:4.000   3rd Qu.:3.000  
##                              Max.   :5.000   Max.   :5.000  
##                                                             
##  V3.1ACTFuturoAtractivo V3.2ACTOpciones    MediaACT      V3.3CONTFcil  
##  Min.   :1.000          Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000          1st Qu.:3.000   1st Qu.:3.500   1st Qu.:3.000  
##  Median :5.000          Median :4.000   Median :4.500   Median :4.000  
##  Mean   :4.917          Mean   :4.245   Mean   :4.581   Mean   :3.669  
##  3rd Qu.:6.000          3rd Qu.:5.000   3rd Qu.:6.000   3rd Qu.:5.000  
##  Max.   :7.000          Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                        
##  V3.4CONTPuedo     MediaCONT      V3.5IEListo      V3.6IEMeta   
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:2.500   1st Qu.:2.000   1st Qu.:2.000  
##  Median :4.000   Median :3.500   Median :3.000   Median :4.000  
##  Mean   :3.812   Mean   :3.741   Mean   :3.467   Mean   :3.699  
##  3rd Qu.:5.000   3rd Qu.:5.000   3rd Qu.:5.000   3rd Qu.:5.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##                                                                 
##  V3.7IEHarTodo   V3.8IEConvencido V3.9IEPensarSerio V3.10IEFirmeIntencin
##  Min.   :1.000   Min.   :1.000    Min.   :1.000     Min.   :1.000       
##  1st Qu.:2.000   1st Qu.:2.000    1st Qu.:2.000     1st Qu.:2.000       
##  Median :3.000   Median :3.000    Median :3.000     Median :3.000       
##  Mean   :3.671   Mean   :3.635    Mean   :3.676     Mean   :3.633       
##  3rd Qu.:5.000   3rd Qu.:5.000    3rd Qu.:5.000     3rd Qu.:5.000       
##  Max.   :7.000   Max.   :7.000    Max.   :7.000     Max.   :7.000       
##                                                                         
##     MediaIE      V3.11NSFamilia  V3.12NSAmigos   V3.12NSCompaeros
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000   
##  1st Qu.:2.167   1st Qu.:4.000   1st Qu.:4.000   1st Qu.:4.000   
##  Median :3.333   Median :6.000   Median :6.000   Median :5.000   
##  Mean   :3.630   Mean   :5.506   Mean   :5.415   Mean   :5.124   
##  3rd Qu.:5.000   3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:6.000   
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000   
##                                                                  
##  V3.14NSSociedad    MediaNS       V4.1FINPROP       V4.2ADM     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:4.250   1st Qu.:2.000   1st Qu.:1.000  
##  Median :5.000   Median :5.250   Median :2.000   Median :2.000  
##  Mean   :4.818   Mean   :5.216   Mean   :2.399   Mean   :2.223  
##  3rd Qu.:6.000   3rd Qu.:6.250   3rd Qu.:3.000   3rd Qu.:3.000  
##  Max.   :7.000   Max.   :7.000   Max.   :5.000   Max.   :5.000  
##                                                                 
##     V4.3JUV      V4.4CREDIT      V4.5FINPUB       V4.6JUV     
##  Min.   :1.0   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.0   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000  
##  Median :3.0   Median :2.000   Median :2.000   Median :3.000  
##  Mean   :2.9   Mean   :2.403   Mean   :2.342   Mean   :3.094  
##  3rd Qu.:4.0   3rd Qu.:3.000   3rd Qu.:3.000   3rd Qu.:4.000  
##  Max.   :5.0   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##                                                               
##     V4.7ADM       V4.8FINPROP       V4.9ADM         V4.10JUV    
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:2.000   1st Qu.:2.000   1st Qu.:1.000   1st Qu.:2.000  
##  Median :2.000   Median :2.000   Median :2.000   Median :2.000  
##  Mean   :2.346   Mean   :2.404   Mean   :2.136   Mean   :2.508  
##  3rd Qu.:3.000   3rd Qu.:3.000   3rd Qu.:3.000   3rd Qu.:3.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##                                                                 
##     V4.11ADM        V4.12EDU        V4.13JUV        V4.14ADM    
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000  
##  Median :2.000   Median :3.000   Median :3.000   Median :2.000  
##  Mean   :2.043   Mean   :2.755   Mean   :2.633   Mean   :2.459  
##  3rd Qu.:3.000   3rd Qu.:4.000   3rd Qu.:3.000   3rd Qu.:3.000  
##  Max.   :5.000   Max.   :5.000   Max.   :5.000   Max.   :5.000  
## 
ddf = ddna
for (i in (1:length(colnames(ddf)))[-c(1,4)]) {
  ddf[,i]=as.ordered(ddf[,i])
}
#
ddnaddf=ddna
ddnaddf[,'V2.4IndividualismoINV']=as.numeric(ddna[,'V2.4IndividualismoINV'])
obs.ddf=c('V2.1Individualismo','V2.4IndividualismoINV','V2.8Individualismo',
          'V2.2MasculinidadINV','V2.6Masculinidad',
          'V2.3.AversinINV','V2.5Aversin','V2.7Aversin', 
          'V3.1ACTFuturoAtractivo', 'V3.2ACTOpciones',
          'V3.3CONTFcil', 'V3.4CONTPuedo', 
          'V3.11NSFamilia', 'V3.12NSAmigos','V3.12NSCompaeros','V3.14NSSociedad',
          'V3.5IEListo', 'V3.6IEMeta','V3.7IEHarTodo', 'V3.8IEConvencido',
          'V3.9IEPensarSerio','V3.10IEFirmeIntencin')
# cr.poly=polychoric(ddnaddf[,obs.ddf])
# alpha(cr.poly$rho)
#
belief=63
ddnaddf[,belief]=NA
colnames(ddnaddf)[belief]="BELIEFS"
ddnaddf[ddnaddf$PAIS=="Alemania","BELIEFS"]=1
ddnaddf[ddnaddf$PAIS=="Suecia","BELIEFS"]=1
ddnaddf[ddnaddf$PAIS=="España","BELIEFS"]=2
ddnaddf[ddnaddf$PAIS=="Italia","BELIEFS"]=2
ddnaddf[ddnaddf$PAIS=="México","BELIEFS"]=2
#
kruskal.test(ddnaddf[,63],ddnaddf[,42])
## 
##  Kruskal-Wallis rank sum test
## 
## data:  ddnaddf[, 63] and ddnaddf[, 42]
## Kruskal-Wallis chi-squared = 37.568, df = 6, p-value = 1.364e-06
chisq.test(table(ddnaddf[,63],ddnaddf[,42]))
## 
##  Pearson's Chi-squared test
## 
## data:  table(ddnaddf[, 63], ddnaddf[, 42])
## X-squared = 37.589, df = 6, p-value = 1.351e-06
#
kruskal.test(ddna[,5],ddna[,42])
## 
##  Kruskal-Wallis rank sum test
## 
## data:  ddna[, 5] and ddna[, 42]
## Kruskal-Wallis chi-squared = 27.427, df = 6, p-value = 0.0001204
kruskal.test(ddna[,2],ddna[,42])
## 
##  Kruskal-Wallis rank sum test
## 
## data:  ddna[, 2] and ddna[, 42]
## Kruskal-Wallis chi-squared = 20.236, df = 6, p-value = 0.002514
kruskal.test(ddna[,5],ddna[,42])
## 
##  Kruskal-Wallis rank sum test
## 
## data:  ddna[, 5] and ddna[, 42]
## Kruskal-Wallis chi-squared = 27.427, df = 6, p-value = 0.0001204
chisq.test(table(ddna[,5],ddna[,42]))
## 
##  Pearson's Chi-squared test
## 
## data:  table(ddna[, 5], ddna[, 42])
## X-squared = 27.443, df = 6, p-value = 0.0001196
chisq.test(table(ddna[,5],ddna[,36]))
## 
##  Pearson's Chi-squared test
## 
## data:  table(ddna[, 5], ddna[, 36])
## X-squared = 9.7832, df = 12, p-value = 0.635
chisq.test(table(ddna[,5],ddna[,38]))
## 
##  Pearson's Chi-squared test
## 
## data:  table(ddna[, 5], ddna[, 38])
## X-squared = 21.744, df = 6, p-value = 0.001347
chisq.test(table(ddna[,5],ddna[,39]))
## 
##  Pearson's Chi-squared test
## 
## data:  table(ddna[, 5], ddna[, 39])
## X-squared = 10.39, df = 6, p-value = 0.1092
chisq.test(table(ddna[,5],ddna[,40]))
## 
##  Pearson's Chi-squared test
## 
## data:  table(ddna[, 5], ddna[, 40])
## X-squared = 11.3, df = 6, p-value = 0.07952
chisq.test(table(ddna[,5],ddna[,38]))
## 
##  Pearson's Chi-squared test
## 
## data:  table(ddna[, 5], ddna[, 38])
## X-squared = 21.744, df = 6, p-value = 0.001347

Análisis Factorial Confirmatorio. Modelo de Ajzen

Se procede a crear en modelo de Ajzen y a un análisis confirmatorio de datos. Partimos de las variables como factores

Modelado del caso de Ajzen con Ecuaciones Estructurales

Se va a constuir ahora un modelo de interdependencia con hipótesis de regresión sobre EI

#
mcv = round(cov(ddna[,c("V3.1ACTFuturoAtractivo","V3.2ACTOpciones","V3.11NSFamilia",
                        "V3.12NSAmigos","V3.12NSCompaeros","V3.14NSSociedad",
                        "V3.3CONTFcil","V3.4CONTPuedo","V3.5IEListo","V3.6IEMeta",
                        "V3.7IEHarTodo","V3.8IEConvencido","V3.9IEPensarSerio")]),1)
#
obs.variables=c('V3.1ACTFuturoAtractivo', 'V3.2ACTOpciones',
                'V3.11NSFamilia', 'V3.12NSAmigos', 'V3.14NSSociedad',
                'V3.3CONTFcil', 'V3.4CONTPuedo', 'V3.6IEMeta', 
                'V3.8IEConvencido', 'V3.10IEFirmeIntencin')
#
data = as.matrix(ddna[,obs.variables])
mcv = round(cov(data),1)
print(xtable(mcv),type="html")
V3.1ACTFuturoAtractivo V3.2ACTOpciones V3.11NSFamilia V3.12NSAmigos V3.14NSSociedad V3.3CONTFcil V3.4CONTPuedo V3.6IEMeta V3.8IEConvencido V3.10IEFirmeIntencin
V3.1ACTFuturoAtractivo 2.60 2.20 0.90 0.70 0.50 1.20 1.10 1.80 1.70 1.90
V3.2ACTOpciones 2.20 2.80 0.90 0.70 0.50 1.40 1.30 2.10 2.00 2.10
V3.11NSFamilia 0.90 0.90 2.40 1.60 1.00 0.70 0.80 0.90 0.90 1.00
V3.12NSAmigos 0.70 0.70 1.60 2.20 1.40 0.50 0.60 0.60 0.50 0.60
V3.14NSSociedad 0.50 0.50 1.00 1.40 2.80 0.40 0.40 0.40 0.30 0.40
V3.3CONTFcil 1.20 1.40 0.70 0.50 0.40 2.40 1.80 1.50 1.50 1.70
V3.4CONTPuedo 1.10 1.30 0.80 0.60 0.40 1.80 2.60 1.60 1.50 1.60
V3.6IEMeta 1.80 2.10 0.90 0.60 0.40 1.50 1.60 3.30 2.80 2.90
V3.8IEConvencido 1.70 2.00 0.90 0.50 0.30 1.50 1.50 2.80 3.40 3.10
V3.10IEFirmeIntencin 1.90 2.10 1.00 0.60 0.40 1.70 1.60 2.90 3.10 3.80
#
#
 ddold = ddna
 ddnaddf[,"V2.8Individualismo"]= as.numeric(ddna[,"V2.8Individualismo"])
 ddnaddf[,"V2.2MasculinidadINV"]= as.numeric(ddna[,"V2.2MasculinidadINV"])
 ddnaddf[,"V2.6Masculinidad"]= as.numeric(ddna[,"V2.6Masculinidad"])
 ddnaddf[,"V2.3.AversinINV"]= as.numeric(ddna[,"V2.3.AversinINV"])
 ddnaddf[,"V2.5Aversin"]= as.numeric(ddna[,"V2.5Aversin"])
 ddnaddf[,"V2.7Aversin"]= as.numeric(ddna[,"V2.7Aversin"])
#
 obs.variables2=c('V3.1ACTFuturoAtractivo', 'V3.2ACTOpciones','V2.1Individualismo',
                'V3.11NSFamilia', 'V3.12NSAmigos', 'V3.14NSSociedad',
                'V3.3CONTFcil', 'V3.4CONTPuedo', 'V3.6IEMeta', 'V3.8IEConvencido',
                'V3.10IEFirmeIntencin', 'V2.8Individualismo',
                'V2.2MasculinidadINV', 'V2.6Masculinidad', 
                'V2.5Aversin','V2.7Aversin')
#
mcv = round(cov(ddnaddf[,obs.variables2]),1)

Resumen de las variables para protestantes

summary(ddnaddf[ddnaddf[,"BELIEFS"]==1,obs.ddf])
##  V2.1Individualismo V2.4IndividualismoINV V2.8Individualismo
##  Min.   :1.000      Min.   :1.00          Min.   :1.000     
##  1st Qu.:3.000      1st Qu.:2.00          1st Qu.:3.000     
##  Median :4.000      Median :2.00          Median :4.000     
##  Mean   :3.982      Mean   :2.27          Mean   :3.984     
##  3rd Qu.:5.000      3rd Qu.:3.00          3rd Qu.:5.000     
##  Max.   :6.000      Max.   :5.00          Max.   :5.000     
##  V2.2MasculinidadINV V2.6Masculinidad V2.3.AversinINV  V2.5Aversin   
##  Min.   :1.000       Min.   :1.000    Min.   :1.00    Min.   :1.000  
##  1st Qu.:2.000       1st Qu.:3.000    1st Qu.:2.00    1st Qu.:2.000  
##  Median :2.000       Median :4.000    Median :3.00    Median :3.000  
##  Mean   :2.267       Mean   :3.735    Mean   :3.09    Mean   :3.168  
##  3rd Qu.:3.000       3rd Qu.:4.000    3rd Qu.:4.00    3rd Qu.:4.000  
##  Max.   :5.000       Max.   :5.000    Max.   :5.00    Max.   :5.000  
##   V2.7Aversin    V3.1ACTFuturoAtractivo V3.2ACTOpciones  V3.3CONTFcil  
##  Min.   :1.000   Min.   :1.0            Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:4.0            1st Qu.:3.000   1st Qu.:3.000  
##  Median :4.000   Median :5.0            Median :4.000   Median :4.000  
##  Mean   :3.758   Mean   :4.8            Mean   :4.124   Mean   :3.749  
##  3rd Qu.:4.000   3rd Qu.:6.0            3rd Qu.:5.000   3rd Qu.:5.000  
##  Max.   :5.000   Max.   :7.0            Max.   :7.000   Max.   :7.000  
##  V3.4CONTPuedo   V3.11NSFamilia  V3.12NSAmigos   V3.12NSCompaeros
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000   
##  1st Qu.:3.000   1st Qu.:5.000   1st Qu.:5.000   1st Qu.:4.000   
##  Median :4.000   Median :6.000   Median :6.000   Median :5.000   
##  Mean   :3.947   Mean   :5.528   Mean   :5.475   Mean   :5.014   
##  3rd Qu.:5.000   3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:6.000   
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000   
##  V3.14NSSociedad  V3.5IEListo      V3.6IEMeta    V3.7IEHarTodo  
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:1.000   1st Qu.:2.000   1st Qu.:2.000  
##  Median :5.000   Median :3.000   Median :3.000   Median :3.000  
##  Mean   :4.763   Mean   :3.007   Mean   :3.396   Mean   :3.097  
##  3rd Qu.:6.000   3rd Qu.:4.000   3rd Qu.:5.000   3rd Qu.:4.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##  V3.8IEConvencido V3.9IEPensarSerio V3.10IEFirmeIntencin
##  Min.   :1.00     Min.   :1.00      Min.   :1.000       
##  1st Qu.:2.00     1st Qu.:2.00      1st Qu.:2.000       
##  Median :3.00     Median :3.00      Median :3.000       
##  Mean   :3.15     Mean   :3.41      Mean   :3.279       
##  3rd Qu.:4.00     3rd Qu.:5.00      3rd Qu.:5.000       
##  Max.   :7.00     Max.   :7.00      Max.   :7.000

Resumen de las variables para Católicos

summary(ddnaddf[ddnaddf[,"BELIEFS"]==2,obs.ddf])
##  V2.1Individualismo V2.4IndividualismoINV V2.8Individualismo
##  Min.   :1.000      Min.   :1.000         Min.   :1.000     
##  1st Qu.:3.000      1st Qu.:2.000         1st Qu.:3.000     
##  Median :4.000      Median :2.000         Median :4.000     
##  Mean   :3.758      Mean   :2.587         Mean   :3.907     
##  3rd Qu.:5.000      3rd Qu.:3.000         3rd Qu.:5.000     
##  Max.   :5.000      Max.   :5.000         Max.   :5.000     
##  V2.2MasculinidadINV V2.6Masculinidad V2.3.AversinINV  V2.5Aversin   
##  Min.   :1.0         Min.   :1.000    Min.   :1.0     Min.   :1.000  
##  1st Qu.:2.0         1st Qu.:3.000    1st Qu.:3.0     1st Qu.:3.000  
##  Median :3.0         Median :4.000    Median :4.0     Median :4.000  
##  Mean   :2.7         Mean   :3.981    Mean   :3.5     Mean   :3.516  
##  3rd Qu.:3.0         3rd Qu.:5.000    3rd Qu.:4.0     3rd Qu.:4.000  
##  Max.   :5.0         Max.   :5.000    Max.   :5.0     Max.   :5.000  
##   V2.7Aversin    V3.1ACTFuturoAtractivo V3.2ACTOpciones  V3.3CONTFcil  
##  Min.   :1.000   Min.   :1.000          Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:4.000          1st Qu.:3.000   1st Qu.:2.000  
##  Median :4.000   Median :5.000          Median :4.000   Median :4.000  
##  Mean   :3.883   Mean   :4.955          Mean   :4.285   Mean   :3.643  
##  3rd Qu.:5.000   3rd Qu.:6.000          3rd Qu.:5.500   3rd Qu.:5.000  
##  Max.   :5.000   Max.   :7.000          Max.   :7.000   Max.   :7.000  
##  V3.4CONTPuedo   V3.11NSFamilia  V3.12NSAmigos   V3.12NSCompaeros
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.00    
##  1st Qu.:3.000   1st Qu.:4.000   1st Qu.:4.000   1st Qu.:4.00    
##  Median :4.000   Median :6.000   Median :6.000   Median :5.00    
##  Mean   :3.768   Mean   :5.499   Mean   :5.396   Mean   :5.16    
##  3rd Qu.:5.000   3rd Qu.:7.000   3rd Qu.:7.000   3rd Qu.:6.00    
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.00    
##  V3.14NSSociedad  V3.5IEListo      V3.6IEMeta    V3.7IEHarTodo  
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:4.000   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:2.000  
##  Median :5.000   Median :3.000   Median :4.000   Median :4.000  
##  Mean   :4.836   Mean   :3.616   Mean   :3.798   Mean   :3.857  
##  3rd Qu.:6.000   3rd Qu.:5.000   3rd Qu.:5.000   3rd Qu.:5.000  
##  Max.   :7.000   Max.   :7.000   Max.   :7.000   Max.   :7.000  
##  V3.8IEConvencido V3.9IEPensarSerio V3.10IEFirmeIntencin
##  Min.   :1.000    Min.   :1.000     Min.   :1.000       
##  1st Qu.:2.000    1st Qu.:2.000     1st Qu.:2.000       
##  Median :4.000    Median :4.000     Median :4.000       
##  Mean   :3.792    Mean   :3.763     Mean   :3.748       
##  3rd Qu.:5.000    3rd Qu.:5.000     3rd Qu.:5.000       
##  Max.   :7.000    Max.   :7.000     Max.   :7.000
EI.AJZEN.model13 = '
                 # Variables Latentes
                CHI =~ V2.8Individualismo 
                CHM =~ V2.2MasculinidadINV + V2.6Masculinidad
                CRA =~ V2.5Aversin + V2.7Aversin
                AtB =~ V3.1ACTFuturoAtractivo + V3.2ACTOpciones
                SN  =~ V3.11NSFamilia + V3.12NSAmigos + V3.14NSSociedad
                PBC =~ V3.3CONTFcil + V3.4CONTPuedo 
                EI  =~ V3.6IEMeta + V3.8IEConvencido + V3.10IEFirmeIntencin
               # Regresión
                SN  ~ CHI + CRA  
                AtB ~ CHI + CHM + CRA + SN
                PBC ~ CHI + CHM + SN
                EI  ~ SN + PBC + AtB
               # Correlación de Residuos
                CHI ~~ CHI 
                CHM ~~ CHM 
                CRA ~~ CRA
                AtB ~~ AtB
                PBC ~~ PBC
                SN  ~~ SN
                EI  ~~ 1 * EI
        '
fitm13 = lavaan::sem(EI.AJZEN.model13, data =ddnaddf[,obs.variables2], std.lv=TRUE, 
                     sample.cov=mcv, estimator = "ML", start="Mplus",  
                     missing = "listwise", bootstrap=10000)
summary(fitm13,fit.measures=TRUE,rsquare=TRUE)
## lavaan (0.5-20) converged normally after 110 iterations
## 
##   Number of observations                          1773
## 
##   Estimator                                         ML
##   Minimum Function Test Statistic              764.719
##   Degrees of freedom                                76
##   P-value (Chi-square)                           0.000
## 
## Model test baseline model:
## 
##   Minimum Function Test Statistic            13153.299
##   Degrees of freedom                               105
##   P-value                                        0.000
## 
## User model versus baseline model:
## 
##   Comparative Fit Index (CFI)                    0.947
##   Tucker-Lewis Index (TLI)                       0.927
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -40888.835
##   Loglikelihood unrestricted model (H1)     -40506.476
## 
##   Number of free parameters                         44
##   Akaike (AIC)                               81865.670
##   Bayesian (BIC)                             82106.809
##   Sample-size adjusted Bayesian (BIC)        81967.024
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.071
##   90 Percent Confidence Interval          0.067  0.076
##   P-value RMSEA <= 0.05                          0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.067
## 
## Parameter Estimates:
## 
##   Information                                 Expected
##   Standard Errors                             Standard
## 
## Latent Variables:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI =~                                              
##     V2.8Individlsm    0.991    0.017   59.548    0.000
##   CHM =~                                              
##     V2.2MsclnddINV    0.250    0.031    8.107    0.000
##     V2.6Masculindd   -0.023    0.026   -0.898    0.369
##   CRA =~                                              
##     V2.5Aversin       0.388    0.070    5.576    0.000
##     V2.7Aversin       0.874    0.145    6.025    0.000
##   AtB =~                                              
##     V3.1ACTFtrAtrc    0.947    0.067   14.111    0.000
##     V3.2ACTOpcions    1.087    0.077   14.169    0.000
##   SN =~                                               
##     V3.11NSFamilia    1.129    0.035   32.326    0.000
##     V3.12NSAmigos     1.354    0.033   41.033    0.000
##     V3.14NSSociedd    0.972    0.038   25.520    0.000
##   PBC =~                                              
##     V3.3CONTFcil      0.610    0.171    3.567    0.000
##     V3.4CONTPuedo     0.586    0.164    3.574    0.000
##   EI =~                                               
##     V3.6IEMeta        0.958    0.024   39.845    0.000
##     V3.8IEConvencd    1.000    0.024   41.367    0.000
##     V3.10IEFrmIntn    1.037    0.025   40.786    0.000
## 
## Regressions:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   SN ~                                                
##     CHI               0.170    0.026    6.434    0.000
##     CRA               0.061    0.030    2.055    0.040
##   AtB ~                                               
##     CHI               0.453    0.130    3.488    0.000
##     CHM               1.005    0.155    6.506    0.000
##     CRA               0.129    0.044    2.920    0.003
##     SN                0.484    0.050    9.598    0.000
##   PBC ~                                               
##     CHI               0.864    0.414    2.088    0.037
##     CHM               2.052    0.755    2.719    0.007
##     SN                0.690    0.202    3.414    0.001
##   EI ~                                                
##     SN               -0.036    0.031   -1.142    0.253
##     PBC               0.253    0.073    3.462    0.001
##     AtB               0.671    0.057   11.845    0.000
## 
## Covariances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI ~~                                              
##     CHM              -0.409    0.099   -4.135    0.000
##     CRA               0.172    0.037    4.658    0.000
##   CHM ~~                                              
##     CRA              -0.128    0.039   -3.270    0.001
## 
## Variances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##     CHI               1.000                           
##     CHM               1.000                           
##     CRA               1.000                           
##     AtB               1.000                           
##     PBC               1.000                           
##     SN                1.000                           
##     EI                1.000                           
##     V2.8Individlsm    0.000                           
##     V2.2MsclnddINV    1.158    0.040   29.116    0.000
##     V2.6Masculindd    0.880    0.030   29.769    0.000
##     V2.5Aversin       1.253    0.065   19.277    0.000
##     V2.7Aversin       0.121    0.252    0.480    0.631
##     V3.1ACTFtrAtrc    0.712    0.036   19.699    0.000
##     V3.2ACTOpcions    0.281    0.037    7.613    0.000
##     V3.11NSFamilia    1.099    0.053   20.733    0.000
##     V3.12NSAmigos     0.331    0.055    6.006    0.000
##     V3.14NSSociedd    1.775    0.067   26.628    0.000
##     V3.3CONTFcil      0.584    0.048   12.183    0.000
##     V3.4CONTPuedo     0.864    0.050   17.356    0.000
##     V3.6IEMeta        0.650    0.029   22.240    0.000
##     V3.8IEConvencd    0.454    0.025   17.913    0.000
##     V3.10IEFrmIntn    0.596    0.030   19.996    0.000
## 
## R-Square:
##                    Estimate
##     AtB               0.525
##     PBC               0.800
##     SN                0.035
##     EI                0.659
##     V2.8Individlsm    1.000
##     V2.2MsclnddINV    0.051
##     V2.6Masculindd    0.001
##     V2.5Aversin       0.107
##     V2.7Aversin       0.863
##     V3.1ACTFtrAtrc    0.726
##     V3.2ACTOpcions    0.899
##     V3.11NSFamilia    0.546
##     V3.12NSAmigos     0.852
##     V3.14NSSociedd    0.355
##     V3.3CONTFcil      0.761
##     V3.4CONTPuedo     0.665
##     V3.6IEMeta        0.806
##     V3.8IEConvencd    0.866
##     V3.10IEFrmIntn    0.841
semPaths(fitm13, what="par", ask=FALSE, layout="tree2",residuals=TRUE, style="OpenMx",
         sizeMan=8, edge.label.cex=0.9, thresholds = TRUE)

#
fit13Pr = lavaan::sem(EI.AJZEN.model13, data =ddnaddf[ddnaddf[,"BELIEFS"]==1,
                     obs.variables2], std.lv=TRUE, 
                     sample.cov=mcv, estimator = "ML", start="Mplus",  
                     missing = "listwise", bootstrap=10000)
## Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING: could not compute standard errors!
##   lavaan NOTE: this may be a symptom that the model is not identified.
## Warning in lav_object_post_check(lavobject): lavaan WARNING: some estimated
## variances are negative
## Warning in lav_object_post_check(lavobject): lavaan WARNING: observed
## variable error term matrix (theta) is not positive definite; use
## inspect(fit,"theta") to investigate.
summary(fit13Pr,fit.measures=TRUE,rsquare=TRUE)
## lavaan (0.5-20) converged normally after 1504 iterations
## 
##   Number of observations                           434
## 
##   Estimator                                         ML
##   Minimum Function Test Statistic              186.775
##   Degrees of freedom                                76
##   P-value (Chi-square)                           0.000
## 
## Model test baseline model:
## 
##   Minimum Function Test Statistic             3331.969
##   Degrees of freedom                               105
##   P-value                                        0.000
## 
## User model versus baseline model:
## 
##   Comparative Fit Index (CFI)                    0.966
##   Tucker-Lewis Index (TLI)                       0.953
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -9703.564
##   Loglikelihood unrestricted model (H1)      -9610.177
## 
##   Number of free parameters                         44
##   Akaike (AIC)                               19495.128
##   Bayesian (BIC)                             19674.342
##   Sample-size adjusted Bayesian (BIC)        19534.710
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.058
##   90 Percent Confidence Interval          0.048  0.069
##   P-value RMSEA <= 0.05                          0.102
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.054
## 
## Parameter Estimates:
## 
##   Information                                 Expected
##   Standard Errors                             Standard
## 
## Latent Variables:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI =~                                              
##     V2.8Individlsm    0.922       NA                  
##   CHM =~                                              
##     V2.2MsclnddINV   -0.086       NA                  
##     V2.6Masculindd    0.128       NA                  
##   CRA =~                                              
##     V2.5Aversin       2.100       NA                  
##     V2.7Aversin       0.180       NA                  
##   AtB =~                                              
##     V3.1ACTFtrAtrc    0.014       NA                  
##     V3.2ACTOpcions    0.017       NA                  
##   SN =~                                               
##     V3.11NSFamilia    1.053       NA                  
##     V3.12NSAmigos     1.202       NA                  
##     V3.14NSSociedd    0.957       NA                  
##   PBC =~                                              
##     V3.3CONTFcil      0.970       NA                  
##     V3.4CONTPuedo     0.843       NA                  
##   EI =~                                               
##     V3.6IEMeta        0.923       NA                  
##     V3.8IEConvencd    1.000       NA                  
##     V3.10IEFrmIntn    1.038       NA                  
## 
## Regressions:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   SN ~                                                
##     CHI               0.156       NA                  
##     CRA              -0.055       NA                  
##   AtB ~                                               
##     CHI            -147.703       NA                  
##     CHM             174.621       NA                  
##     CRA              -2.876       NA                  
##     SN               30.419       NA                  
##   PBC ~                                               
##     CHI              -1.501       NA                  
##     CHM               1.769       NA                  
##     SN                0.488       NA                  
##   EI ~                                                
##     SN               -0.155       NA                  
##     PBC               0.328       NA                  
##     AtB               0.011       NA                  
## 
## Covariances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI ~~                                              
##     CHM               0.850       NA                  
##     CRA              -0.022       NA                  
##   CHM ~~                                              
##     CRA               0.021       NA                  
## 
## Variances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##     CHI               1.000                           
##     CHM               1.000                           
##     CRA               1.000                           
##     AtB               1.000                           
##     PBC               1.000                           
##     SN                1.000                           
##     EI                1.000                           
##     V2.8Individlsm    0.000                           
##     V2.2MsclnddINV    0.875       NA                  
##     V2.6Masculindd    0.833       NA                  
##     V2.5Aversin      -2.928       NA                  
##     V2.7Aversin       0.838       NA                  
##     V3.1ACTFtrAtrc    0.747       NA                  
##     V3.2ACTOpcions    0.133       NA                  
##     V3.11NSFamilia    1.073       NA                  
##     V3.12NSAmigos     0.349       NA                  
##     V3.14NSSociedd    1.512       NA                  
##     V3.3CONTFcil      0.354       NA                  
##     V3.4CONTPuedo     0.988       NA                  
##     V3.6IEMeta        0.630       NA                  
##     V3.8IEConvencd    0.439       NA                  
##     V3.10IEFrmIntn    0.473       NA                  
## 
## R-Square:
##                    Estimate
##     AtB               1.000
##     PBC               0.526
##     SN                0.027
##     EI                0.653
##     V2.8Individlsm    1.000
##     V2.2MsclnddINV    0.008
##     V2.6Masculindd    0.019
##     V2.5Aversin          NA
##     V2.7Aversin       0.037
##     V3.1ACTFtrAtrc    0.703
##     V3.2ACTOpcions    0.951
##     V3.11NSFamilia    0.515
##     V3.12NSAmigos     0.810
##     V3.14NSSociedd    0.383
##     V3.3CONTFcil      0.849
##     V3.4CONTPuedo     0.603
##     V3.6IEMeta        0.796
##     V3.8IEConvencd    0.868
##     V3.10IEFrmIntn    0.868
semPaths(fit13Pr, what="par", ask=FALSE, layout="tree2",residuals=TRUE, style="OpenMx",
         sizeMan=8, edge.label.cex=0.9, thresholds = TRUE)

#
fit13Ct = lavaan::sem(EI.AJZEN.model13, data =ddnaddf[ddnaddf[,"BELIEFS"]==2,
                     obs.variables2], std.lv=TRUE, 
                     sample.cov=mcv, estimator = "ML", start="Mplus",  
                     missing = "listwise", bootstrap=10000)
summary(fit13Ct,fit.measures=TRUE,rsquare=TRUE)
## lavaan (0.5-20) converged normally after  71 iterations
## 
##   Number of observations                          1339
## 
##   Estimator                                         ML
##   Minimum Function Test Statistic              657.146
##   Degrees of freedom                                76
##   P-value (Chi-square)                           0.000
## 
## Model test baseline model:
## 
##   Minimum Function Test Statistic             9986.755
##   Degrees of freedom                               105
##   P-value                                        0.000
## 
## User model versus baseline model:
## 
##   Comparative Fit Index (CFI)                    0.941
##   Tucker-Lewis Index (TLI)                       0.919
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -31019.233
##   Loglikelihood unrestricted model (H1)     -30690.659
## 
##   Number of free parameters                         44
##   Akaike (AIC)                               62126.465
##   Bayesian (BIC)                             62355.251
##   Sample-size adjusted Bayesian (BIC)        62215.482
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.076
##   90 Percent Confidence Interval          0.070  0.081
##   P-value RMSEA <= 0.05                          0.000
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.071
## 
## Parameter Estimates:
## 
##   Information                                 Expected
##   Standard Errors                             Standard
## 
## Latent Variables:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI =~                                              
##     V2.8Individlsm    1.012    0.020   51.749    0.000
##   CHM =~                                              
##     V2.2MsclnddINV    0.319    0.037    8.504    0.000
##     V2.6Masculindd   -0.010    0.030   -0.320    0.749
##   CRA =~                                              
##     V2.5Aversin       0.410    0.062    6.616    0.000
##     V2.7Aversin       0.770    0.103    7.458    0.000
##   AtB =~                                              
##     V3.1ACTFtrAtrc    0.987    0.059   16.666    0.000
##     V3.2ACTOpcions    1.114    0.066   16.797    0.000
##   SN =~                                               
##     V3.11NSFamilia    1.148    0.040   28.385    0.000
##     V3.12NSAmigos     1.402    0.039   36.235    0.000
##     V3.14NSSociedd    0.978    0.044   22.038    0.000
##   PBC =~                                              
##     V3.3CONTFcil      0.605    0.156    3.875    0.000
##     V3.4CONTPuedo     0.605    0.156    3.880    0.000
##   EI =~                                               
##     V3.6IEMeta        0.937    0.028   33.752    0.000
##     V3.8IEConvencd    0.960    0.027   34.931    0.000
##     V3.10IEFrmIntn    0.999    0.029   34.235    0.000
## 
## Regressions:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   SN ~                                                
##     CHI               0.166    0.031    5.354    0.000
##     CRA               0.077    0.038    2.033    0.042
##   AtB ~                                               
##     CHI               0.270    0.095    2.841    0.005
##     CHM               0.878    0.120    7.293    0.000
##     CRA               0.144    0.053    2.719    0.007
##     SN                0.470    0.050    9.468    0.000
##   PBC ~                                               
##     CHI               0.515    0.267    1.927    0.054
##     CHM               1.922    0.642    2.991    0.003
##     SN                0.664    0.184    3.613    0.000
##   EI ~                                                
##     SN                0.003    0.036    0.070    0.944
##     PBC               0.294    0.079    3.744    0.000
##     AtB               0.683    0.055   12.441    0.000
## 
## Covariances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI ~~                                              
##     CHM              -0.252    0.095   -2.638    0.008
##     CRA               0.243    0.042    5.789    0.000
##   CHM ~~                                              
##     CRA              -0.162    0.049   -3.335    0.001
## 
## Variances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##     CHI               1.000                           
##     CHM               1.000                           
##     CRA               1.000                           
##     AtB               1.000                           
##     PBC               1.000                           
##     SN                1.000                           
##     EI                1.000                           
##     V2.8Individlsm    0.000                           
##     V2.2MsclnddINV    1.182    0.048   24.736    0.000
##     V2.6Masculindd    0.876    0.034   25.874    0.000
##     V2.5Aversin       1.181    0.064   18.575    0.000
##     V2.7Aversin       0.293    0.156    1.881    0.060
##     V3.1ACTFtrAtrc    0.701    0.043   16.404    0.000
##     V3.2ACTOpcions    0.325    0.044    7.395    0.000
##     V3.11NSFamilia    1.116    0.062   18.022    0.000
##     V3.12NSAmigos     0.311    0.066    4.679    0.000
##     V3.14NSSociedd    1.855    0.079   23.359    0.000
##     V3.3CONTFcil      0.673    0.055   12.226    0.000
##     V3.4CONTPuedo     0.804    0.058   13.953    0.000
##     V3.6IEMeta        0.655    0.034   19.157    0.000
##     V3.8IEConvencd    0.442    0.029   15.390    0.000
##     V3.10IEFrmIntn    0.641    0.036   17.976    0.000
## 
## R-Square:
##                    Estimate
##     AtB               0.492
##     PBC               0.796
##     SN                0.038
##     EI                0.678
##     V2.8Individlsm    1.000
##     V2.2MsclnddINV    0.079
##     V2.6Masculindd    0.000
##     V2.5Aversin       0.125
##     V2.7Aversin       0.669
##     V3.1ACTFtrAtrc    0.732
##     V3.2ACTOpcions    0.883
##     V3.11NSFamilia    0.551
##     V3.12NSAmigos     0.868
##     V3.14NSSociedd    0.349
##     V3.3CONTFcil      0.727
##     V3.4CONTPuedo     0.691
##     V3.6IEMeta        0.806
##     V3.8IEConvencd    0.866
##     V3.10IEFrmIntn    0.829
semPaths(fit13Ct, what="par", ask=FALSE, layout="tree2",residuals=TRUE, style="OpenMx",
         sizeMan=8, edge.label.cex=0.9, thresholds = TRUE)

#

Como el modelo de Protestantes es inestable para AtB, vamos a reformular ese modelo

#

EI.AJZEN.model23 = '
                 # Variables Latentes
                CHI =~ V2.8Individualismo 
                CHM =~ V2.2MasculinidadINV + V2.6Masculinidad
                CRA =~ V2.5Aversin + V2.7Aversin
                SN  =~ V3.11NSFamilia + V3.12NSAmigos + V3.14NSSociedad
                PBC =~ V3.3CONTFcil + V3.4CONTPuedo 
                EI  =~ V3.6IEMeta + V3.8IEConvencido + V3.10IEFirmeIntencin
               # Regresión
                SN  ~ CHI + CRA  
                PBC ~ CHI + CHM + SN
                EI  ~ SN + PBC 
               # Correlación de Residuos
                CHI ~~ CHI 
                CHM ~~ CHM 
                CRA ~~ CRA
                PBC ~~ PBC
                SN  ~~ SN
                EI  ~~ 1 * EI
        '
fitm23 = lavaan::sem(EI.AJZEN.model23, data =ddnaddf[,obs.variables2], std.lv=TRUE, 
                     sample.cov=mcv, estimator = "ML", start="Mplus",  
                     missing = "listwise", bootstrap=10000)
## Warning in lavaan::lavaan(model = EI.AJZEN.model23, data = ddnaddf[,
## obs.variables2], : lavaan WARNING: model has NOT converged!
summary(fitm23,fit.measures=TRUE,rsquare=TRUE)
## ** WARNING ** lavaan (0.5-20) did NOT converge after 10000 iterations
## ** WARNING ** Estimates below are most likely unreliable
## 
##   Number of observations                          1773
## 
##   Estimator                                         ML
##   Minimum Function Test Statistic                   NA
##   Degrees of freedom                                NA
##   P-value                                           NA
## Warning in .local(object, ...): lavaan WARNING: fit measures not available if model did not converge
## 
## Parameter Estimates:
## 
##   Information                                 Expected
##   Standard Errors                             Standard
## 
## Latent Variables:
##                    Estimate   Std.Err  Z-value  P(>|z|)
##   CHI =~                                               
##     V2.8Individlsm     0.991       NA                  
##   CHM =~                                               
##     V2.2MsclnddINV     0.004       NA                  
##     V2.6Masculindd    34.883       NA                  
##   CRA =~                                               
##     V2.5Aversin        0.541       NA                  
##     V2.7Aversin        0.615       NA                  
##   SN =~                                                
##     V3.11NSFamilia     1.121       NA                  
##     V3.12NSAmigos      1.356       NA                  
##     V3.14NSSociedd     0.967       NA                  
##   PBC =~                                               
##     V3.3CONTFcil       1.279       NA                  
##     V3.4CONTPuedo      1.262       NA                  
##   EI =~                                                
##     V3.6IEMeta         1.184       NA                  
##     V3.8IEConvencd     1.251       NA                  
##     V3.10IEFrmIntn     1.293       NA                  
## 
## Regressions:
##                    Estimate   Std.Err  Z-value  P(>|z|)
##   SN ~                                                 
##     CHI                0.159       NA                  
##     CRA                0.098       NA                  
##   PBC ~                                                
##     CHI                0.016       NA                  
##     CHM                0.001       NA                  
##     SN                 0.319       NA                  
##   EI ~                                                 
##     SN                 0.098       NA                  
##     PBC                0.863       NA                  
## 
## Covariances:
##                    Estimate   Std.Err  Z-value  P(>|z|)
##   CHI ~~                                               
##     CHM                0.005       NA                  
##     CRA                0.213       NA                  
##   CHM ~~                                               
##     CRA                0.016       NA                  
## 
## Variances:
##                    Estimate   Std.Err  Z-value  P(>|z|)
##     CHI                1.000                           
##     CHM                1.000                           
##     CRA                1.000                           
##     PBC                1.000                           
##     SN                 1.000                           
##     EI                 1.000                           
##     V2.8Individlsm     0.000                           
##     V2.2MsclnddINV     1.220       NA                  
##     V2.6Masculindd -1215.958       NA                  
##     V2.5Aversin        1.111       NA                  
##     V2.7Aversin        0.507       NA                  
##     V3.11NSFamilia     1.110       NA                  
##     V3.12NSAmigos      0.314       NA                  
##     V3.14NSSociedd     1.779       NA                  
##     V3.3CONTFcil       0.630       NA                  
##     V3.4CONTPuedo      0.816       NA                  
##     V3.6IEMeta         0.691       NA                  
##     V3.8IEConvencd     0.425       NA                  
##     V3.10IEFrmIntn     0.586       NA                  
## 
## R-Square:
##                    Estimate 
##     PBC                0.098
##     SN                 0.040
##     EI                 0.472
##     V2.8Individlsm     1.000
##     V2.2MsclnddINV     0.000
##     V2.6Masculindd        NA
##     V2.5Aversin        0.208
##     V2.7Aversin        0.427
##     V3.11NSFamilia     0.541
##     V3.12NSAmigos      0.859
##     V3.14NSSociedd     0.354
##     V3.3CONTFcil       0.742
##     V3.4CONTPuedo      0.684
##     V3.6IEMeta         0.793
##     V3.8IEConvencd     0.875
##     V3.10IEFrmIntn     0.844
semPaths(fitm23, what="par", ask=FALSE, layout="tree2",residuals=TRUE, style="OpenMx",
         sizeMan=8, edge.label.cex=0.9, thresholds = TRUE)

#
fit23Pr = lavaan::sem(EI.AJZEN.model23, data =ddnaddf[ddnaddf[,"BELIEFS"]==1,
                     obs.variables2], std.lv=TRUE, 
                     sample.cov=mcv, estimator = "ML", start="Mplus",  
                     missing = "listwise", bootstrap=10000)
## Warning in lav_object_post_check(lavobject): lavaan WARNING: some estimated
## variances are negative
## Warning in lav_object_post_check(lavobject): lavaan WARNING: observed
## variable error term matrix (theta) is not positive definite; use
## inspect(fit,"theta") to investigate.
summary(fit23Pr,fit.measures=TRUE,rsquare=TRUE)
## lavaan (0.5-20) converged normally after 652 iterations
## 
##   Number of observations                           434
## 
##   Estimator                                         ML
##   Minimum Function Test Statistic               98.886
##   Degrees of freedom                                56
##   P-value (Chi-square)                           0.000
## 
## Model test baseline model:
## 
##   Minimum Function Test Statistic             2373.062
##   Degrees of freedom                                78
##   P-value                                        0.000
## 
## User model versus baseline model:
## 
##   Comparative Fit Index (CFI)                    0.981
##   Tucker-Lewis Index (TLI)                       0.974
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -8489.243
##   Loglikelihood unrestricted model (H1)      -8439.800
## 
##   Number of free parameters                         35
##   Akaike (AIC)                               17048.486
##   Bayesian (BIC)                             17191.042
##   Sample-size adjusted Bayesian (BIC)        17079.971
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.042
##   90 Percent Confidence Interval          0.028  0.055
##   P-value RMSEA <= 0.05                          0.828
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.047
## 
## Parameter Estimates:
## 
##   Information                                 Expected
##   Standard Errors                             Standard
## 
## Latent Variables:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI =~                                              
##     V2.8Individlsm    0.922    0.031   29.462    0.000
##   CHM =~                                              
##     V2.2MsclnddINV    0.022    0.269    0.081    0.936
##     V2.6Masculindd    4.173   51.218    0.081    0.935
##   CRA =~                                              
##     V2.5Aversin       0.684    0.096    7.137    0.000
##     V2.7Aversin       0.552    0.076    7.274    0.000
##   SN =~                                               
##     V3.11NSFamilia    1.057    0.069   15.252    0.000
##     V3.12NSAmigos     1.205    0.063   19.269    0.000
##     V3.14NSSociedd    0.955    0.074   12.947    0.000
##   PBC =~                                              
##     V3.3CONTFcil      1.315    0.064   20.450    0.000
##     V3.4CONTPuedo     1.163    0.066   17.529    0.000
##   EI =~                                               
##     V3.6IEMeta        1.126    0.057   19.907    0.000
##     V3.8IEConvencd    1.236    0.058   21.268    0.000
##     V3.10IEFrmIntn    1.278    0.060   21.181    0.000
## 
## Regressions:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   SN ~                                                
##     CHI               0.156    0.053    2.968    0.003
##     CRA              -0.011    0.070   -0.154    0.878
##   PBC ~                                               
##     CHI               0.001    0.054    0.011    0.991
##     CHM               0.018    0.225    0.081    0.936
##     SN                0.354    0.061    5.829    0.000
##   EI ~                                                
##     SN               -0.058    0.063   -0.920    0.358
##     PBC               0.913    0.084   10.897    0.000
## 
## Covariances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI ~~                                              
##     CHM               0.025    0.302    0.081    0.935
##     CRA               0.012    0.068    0.171    0.864
##   CHM ~~                                              
##     CRA               0.091    1.113    0.081    0.935
## 
## Variances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##     CHI               1.000                           
##     CHM               1.000                           
##     CRA               1.000                           
##     PBC               1.000                           
##     SN                1.000                           
##     EI                1.000                           
##     V2.8Individlsm    0.000                           
##     V2.2MsclnddINV    0.882    0.061   14.467    0.000
##     V2.6Masculindd  -16.563  427.446   -0.039    0.969
##     V2.5Aversin       1.014    0.128    7.890    0.000
##     V2.7Aversin       0.565    0.081    7.018    0.000
##     V3.11NSFamilia    1.068    0.102   10.423    0.000
##     V3.12NSAmigos     0.347    0.096    3.634    0.000
##     V3.14NSSociedd    1.519    0.120   12.669    0.000
##     V3.3CONTFcil      0.388    0.097    4.004    0.000
##     V3.4CONTPuedo     0.963    0.098    9.831    0.000
##     V3.6IEMeta        0.671    0.058   11.605    0.000
##     V3.8IEConvencd    0.408    0.050    8.209    0.000
##     V3.10IEFrmIntn    0.464    0.054    8.551    0.000
## 
## R-Square:
##                    Estimate
##     PBC               0.114
##     SN                0.024
##     EI                0.475
##     V2.8Individlsm    1.000
##     V2.2MsclnddINV    0.001
##     V2.6Masculindd       NA
##     V2.5Aversin       0.316
##     V2.7Aversin       0.350
##     V3.11NSFamilia    0.517
##     V3.12NSAmigos     0.811
##     V3.14NSSociedd    0.381
##     V3.3CONTFcil      0.834
##     V3.4CONTPuedo     0.613
##     V3.6IEMeta        0.782
##     V3.8IEConvencd    0.877
##     V3.10IEFrmIntn    0.870
semPaths(fit23Pr, what="par", ask=FALSE, layout="tree2", residuals=TRUE, style="OpenMx",
         sizeMan=8, edge.label.cex=0.9, thresholds = TRUE)

#
fit23Ct = lavaan::sem(EI.AJZEN.model23, data =ddnaddf[ddnaddf[,"BELIEFS"]==2,
                     obs.variables2], std.lv=TRUE, 
                     sample.cov=mcv, estimator = "ML", start="Mplus",  
                     missing = "listwise", bootstrap=10000)
## Warning in lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING: could not compute standard errors!
##   lavaan NOTE: this may be a symptom that the model is not identified.
## Warning in lav_object_post_check(lavobject): lavaan WARNING: some estimated
## variances are negative
## Warning in lav_object_post_check(lavobject): lavaan WARNING: observed
## variable error term matrix (theta) is not positive definite; use
## inspect(fit,"theta") to investigate.
summary(fit23Ct,fit.measures=TRUE,rsquare=TRUE)
## lavaan (0.5-20) converged normally after 7110 iterations
## 
##   Number of observations                          1339
## 
##   Estimator                                         ML
##   Minimum Function Test Statistic              303.321
##   Degrees of freedom                                56
##   P-value (Chi-square)                           0.000
## 
## Model test baseline model:
## 
##   Minimum Function Test Statistic             7467.470
##   Degrees of freedom                                78
##   P-value                                        0.000
## 
## User model versus baseline model:
## 
##   Comparative Fit Index (CFI)                    0.967
##   Tucker-Lewis Index (TLI)                       0.953
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)             -26970.538
##   Loglikelihood unrestricted model (H1)     -26818.878
## 
##   Number of free parameters                         35
##   Akaike (AIC)                               54011.077
##   Bayesian (BIC)                             54193.066
##   Sample-size adjusted Bayesian (BIC)        54081.886
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.057
##   90 Percent Confidence Interval          0.051  0.064
##   P-value RMSEA <= 0.05                          0.026
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.065
## 
## Parameter Estimates:
## 
##   Information                                 Expected
##   Standard Errors                             Standard
## 
## Latent Variables:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI =~                                              
##     V2.8Individlsm    1.012       NA                  
##   CHM =~                                              
##     V2.2MsclnddINV    0.004       NA                  
##     V2.6Masculindd   31.333       NA                  
##   CRA =~                                              
##     V2.5Aversin       0.497       NA                  
##     V2.7Aversin       0.614       NA                  
##   SN =~                                               
##     V3.11NSFamilia    1.138       NA                  
##     V3.12NSAmigos     1.401       NA                  
##     V3.14NSSociedd    0.971       NA                  
##   PBC =~                                              
##     V3.3CONTFcil      1.265       NA                  
##     V3.4CONTPuedo     1.294       NA                  
##   EI =~                                               
##     V3.6IEMeta        1.166       NA                  
##     V3.8IEConvencd    1.210       NA                  
##     V3.10IEFrmIntn    1.255       NA                  
## 
## Regressions:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   SN ~                                                
##     CHI               0.148       NA                  
##     CRA               0.132       NA                  
##   PBC ~                                               
##     CHI               0.021       NA                  
##     CHM               0.002       NA                  
##     SN                0.309       NA                  
##   EI ~                                                
##     SN                0.144       NA                  
##     PBC               0.889       NA                  
## 
## Covariances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##   CHI ~~                                              
##     CHM               0.006       NA                  
##     CRA               0.282       NA                  
##   CHM ~~                                              
##     CRA               0.020       NA                  
## 
## Variances:
##                    Estimate  Std.Err  Z-value  P(>|z|)
##     CHI               1.000                           
##     CHM               1.000                           
##     CRA               1.000                           
##     PBC               1.000                           
##     SN                1.000                           
##     EI                1.000                           
##     V2.8Individlsm    0.000                           
##     V2.2MsclnddINV    1.284       NA                  
##     V2.6Masculindd -980.844       NA                  
##     V2.5Aversin       1.102       NA                  
##     V2.7Aversin       0.509       NA                  
##     V3.11NSFamilia    1.126       NA                  
##     V3.12NSAmigos     0.293       NA                  
##     V3.14NSSociedd    1.859       NA                  
##     V3.3CONTFcil      0.709       NA                  
##     V3.4CONTPuedo     0.757       NA                  
##     V3.6IEMeta        0.697       NA                  
##     V3.8IEConvencd    0.412       NA                  
##     V3.10IEFrmIntn    0.633       NA                  
## 
## R-Square:
##                    Estimate
##     PBC               0.093
##     SN                0.048
##     EI                0.495
##     V2.8Individlsm    1.000
##     V2.2MsclnddINV    0.000
##     V2.6Masculindd       NA
##     V2.5Aversin       0.183
##     V2.7Aversin       0.425
##     V3.11NSFamilia    0.547
##     V3.12NSAmigos     0.876
##     V3.14NSSociedd    0.348
##     V3.3CONTFcil      0.713
##     V3.4CONTPuedo     0.709
##     V3.6IEMeta        0.794
##     V3.8IEConvencd    0.876
##     V3.10IEFrmIntn    0.831
semPaths(fit23Ct, what="par", ask=FALSE, layout="tree2",residuals=TRUE, style="OpenMx",
         sizeMan=8, edge.label.cex=0.9, thresholds = TRUE)

#