Apoyo Plantar

Author

Raquel Cantero

Apoyo Plantar

Primero vamos a cargar los datos del fichero spss:

library(tidyverse)
Warning: package 'ggplot2' was built under R version 4.3.2
Warning: package 'dplyr' was built under R version 4.3.2
Warning: package 'stringr' was built under R version 4.3.2
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.4.4     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.0
✔ purrr     1.0.2     
── 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(haven)
Warning: package 'haven' was built under R version 4.3.2
library(ggstatsplot)
Warning: package 'ggstatsplot' was built under R version 4.3.2
You can cite this package as:
     Patil, I. (2021). Visualizations with statistical details: The 'ggstatsplot' approach.
     Journal of Open Source Software, 6(61), 3167, doi:10.21105/joss.03167
#library(lme4) No calcula p, asi que la cambio por otra:
library(lmerTest)
Warning: package 'lmerTest' was built under R version 4.3.2
Loading required package: lme4
Warning: package 'lme4' was built under R version 4.3.2
Loading required package: Matrix
Warning: package 'Matrix' was built under R version 4.3.2

Attaching package: 'Matrix'

The following objects are masked from 'package:tidyr':

    expand, pack, unpack


Attaching package: 'lmerTest'

The following object is masked from 'package:lme4':

    lmer

The following object is masked from 'package:stats':

    step
library(patchwork)
library(gtsummary)
Warning: package 'gtsummary' was built under R version 4.3.2
library(afex)
Warning: package 'afex' was built under R version 4.3.2
************
Welcome to afex. For support visit: http://afex.singmann.science/
- Functions for ANOVAs: aov_car(), aov_ez(), and aov_4()
- Methods for calculating p-values with mixed(): 'S', 'KR', 'LRT', and 'PB'
- 'afex_aov' and 'mixed' objects can be passed to emmeans() for follow-up tests
- Get and set global package options with: afex_options()
- Set sum-to-zero contrasts globally: set_sum_contrasts()
- For example analyses see: browseVignettes("afex")
************

Attaching package: 'afex'

The following object is masked from 'package:lme4':

    lmer
df=read_sav("PARA ANALIZAR Piloto apoyo plantar - SIN ANOMALOS.sav") %>% select(DNI:Dominante,Actividad,Ocupacion,everything()) %>% filter(!is.na(DNI))

dfLong=df %>% pivot_longer(cols = -c(DNI:Ocupacion),names_to = "VariableWide",values_to = "Valor") %>% 
  separate(col = VariableWide, into=c("Variable","Inmov","Ojos"))%>% 
  mutate(Inmov=factor(Inmov,levels=c("No","dom","ndo"),labels=c("_0No","_1dom","_2ndo"))) %>% 
  arrange(DNI,Ojos,Inmov,Variable)

Exploramos visualmente las mediciones.

dfLong %>% 
  ggplot(aes(x=Inmov,y=Valor,fill=Ojos))+
  geom_boxplot()+
  facet_wrap(~Variable,ncol=3,scales="free_y")+
  theme_bw()+
  theme(legend.position = "bottom")+
  labs(title = "Apoyo Plantar",x="Ojos",y="Valor")

Objetivo 1

Nos gustaría estudiar si la variable LongBalanceo presenta diferencias entre Ojos CE y OE ajustando por inmovilización. Para ello, vamos a realizar un modelo lineal mixto con la función lmer de la librería lme4. Nos sale que sí ocurre que hay diferencias.

Queremos también saber si el salto que se produce en Inmov=No entre ojos cerrados y abiertos es diferente al de cuando hay inmovilización dominante o no dominante. Transformamos la base de datos y exploramos las primers líneas:

dfLong %>% names()
 [1] "DNI"       "Edad"      "Sexo"      "Dominante" "Actividad" "Ocupacion"
 [7] "Variable"  "Inmov"     "Ojos"      "Valor"    
dg=dfLong %>% select(DNI,Ojos,Variable,Inmov, Valor) %>% filter(Variable=="LongBalanceo")

dg %>% head() %>% knitr::kable()
DNI Ojos Variable Inmov Valor
7998198 CE LongBalanceo _0No 41.0
7998198 CE LongBalanceo _1dom 38.2
7998198 CE LongBalanceo _2ndo 33.5
7998198 OE LongBalanceo _0No 44.5
7998198 OE LongBalanceo _1dom 26.2
7998198 OE LongBalanceo _2ndo 36.5

Sin considerar interaaciones

El modelo que nos interesa es este:

modelo<-lmer(Valor~Ojos+Inmov +(1|DNI),data=dg)
summary(modelo)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: Valor ~ Ojos + Inmov + (1 | DNI)
   Data: dg

REML criterion at convergence: 1999.9

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-2.0085 -0.6072 -0.0540  0.5016  3.2834 

Random effects:
 Groups   Name        Variance Std.Dev.
 DNI      (Intercept) 327.8    18.10   
 Residual             134.3    11.59   
Number of obs: 246, groups:  DNI, 41

Fixed effects:
            Estimate Std. Error      df t value Pr(>|t|)    
(Intercept)   61.393      3.190  56.403  19.243  < 2e-16 ***
OjosOE        -9.507      1.478 202.000  -6.433 8.87e-10 ***
Inmov_1dom    -8.482      1.810 202.000  -4.686 5.11e-06 ***
Inmov_2ndo   -11.174      1.810 202.000  -6.174 3.59e-09 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr) OjosOE Inmv_1
OjosOE     -0.232              
Inmov_1dom -0.284  0.000       
Inmov_2ndo -0.284  0.000  0.500

Que en formato de publicación puede mostrarse así:

gtsummary::tbl_regression(modelo, digits=3, tidy_fun = broom.mixed::tidy)
Characteristic Beta 95% CI1 p-value
Ojos


    CE
    OE -9.5 -12, -6.6 <0.001
Inmov


    _0No
    _1dom -8.5 -12, -4.9 <0.001
    _2ndo -11 -15, -7.6 <0.001
DNI.sd__(Intercept) 18

Residual.sd__Observation 12

1 CI = Confidence Interval

o así:

sjPlot::tab_model(modelo)
  Valor
Predictors Estimates CI p
(Intercept) 61.39 55.11 – 67.68 <0.001
Ojos [OE] -9.51 -12.42 – -6.60 <0.001
Inmov [_1dom] -8.48 -12.05 – -4.92 <0.001
Inmov [_2ndo] -11.17 -14.74 – -7.61 <0.001
Random Effects
σ2 134.31
τ00 DNI 327.79
ICC 0.71
N DNI 41
Observations 246
Marginal R2 / Conditional R2 0.090 / 0.735

En forma de gráfico, el modelo sin considerar interacciones con los ojos es este (es como tener la media de ojos aboertos y cerrados y estudiar solo el efecto de la inmovilización).

p0<-ggwithinstats(dg, subject.id="DNI", x = Inmov, y = Valor, pairwise.comparisons = TRUE, pairwise.display = "significant",  pairwise.grouping.line.type = "segment",bf.message=FALSE,
                  point.args = list(position = position_jitter(width = 0.1, height = 0))
    ) + coord_cartesian(ylim=c(0,150))+labs(title="Ignorando ojos",y="Longitud de Balanceo")
p0

Considerando interacciones

modelo=lmer(Valor~Ojos*Inmov +(1|DNI),data=dg) 

 summary(modelo)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: Valor ~ Ojos * Inmov + (1 | DNI)
   Data: dg

REML criterion at convergence: 1987.7

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.86578 -0.62575 -0.08037  0.54746  3.14434 

Random effects:
 Groups   Name        Variance Std.Dev.
 DNI      (Intercept) 328.0    18.11   
 Residual             133.2    11.54   
Number of obs: 246, groups:  DNI, 41

Fixed effects:
                  Estimate Std. Error      df t value Pr(>|t|)    
(Intercept)         63.154      3.354  68.010  18.830  < 2e-16 ***
OjosOE             -13.029      2.549 200.000  -5.112 7.45e-07 ***
Inmov_1dom         -10.300      2.549 200.000  -4.041 7.59e-05 ***
Inmov_2ndo         -14.639      2.549 200.000  -5.743 3.42e-08 ***
OjosOE:Inmov_1dom    3.637      3.605 200.000   1.009    0.314    
OjosOE:Inmov_2ndo    6.929      3.605 200.000   1.922    0.056 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
            (Intr) OjosOE Inmv_1 Inmv_2 OOE:I_1
OjosOE      -0.380                             
Inmov_1dom  -0.380  0.500                      
Inmov_2ndo  -0.380  0.500  0.500               
OjsOE:Inm_1  0.269 -0.707 -0.707 -0.354        
OjsOE:Inm_2  0.269 -0.707 -0.354 -0.707  0.500 

Que en formato de publicción puede mostrarse así:

gtsummary::tbl_regression(modelo, digits=3, tidy_fun = broom.mixed::tidy)
Characteristic Beta 95% CI1 p-value
Ojos


    CE
    OE -13 -18, -8.0 <0.001
Inmov


    _0No
    _1dom -10 -15, -5.3 <0.001
    _2ndo -15 -20, -9.6 <0.001
Ojos * Inmov


    OE * _1dom 3.6 -3.5, 11 0.3
    OE * _2ndo 6.9 -0.18, 14 0.056
DNI.sd__(Intercept) 18

Residual.sd__Observation 12

1 CI = Confidence Interval

o así:

sjPlot::tab_model(modelo)
  Valor
Predictors Estimates CI p
(Intercept) 63.15 56.55 – 69.76 <0.001
Ojos [OE] -13.03 -18.05 – -8.01 <0.001
Inmov [_1dom] -10.30 -15.32 – -5.28 <0.001
Inmov [_2ndo] -14.64 -19.66 – -9.62 <0.001
Ojos [OE] × Inmov [_1dom] 3.64 -3.46 – 10.74 0.314
Ojos [OE] × Inmov [_2ndo] 6.93 -0.17 – 14.03 0.056
Random Effects
σ2 133.19
τ00 DNI 327.97
ICC 0.71
N DNI 41
Observations 246
Marginal R2 / Conditional R2 0.093 / 0.738

Para más detalle vamos a estudiarlo para experimentos con ojos abiertos y cerrados por separado que es más o menos lo que hace el modelo con interacciones.

p1<-ggwithinstats(dg %>% filter(Ojos=="CE"),subject.id="DNI", x = Inmov, y = Valor,  pairwise.comparisons = TRUE, 
                  
                  pairwise.display = "significant", 
                  pairwise.grouping.line.type = "segment",
                  bf.message=FALSE,
                  point.args = list(position = position_jitter(width = 0.1, height = 0))
                  ) +coord_cartesian(ylim=c(0,150))+labs(title="Closed eyes",y="Longitud de Balanceo")
p1

p2<-ggwithinstats(dg %>% filter(Ojos=="OE"), x = Inmov, y = Valor, pairwise.comparisons = TRUE, pairwise.display = "significant", pairwise.grouping.line.type = "segment",bf.message=FALSE, 
                  point.args = list(position = position_jitter(width = 0.1, height = 0)))  +coord_cartesian(ylim=c(0,150))+labs(title="Open eyes",y="Longitud de Balanceo")
p2

Ahora me gustaría ensamblar los gráficos p1 y p2 en uno solo.

patchwork::wrap_plots(p1,p2,ncol=2)

Queda claro que hay un efecto de la inmovilización esten como estén los ojos. No hay diferencia entre que se haga en el miembro dominante o no dominante cn los ojos abiertos, aunque sí que hay una pequeña con los ojos cerrados. No sabría si prestarle mucha atención ya que las interacciones aunque salieron cerca de la significación, no lo fueron. Puedes elegir qué escribir.

Las comparaciones post-hoc están ajustadas para comparaciones múltiples por el método de Holm.

Todo lo anterior es dependiente de que se den las condiciones de validez (esfericidad y normalidad). Veamos si hay algo en contra de ellas:

pruebaAnova <- aov_ez(dg, id = "DNI", 
  dv = "Valor",
  within = c("Ojos", "Inmov"), 
  detailed = TRUE)

pruebaAnova %>% summary()

Univariate Type III Repeated-Measures ANOVA Assuming Sphericity

            Sum Sq num Df Error SS den Df  F value    Pr(>F)    
(Intercept) 617142      1    84042     40 293.7314 < 2.2e-16 ***
Ojos          5559      1     7171     40  31.0071 1.909e-06 ***
Inmov         5578      2    11168     80  19.9771 9.183e-08 ***
Ojos:Inmov     493      2     8300     80   2.3739   0.09965 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1


Mauchly Tests for Sphericity

           Test statistic  p-value
Inmov             0.82100 0.021365
Ojos:Inmov        0.89465 0.114098


Greenhouse-Geisser and Huynh-Feldt Corrections
 for Departure from Sphericity

            GG eps Pr(>F[GG])    
Inmov      0.84818  6.609e-07 ***
Ojos:Inmov 0.90469     0.1055    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

              HF eps   Pr(>F[HF])
Inmov      0.8817775 4.267377e-07
Ojos:Inmov 0.9450613 1.029672e-01

Como la prueba de Mauchly es significativa para Inmov (en ojos no hay que hacerlo ya que tiene dos niveles y con esas no es necesario) se puede hacer la corrección de Greenhouse-Geisser. En este caso no cambia nada, así que el asunto de la esfericidad no nos preocupa en las interpretaciones.

residuals(pruebaAnova) %>% shapiro.test()

    Shapiro-Wilk normality test

data:  .
W = 0.98316, p-value = 0.005202

En cuanto a la normalidad hemos tenido evidencia en contra. Sin embargo no es algo que me preocupe demasiado ya que el tamaño muestral es razonablemente grande y la prueba de normalidad es muy sensible a ello. Además, el modelo mixto es algo robusto a la violación de la normalidad especialmente en casos como este donde no veo observaciones anómalas. Además, mira esto:

residuals(pruebaAnova) %>% hist()

residuals(pruebaAnova) %>% scale() %>% qqnorm()

¿Qué problema hay? En peores plazas hemos toreao.

Objetivo 2

Estudiar si la Superficie total cuando No hay Inmobilización es es más baja que cuando sí la hay, sea dominante o no dominante.

dh=dfLong %>% select(DNI,Ojos,Variable,Dominante,Inmov, Valor) %>% filter(Variable=="SupTotal") 

modelo<-lmer(Valor~Inmov +(1|DNI),data=dh)
summary(modelo)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: Valor ~ Inmov + (1 | DNI)
   Data: dh

REML criterion at convergence: 1172.2

Scaled residuals: 
     Min       1Q   Median       3Q      Max 
-1.94378 -0.54101  0.04525  0.56750  2.56861 

Random effects:
 Groups   Name        Variance Std.Dev.
 DNI      (Intercept) 3187.0   56.45   
 Residual              286.8   16.93   
Number of obs: 123, groups:  DNI, 41

Fixed effects:
            Estimate Std. Error      df t value Pr(>|t|)    
(Intercept)  274.024      9.205  44.719   29.77   <2e-16 ***
Inmov_1dom    53.415      3.740  80.000   14.28   <2e-16 ***
Inmov_2ndo    63.415      3.740  80.000   16.95   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr) Inmv_1
Inmov_1dom -0.203       
Inmov_2ndo -0.203  0.500
gtsummary::tbl_regression(modelo, digits=3, tidy_fun = broom.mixed::tidy)
Characteristic Beta 95% CI1 p-value
Inmov


    _0No
    _1dom 53 46, 61 <0.001
    _2ndo 63 56, 71 <0.001
DNI.sd__(Intercept) 56

Residual.sd__Observation 17

1 CI = Confidence Interval
sjPlot::tab_model(modelo)
  Valor
Predictors Estimates CI p
(Intercept) 274.02 255.80 – 292.25 <0.001
Inmov [_1dom] 53.41 46.01 – 60.82 <0.001
Inmov [_2ndo] 63.41 56.01 – 70.82 <0.001
Random Effects
σ2 286.77
τ00 DNI 3187.00
ICC 0.92
N DNI 41
Observations 123
Marginal R2 / Conditional R2 0.184 / 0.933

Vamos a mostrar la gráfica de pruebas ANOVA de medidas repetidas equivalente a la tabla:

p3<-ggwithinstats(dh , x = Inmov, y = Valor, pairwise.comparisons = TRUE, pairwise.display = "significant", pairwise.grouping.line.type = "segment",bf.message=FALSE,
                  point.args = list(position = position_jitter(width = 0.1, height = 0))) +labs(y="Total surface")
p3

Este gráfico dice incluso algo más que la tabla. Hay diferencias también entre el lado dominante y no dominante. Sale significativo todo contra todo.

Objetivo 3

Estudiar si hay diferencias entre ojos Abiertos y cerrados independendientemente de la inmovilizacion (y la dominancia)

di=dfLong %>% select(DNI,Ojos,Variable,Dominante,Inmov, Valor) %>% filter(Variable=="AreaBalanceo")

modelo<-lmer(Valor~Ojos+Inmov +(1|DNI),data=di)
summary(modelo)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: Valor ~ Ojos + Inmov + (1 | DNI)
   Data: di

REML criterion at convergence: 2165.3

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-2.4460 -0.4156 -0.1470  0.2167  4.7634 

Random effects:
 Groups   Name        Variance Std.Dev.
 DNI      (Intercept) 354      18.82   
 Residual             296      17.21   
Number of obs: 246, groups:  DNI, 41

Fixed effects:
            Estimate Std. Error      df t value Pr(>|t|)    
(Intercept)   27.598      3.667  72.800   7.525 1.11e-10 ***
OjosOE        -4.557      2.194 202.000  -2.077   0.0391 *  
Inmov_1dom    -1.660      2.687 202.000  -0.618   0.5375    
Inmov_2ndo    -4.451      2.687 202.000  -1.657   0.0992 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Correlation of Fixed Effects:
           (Intr) OjosOE Inmv_1
OjosOE     -0.299              
Inmov_1dom -0.366  0.000       
Inmov_2ndo -0.366  0.000  0.500
gtsummary::tbl_regression(modelo, digits=3, tidy_fun = broom.mixed::tidy)
Characteristic Beta 95% CI1 p-value
Ojos


    CE
    OE -4.6 -8.9, -0.23 0.039
Inmov


    _0No
    _1dom -1.7 -7.0, 3.6 0.5
    _2ndo -4.5 -9.7, 0.85 0.10
DNI.sd__(Intercept) 19

Residual.sd__Observation 17

1 CI = Confidence Interval
sjPlot::tab_model(modelo)
  Valor
Predictors Estimates CI p
(Intercept) 27.60 20.37 – 34.82 <0.001
Ojos [OE] -4.56 -8.88 – -0.23 0.039
Inmov [_1dom] -1.66 -6.95 – 3.63 0.537
Inmov [_2ndo] -4.45 -9.74 – 0.84 0.099
Random Effects
σ2 296.04
τ00 DNI 354.05
ICC 0.54
N DNI 41
Observations 246
Marginal R2 / Conditional R2 0.013 / 0.551

Pues nada… Aquí solo hay un efecto de los ojos. La inmovilización no juega gran cosa. Por curiosidad vamos a visualizarlo, pero no se necesita. Ademas en el siguiente gráfico se ve que los datos no tienen distribución normal, así que paso a mostrarlo con pruebas no paramétricas.

p4<-ggwithinstats(di %>% filter(Ojos=="CE"), x = Inmov, y = Valor, pairwise.comparisons = TRUE,
   type="np" ,  pairwise.display = "significant", pairwise.grouping.line.type = "segment",bf.message=FALSE,
                  point.args = list(position = position_jitter(width = 0.1, height = 0))) 
p4

p5<-ggwithinstats(di %>% filter(Ojos=="OE"), x = Inmov, y = Valor, pairwise.comparisons = TRUE,
   type="np" ,  pairwise.display = "significant",  pairwise.grouping.line.type = "segment",bf.message=FALSE,
                  point.args = list(position = position_jitter(width = 0.1, height = 0))
   ) 
p5

Esto ya no es de interés

indices=dfLong$Variable=="AreaBalanceo"
dfLong[["Valor"]][indices]=log(dfLong[["Valor"]][indices])
dfLong %>% 
  ggplot(aes(x=Inmov,y=Valor,fill=Ojos))+
  geom_boxplot()+
  facet_wrap(~Variable,ncol=3,scales="free_y")+
  theme_bw()+
  theme(legend.position = "bottom")+
  labs(title = "Apoyo Plantar",x="Ojos",y="Valor")

Se ven valores anómalos. Vamos a darle más detalle.

dfLong %>% 
  ggplot(aes(x = Inmov, y = Valor, fill = Ojos,color=Ojos)) +
  geom_boxplot(alpha=0.45) +
  geom_jitter(width = 0.2, size = 1.5, alpha = 0.20) + # Puntos jittered
  facet_wrap(~Variable, ncol = 3, scales = "free_y") +
  theme_bw() +
  theme(legend.position = "bottom") +
  labs(title = "Apoyo Plantar", x = "Inmovilización", y = "Valor")

Y ahora veamos COP (x,y)

dfLongCOP=dfLong %>% filter(str_detect(Variable,"COP")) %>% 
  pivot_wider (names_from="Variable", values_from="Valor")

dfLongCOP %>% mutate(n1=length(COPx),n2=length(COPy)) %>% filter(n1>1|n2>2)
# A tibble: 246 × 12
        DNI  Edad Sexo     Dominante Actividad Ocupacion Inmov Ojos   COPx  COPy
      <dbl> <dbl> <dbl+lb> <dbl+lbl> <dbl+lbl> <dbl+lbl> <fct> <chr> <dbl> <dbl>
 1  7998198    47 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _0No  CE      0.3 -56.4
 2  7998198    47 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _1dom CE      0   -57.5
 3  7998198    47 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _2ndo CE     -1.8 -59  
 4  7998198    47 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _0No  OE     -0.5 -55.6
 5  7998198    47 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _1dom OE      0   -56.8
 6  7998198    47 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _2ndo OE      0.4 -59.8
 7 24224373    55 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _0No  CE      1.4 -68.3
 8 24224373    55 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _1dom CE      2.2 -67.3
 9 24224373    55 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _2ndo CE      0.8 -69  
10 24224373    55 0 [Fema… 0 [Right] 0 [Sende… 1 [Worke… _0No  OE     -1.8 -61.5
# ℹ 236 more rows
# ℹ 2 more variables: n1 <int>, n2 <int>

{r}))

dfLongCOP %>% 
  ggplot(aes(x = COPx, y = COPy, fill = Ojos,color=Ojos)) +
  geom_jitter(width = 0.2, size = 1.5, alpha = 0.75) + # Puntos jittered
  facet_wrap(~Inmov, ncol = 3, scales = "free_y") +
  theme_bw() +
  theme(legend.position = "bottom") +
  labs(title = "Apoyo Plantar", x = "COP_X", y = "COP_Y")

Hay valores feos que llegan a demormar el gráfico. Los quito de la vista:

dfLongCOP %>% 
  ggplot(aes(x = COPx, y = COPy, fill = Ojos,color=Ojos)) +
  geom_jitter(width = 0.2, size = 1.5, alpha = 0.75) + # Puntos jittered
  facet_wrap(~Inmov, ncol = 3, scales = "free_y") +
  coord_cartesian(xlim=c(-10,10))+
  theme_bw() +
  theme(legend.position = "bottom") +
  labs(title = "Apoyo Plantar", x = "COP_X", y = "COP_Y")