Cargando los datos
Tabla
Estimate | Standard Error | t value | Pr(>|t|) | ||
(Intercept) | 0.680 | 0.128 | 5.300 | 0.0000 | *** |
EF | 0.395 | 0.031 | 12.603 | 0.0000 | *** |
FC | 0.413 | 0.029 | 14.186 | 0.0000 | *** |
Signif. codes: 0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05 < '.' < 0.1 < '' < 1 | |||||
Residual standard error: 0.6286 on 997 degrees of freedom | |||||
Multiple R-squared: 0.2683, Adjusted R-squared: 0.2668 | |||||
F-statistic: 182.7 on 997 and 2 DF, p-value: 0.0000 | |||||
Análisis
## We fitted a linear model (estimated using OLS) to predict IRDE with EF and FC (formula: IRDE ~ EF + FC). The model explains a statistically significant and substantial proportion of variance (R2 = 0.27, F(2, 997) = 182.75, p < .001, adj. R2 = 0.27). The model's intercept, corresponding to EF = 0 and FC = 0, is at 0.68 (95% CI [0.43, 0.93], t(997) = 5.30, p < .001). Within this model:
##
## - The effect of EF is statistically significant and positive (beta = 0.39, 95% CI [0.33, 0.46], t(997) = 12.60, p < .001; Std. beta = 0.34, 95% CI [0.29, 0.39])
## - The effect of FC is statistically significant and positive (beta = 0.41, 95% CI [0.36, 0.47], t(997) = 14.19, p < .001; Std. beta = 0.38, 95% CI [0.33, 0.44])
##
## Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using the Wald approximation.
Tabla
Estimate | Standard Error | z value | Pr(>|z|) | Signif. | |
(Intercept) | -8.418 | 0.635 | -13.247 | 0.0000 | *** |
EF | 1.169 | 0.124 | 9.420 | 0.0000 | *** |
FC | 1.640 | 0.140 | 11.745 | 0.0000 | *** |
Signif. codes: 0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05 < '.' < 0.1 < '' < 1 | |||||
| |||||
(Dispersion parameter for binomial family taken to be 1) | |||||
Null deviance: 1383 on 999 degrees of freedom | |||||
Residual deviance: 1121 on 997 degrees of freedom | |||||
Análisis
## We fitted a logistic model (estimated using ML) to predict IRDE with EF and FC (formula: IRDE ~ EF + FC). The model's explanatory power is moderate (Tjur's R2 = 0.23). The model's intercept, corresponding to EF = 0 and FC = 0, is at -8.42 (95% CI [-9.70, -7.21], p < .001). Within this model:
##
## - The effect of EF is statistically significant and positive (beta = 1.17, 95% CI [0.93, 1.42], p < .001; Std. beta = 0.77, 95% CI [0.61, 0.93])
## - The effect of FC is statistically significant and positive (beta = 1.64, 95% CI [1.37, 1.92], p < .001; Std. beta = 1.01, 95% CI [0.84, 1.18])
##
## Standardized parameters were obtained by fitting the model on a standardized version of the dataset. 95% Confidence Intervals (CIs) and p-values were computed using
Simulación de datos
IRDE = Intención representación demo
EF = Estilo Familiar
FC = Formación Ciudadana
La relación es influenciada por el estilo parental y por el modelo pedagógico
IRDE ~ EF + FC
factanal(davidSimData, factors = 3, rotation = "promax")
##
## Call:
## factanal(x = davidSimData, factors = 3, rotation = "promax")
##
## Uniquenesses:
## i1 i2 i3 i4 i5 i6 i7 i8 i9
## 0.564 0.626 0.604 0.568 0.596 0.482 0.462 0.463 0.426
##
## Loadings:
## Factor1 Factor2 Factor3
## i1 0.651
## i2 0.583
## i3 0.656
## i4 0.645
## i5 0.635
## i6 0.724
## i7 0.745
## i8 0.725
## i9 0.730
##
## Factor1 Factor2 Factor3
## SS loadings 1.62 1.344 1.199
## Proportion Var 0.18 0.149 0.133
## Cumulative Var 0.18 0.329 0.463
##
## Factor Correlations:
## Factor1 Factor2 Factor3
## Factor1 1.000 -0.4716 -0.5067
## Factor2 -0.472 1.0000 0.0195
## Factor3 -0.507 0.0195 1.0000
##
## Test of the hypothesis that 3 factors are sufficient.
## The chi square statistic is 17.52 on 12 degrees of freedom.
## The p-value is 0.131
| Valor | Concepto |
|---|---|
| < 0.39 | pobre |
| .4 - .49 | Justo |
| .5 - .59 | Bueno |
| .6 - .69 | Muy bueno |
| .7 + | Excelente |
Creamos el modelo
davidModel <-
"EF =~ i1 + i2 + i3
FC =~ i4 + i5 + i6
IRDE =~ i7 + i8 + i9
IRDE ~ EF
IRDE ~ FC"
david.fit <-
cfa(davidModel,
data = davidSimData)
Revisamos las cargas
inspect(david.fit,
what = "std")$lambda
## EF FC IRDE
## i1 0.668 0.000 0.000
## i2 0.624 0.000 0.000
## i3 0.603 0.000 0.000
## i4 0.000 0.662 0.000
## i5 0.000 0.636 0.000
## i6 0.000 0.712 0.000
## i7 0.000 0.000 0.728
## i8 0.000 0.000 0.731
## i9 0.000 0.000 0.763
>.6
Evaluamos el modelo
summary(david.fit,
# standardized = TRUE,
fit.measures = TRUE)
## lavaan 0.6-9 ended normally after 30 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of model parameters 21
##
## Number of observations 1000
##
## Model Test User Model:
##
## Test statistic 24.861
## Degrees of freedom 24
## P-value (Chi-square) 0.413
##
## Model Test Baseline Model:
##
## Test statistic 2177.667
## Degrees of freedom 36
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000
## Tucker-Lewis Index (TLI) 0.999
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -10247.254
## Loglikelihood unrestricted model (H1) -10234.824
##
## Akaike (AIC) 20536.508
## Bayesian (BIC) 20639.571
## Sample-size adjusted Bayesian (BIC) 20572.874
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.006
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper 0.027
## P-value RMSEA <= 0.05 1.000
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.017
##
## Parameter Estimates:
##
## Standard errors Standard
## Information Expected
## Information saturated (h1) model Structured
##
## Latent Variables:
## Estimate Std.Err z-value P(>|z|)
## EF =~
## i1 1.000
## i2 1.022 0.080 12.743 0.000
## i3 0.874 0.069 12.619 0.000
## FC =~
## i4 1.000
## i5 0.952 0.066 14.428 0.000
## i6 1.092 0.073 14.879 0.000
## IRDE =~
## i7 1.000
## i8 0.967 0.050 19.337 0.000
## i9 1.031 0.052 19.758 0.000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|)
## IRDE ~
## EF 0.571 0.057 9.980 0.000
## FC 0.585 0.053 11.042 0.000
##
## Covariances:
## Estimate Std.Err z-value P(>|z|)
## EF ~~
## FC 0.006 0.014 0.420 0.675
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .i1 0.357 0.026 13.912 0.000
## .i2 0.472 0.030 15.657 0.000
## .i3 0.385 0.023 16.388 0.000
## .i4 0.413 0.026 15.643 0.000
## .i5 0.430 0.026 16.567 0.000
## .i6 0.374 0.028 13.568 0.000
## .i7 0.376 0.024 15.984 0.000
## .i8 0.344 0.022 15.830 0.000
## .i9 0.322 0.022 14.434 0.000
## EF 0.288 0.031 9.195 0.000
## FC 0.322 0.033 9.740 0.000
## .IRDE 0.215 0.023 9.215 0.000
| Medidas | Valor a revisar |
|---|---|
| chi-square | p < .05 |
| CFI - Comparative Fit Index | >.9 |
| TLI - Tuker-Lewis Index | >.9 |
| RMSEA | <.05 |
Promedios, desviaciones estándar, confiabilidad interna y variables compuestas (N = 1000)
david_mean <-
davidSimData |>
rowwise() |>
mutate(RE = mean(i1, i2, i3),
DE = mean(i4, i5, i6),
CD = mean(i7, i8, i9)) |>
dplyr::select(RE, DE, CD) |>
ungroup() |>
summarise(across(everything(), mean))
david_sd <-
davidSimData |>
rowwise() |>
mutate(RE = mean(i1, i2, i3),
DE = mean(i4, i5, i6),
CD = mean(i7, i8, i9)) |>
dplyr::select(RE, DE, CD) |>
ungroup() |>
summarise(across(everything(), sd))
david_sd_mean <-
david_mean |>
bind_rows(david_sd) |>
transpose_df() |>
rename(Variable_compuesta = rowname,
promedio = "1",
des_est = "2") |>
mutate(promedio = round(promedio, digits = 2),
des_est = round(des_est, digits = 2))
david_cronbach_RE <-
davidSimData |>
dplyr::select(i1, i2, i3) |>
cronbach.alpha()
david_cronbach_DE <-
davidSimData |>
dplyr::select(i4, i5, i6) |>
cronbach.alpha()
david_cronbach_CD <-
davidSimData |>
dplyr::select(i7, i8, i9) |>
cronbach.alpha()
david_cronbach <-
tibble(RE = david_cronbach_RE$alpha,
DE = david_cronbach_DE$alpha,
CD = david_cronbach_CD$alpha) |>
transpose_df() |>
rename(Variable_compuesta = rowname,
Cronbach = "1") |>
right_join(david_sd_mean) |>
dplyr::select(Variable_compuesta,
Cronbach,
promedio,
des_est) |>
mutate(Cronbach = round(Cronbach,
digits = 2),
No_items = 3) |>
dplyr::select(Variable_compuesta,
No_items,
Cronbach,
promedio,
des_est
)
## Joining, by = "Variable_compuesta"
rm(david_mean,
david_sd,
david_sd_mean)
david_cronbach |>
gt() |>
tab_header(
title = "Tabla 1 Promedios, desviaciones estándar, confiabilidad interna y variables compuestas (N = 1000)"
)
| Tabla 1 Promedios, desviaciones estándar, confiabilidad interna y variables compuestas (N = 1000) | ||||
|---|---|---|---|---|
| Variable_compuesta | No_items | Cronbach | promedio | des_est |
| RE | 3 | 0.66 | 2.90 | 0.80 |
| DE | 3 | 0.71 | 3.13 | 0.86 |
| CD | 3 | 0.78 | 3.01 | 0.89 |
EstadÃsticas a tener en cuenta
| Cronbach Alpha | Concepto |
|---|---|
| <.6 | Inaceptable - Se eliminan items |
| 6 - .64 | Indeseable |
| .65 - .69 | Aceptable minimamente |
| .7 - .79 | Respetable |
| .8 - .89 | Muy bueno |
| .9> | Demasiado buenos - eliminar items |
Matrix de correlaciones
RE <- davidSimData |>
rowwise() |>
mutate(RE = mean(i1, i2, i3))
DE <- davidSimData |> rowwise() |> mutate(DE = mean(i4, i5, i6))
CD <- davidSimData |> rowwise() |> mutate(CD = mean(i7, i8, i9))
david_latent <-
tibble(RE = RE$RE,
DE = DE$DE,
CD = CD$CD)
rcorr(as.matrix(david_latent))
## RE DE CD
## RE 1.00 0.04 0.25
## DE 0.04 1.00 0.25
## CD 0.25 0.25 1.00
##
## n= 1000
##
##
## P
## RE DE CD
## RE 0.2349 0.0000
## DE 0.2349 0.0000
## CD 0.0000 0.0000
semPaths(david.fit,
what = "est",
fade = FALSE,
residuals = FALSE,
edge.label.cex = 0.75)