Este estudio explora la asociación entre factores de estilo de vida, apoyo emocional, bienestar subjetivo y ansiedad en adultos.
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.2 ✔ tibble 3.2.1
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.0.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(psych)
##
## Attaching package: 'psych'
##
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
datos <- read.csv("datos_bienestar.csv")
summary(datos)
## edad horas_sueno ejercicio alimentacion
## Min. :26.0 Min. : 5.100 Min. :0.00 Length:30
## 1st Qu.:35.0 1st Qu.: 6.225 1st Qu.:1.00 Class :character
## Median :44.0 Median : 6.900 Median :2.00 Mode :character
## Mean :41.5 Mean : 6.997 Mean :2.20
## 3rd Qu.:48.0 3rd Qu.: 7.900 3rd Qu.:3.75
## Max. :57.0 Max. :10.000 Max. :5.00
## apoyo_emocional bienestar ansiedad
## Length:30 Min. : 4.600 Min. :3.20
## Class :character 1st Qu.: 5.650 1st Qu.:3.90
## Mode :character Median : 7.200 Median :5.45
## Mean : 6.857 Mean :5.36
## 3rd Qu.: 7.650 3rd Qu.:6.20
## Max. :10.000 Max. :9.10
describe(datos)
## vars n mean sd median trimmed mad min max range skew
## edad 1 30 41.50 8.95 44.00 41.75 8.90 26.0 57.0 31.0 -0.28
## horas_sueno 2 30 7.00 1.13 6.90 6.97 1.48 5.1 10.0 4.9 0.37
## ejercicio 3 30 2.20 1.73 2.00 2.12 2.22 0.0 5.0 5.0 0.20
## alimentacion* 4 30 1.93 0.83 2.00 1.92 1.48 1.0 3.0 2.0 0.12
## apoyo_emocional* 5 30 2.13 0.82 2.00 2.17 1.48 1.0 3.0 2.0 -0.23
## bienestar 6 30 6.86 1.39 7.20 6.80 1.48 4.6 10.0 5.4 0.20
## ansiedad 7 30 5.36 1.48 5.45 5.25 1.33 3.2 9.1 5.9 0.47
## kurtosis se
## edad -1.11 1.63
## horas_sueno -0.33 0.21
## ejercicio -1.28 0.32
## alimentacion* -1.58 0.15
## apoyo_emocional* -1.52 0.15
## bienestar -0.75 0.25
## ansiedad -0.42 0.27
ggplot(datos, aes(x = horas_sueno, y = bienestar)) +
geom_point() +
geom_smooth(method = "lm", se = TRUE)
## `geom_smooth()` using formula = 'y ~ x'
ggplot(datos, aes(x = factor(ejercicio), y = ansiedad)) +
geom_boxplot()
ggplot(datos, aes(x = apoyo_emocional, y = bienestar)) +
geom_boxplot()
# Correlación entre variables cuantitativas
cor.test(datos$horas_sueno, datos$bienestar)
##
## Pearson's product-moment correlation
##
## data: datos$horas_sueno and datos$bienestar
## t = -0.0063032, df = 28, p-value = 0.995
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.3613054 0.3592322
## sample estimates:
## cor
## -0.001191201
cor.test(datos$ejercicio, datos$ansiedad)
##
## Pearson's product-moment correlation
##
## data: datos$ejercicio and datos$ansiedad
## t = -2.0467, df = 28, p-value = 0.05017
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.6380901911 -0.0005551559
## sample estimates:
## cor
## -0.3607522
# Regresión lineal múltiple
modelo_bienestar <- lm(bienestar ~ horas_sueno + ejercicio + apoyo_emocional, data = datos)
summary(modelo_bienestar)
##
## Call:
## lm(formula = bienestar ~ horas_sueno + ejercicio + apoyo_emocional,
## data = datos)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.4603 -0.9361 0.1563 0.9286 2.8116
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.77650 1.81852 3.176 0.00394 **
## horas_sueno 0.04054 0.23602 0.172 0.86500
## ejercicio 0.02038 0.15956 0.128 0.89939
## apoyo_emocionalbajo 1.02813 0.67272 1.528 0.13899
## apoyo_emocionalmedio 1.02240 0.66972 1.527 0.13941
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.412 on 25 degrees of freedom
## Multiple R-squared: 0.1127, Adjusted R-squared: -0.02932
## F-statistic: 0.7935 on 4 and 25 DF, p-value: 0.5406
modelo_ansiedad <- lm(ansiedad ~ horas_sueno + ejercicio + apoyo_emocional, data = datos)
summary(modelo_ansiedad)
##
## Call:
## lm(formula = ansiedad ~ horas_sueno + ejercicio + apoyo_emocional,
## data = datos)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1225 -0.8692 -0.1499 0.6681 2.6029
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.0667 1.7724 2.859 0.00846 **
## horas_sueno 0.2027 0.2300 0.881 0.38664
## ejercicio -0.2114 0.1555 -1.359 0.18624
## apoyo_emocionalbajo -0.5969 0.6556 -0.910 0.37134
## apoyo_emocionalmedio -1.1523 0.6527 -1.765 0.08973 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.376 on 25 degrees of freedom
## Multiple R-squared: 0.2534, Adjusted R-squared: 0.1339
## F-statistic: 2.121 on 4 and 25 DF, p-value: 0.1081
Los resultados muestran las relaciones estadísticas entre las variables de estilo de vida y el bienestar/ansiedad de los adultos.