jmv::descriptives(mydata, vars = vars("age.chron", "idi", "mma", "ig.anxiety", "att.aging", "age.congruence"), missing = FALSE)
##
## DESCRIPTIVES
##
## Descriptives
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────
## age.chron idi mma ig.anxiety att.aging age.congruence
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────
## N 245 190 195 294 311 234
## Mean 40.71020 2.270175 3.284615 3.329592 3.305640 3.136752
## Median 35.00000 2.222222 3.300000 3.333333 3.333333 0.000000
## Standard deviation 13.64335 0.8341701 0.6547560 0.5097524 0.4921105 12.19048
## Minimum 23.00000 1.000000 1.800000 1.750000 1.833333 -74.00000
## Maximum 76.00000 4.000000 4.450000 4.833333 4.636364 42.00000
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────
IDI <- dplyr::select(mydata, idi1:idi9)
psych::alpha(IDI) #alpha = .89
##
## Reliability analysis
## Call: psych::alpha(x = IDI)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.89 0.89 0.89 0.47 7.9 0.0085 2.3 0.83 0.46
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.87 0.89 0.9
## Duhachek 0.87 0.89 0.9
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## idi1 0.89 0.89 0.89 0.49 7.8 0.0087 0.0085 0.50
## idi2 0.87 0.87 0.88 0.47 7.0 0.0095 0.0118 0.47
## idi3 0.87 0.87 0.87 0.46 6.8 0.0098 0.0106 0.46
## idi4 0.87 0.87 0.87 0.46 6.7 0.0099 0.0093 0.45
## idi5 0.87 0.87 0.87 0.45 6.5 0.0101 0.0090 0.45
## idi6 0.87 0.87 0.87 0.46 6.9 0.0095 0.0115 0.46
## idi7 0.87 0.87 0.87 0.46 6.8 0.0097 0.0100 0.46
## idi8 0.87 0.87 0.88 0.46 6.9 0.0096 0.0108 0.45
## idi9 0.88 0.89 0.89 0.49 7.7 0.0088 0.0097 0.50
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## idi1 190 0.61 0.61 0.54 0.50 2.7 1.1
## idi2 190 0.73 0.73 0.69 0.65 2.3 1.1
## idi3 190 0.77 0.76 0.73 0.68 2.3 1.2
## idi4 190 0.78 0.77 0.75 0.70 2.1 1.2
## idi5 190 0.80 0.80 0.79 0.74 1.9 1.1
## idi6 190 0.74 0.74 0.70 0.65 2.3 1.2
## idi7 190 0.75 0.76 0.73 0.68 2.1 1.1
## idi8 190 0.73 0.74 0.70 0.65 2.3 1.1
## idi9 190 0.62 0.62 0.55 0.51 2.4 1.1
##
## Non missing response frequency for each item
## 1 2 3 4 5 miss
## idi1 0.22 0.17 0.31 0.29 0.01 0.52
## idi2 0.35 0.19 0.28 0.17 0.01 0.52
## idi3 0.42 0.12 0.25 0.19 0.02 0.52
## idi4 0.47 0.17 0.17 0.16 0.02 0.52
## idi5 0.50 0.22 0.14 0.13 0.01 0.52
## idi6 0.37 0.22 0.21 0.21 0.01 0.52
## idi7 0.42 0.19 0.24 0.15 0.00 0.52
## idi8 0.32 0.18 0.34 0.15 0.01 0.52
## idi9 0.25 0.27 0.29 0.17 0.01 0.52
MMA<- dplyr::select(mydata, mma1:mma2, mma3R, mma4, mma5R, mma6:mma9, mma10R,
mma11:mma12, mma13R, mma14:mma18, mma19R, mma20R)
psych::alpha(MMA) #alpha = .84
## Warning in psych::alpha(MMA): Some items were negatively correlated with the total scale and probably
## should be reversed.
## To do this, run the function again with the 'check.keys=TRUE' option
## Some items ( mma20R ) were negatively correlated with the total scale and
## probably should be reversed.
## To do this, run the function again with the 'check.keys=TRUE' option
##
## Reliability analysis
## Call: psych::alpha(x = MMA)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.85 0.84 0.91 0.21 5.3 0.01 3.3 0.65 0.21
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.83 0.85 0.87
## Duhachek 0.83 0.85 0.87
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## mma1 0.83 0.82 0.90 0.20 4.6 0.0118 0.074 0.20
## mma2 0.83 0.83 0.90 0.20 4.7 0.0116 0.073 0.20
## mma3R 0.85 0.84 0.90 0.21 5.1 0.0105 0.074 0.23
## mma4 0.84 0.84 0.90 0.21 5.1 0.0110 0.073 0.20
## mma5R 0.85 0.84 0.90 0.22 5.3 0.0103 0.071 0.23
## mma6 0.85 0.85 0.91 0.23 5.6 0.0102 0.070 0.23
## mma7 0.83 0.83 0.90 0.20 4.8 0.0115 0.074 0.20
## mma8 0.85 0.84 0.91 0.22 5.3 0.0105 0.074 0.21
## mma9 0.84 0.84 0.90 0.21 5.1 0.0108 0.075 0.20
## mma10R 0.85 0.84 0.90 0.22 5.4 0.0102 0.071 0.22
## mma11 0.83 0.82 0.90 0.20 4.7 0.0118 0.071 0.20
## mma12 0.83 0.82 0.90 0.20 4.6 0.0119 0.072 0.20
## mma13R 0.85 0.84 0.90 0.22 5.3 0.0104 0.073 0.23
## mma14 0.84 0.84 0.90 0.21 5.1 0.0109 0.073 0.20
## mma15 0.83 0.82 0.90 0.20 4.6 0.0119 0.071 0.20
## mma16 0.83 0.83 0.90 0.20 4.7 0.0117 0.072 0.20
## mma17 0.84 0.83 0.90 0.21 5.0 0.0111 0.073 0.20
## mma18 0.83 0.83 0.90 0.20 4.7 0.0116 0.071 0.20
## mma19R 0.85 0.84 0.90 0.22 5.3 0.0102 0.071 0.23
## mma20R 0.87 0.86 0.92 0.25 6.4 0.0091 0.057 0.24
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## mma1 195 0.74 0.74 0.73 0.69 2.6 1.3
## mma2 195 0.70 0.68 0.67 0.63 2.9 1.4
## mma3R 195 0.42 0.46 0.44 0.35 3.8 1.1
## mma4 195 0.53 0.50 0.47 0.45 2.7 1.3
## mma5R 195 0.34 0.39 0.37 0.26 3.7 1.2
## mma6 195 0.25 0.22 0.17 0.15 3.2 1.3
## mma7 195 0.67 0.66 0.64 0.60 3.1 1.3
## mma8 195 0.36 0.35 0.30 0.28 3.7 1.3
## mma9 195 0.50 0.48 0.44 0.41 3.1 1.4
## mma10R 195 0.29 0.34 0.31 0.22 3.9 1.1
## mma11 195 0.74 0.73 0.72 0.69 2.8 1.3
## mma12 195 0.76 0.75 0.75 0.71 3.0 1.4
## mma13R 195 0.34 0.39 0.37 0.27 3.9 1.1
## mma14 195 0.50 0.48 0.45 0.42 2.8 1.4
## mma15 195 0.78 0.76 0.76 0.73 2.5 1.4
## mma16 195 0.71 0.70 0.69 0.66 3.0 1.3
## mma17 195 0.58 0.55 0.53 0.50 3.3 1.4
## mma18 195 0.70 0.68 0.67 0.65 2.8 1.3
## mma19R 195 0.30 0.34 0.32 0.21 4.0 1.2
## mma20R 195 -0.24 -0.21 -0.28 -0.33 4.9 1.2
##
## Non missing response frequency for each item
## 1 2 3 4 5 6 7 miss
## mma1 0.25 0.28 0.21 0.16 0.09 0.01 0.00 0.5
## mma2 0.19 0.27 0.13 0.26 0.12 0.03 0.00 0.5
## mma3R 0.00 0.02 0.48 0.33 0.06 0.07 0.04 0.5
## mma4 0.19 0.36 0.15 0.17 0.10 0.02 0.00 0.5
## mma5R 0.00 0.01 0.58 0.24 0.05 0.08 0.05 0.5
## mma6 0.09 0.32 0.12 0.28 0.16 0.02 0.00 0.5
## mma7 0.12 0.26 0.15 0.30 0.14 0.02 0.00 0.5
## mma8 0.07 0.16 0.11 0.36 0.30 0.01 0.00 0.5
## mma9 0.15 0.26 0.12 0.29 0.15 0.02 0.00 0.5
## mma10R 0.00 0.01 0.42 0.37 0.08 0.10 0.03 0.5
## mma11 0.19 0.30 0.13 0.26 0.11 0.01 0.00 0.5
## mma12 0.19 0.21 0.18 0.26 0.14 0.01 0.00 0.5
## mma13R 0.00 0.00 0.43 0.39 0.07 0.06 0.05 0.5
## mma14 0.19 0.33 0.11 0.24 0.13 0.01 0.00 0.5
## mma15 0.29 0.32 0.12 0.15 0.11 0.01 0.00 0.5
## mma16 0.15 0.26 0.12 0.36 0.10 0.02 0.00 0.5
## mma17 0.14 0.21 0.10 0.33 0.22 0.01 0.00 0.5
## mma18 0.16 0.34 0.13 0.26 0.10 0.01 0.00 0.5
## mma19R 0.00 0.01 0.41 0.38 0.06 0.07 0.07 0.5
## mma20R 0.00 0.02 0.12 0.30 0.17 0.31 0.08 0.5
ASD.y<- dplyr::select(mydata, asd1.y:asd19.y) #aging semantic difference scale - younger
psych::alpha(ASD.y) #alpha = .9
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = ASD.y)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.9 0.9 0.96 0.33 9.3 0.0069 34 11 0.36
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.88 0.9 0.91
## Duhachek 0.88 0.9 0.91
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## asd1.y 0.90 0.90 0.96 0.34 9.3 0.0070 0.040 0.37
## asd2.y 0.90 0.90 0.95 0.33 8.8 0.0070 0.043 0.36
## asd3.y 0.90 0.91 0.96 0.35 9.9 0.0070 0.033 0.37
## asd4.y 0.89 0.89 0.95 0.32 8.5 0.0076 0.042 0.36
## asd5.y 0.90 0.90 0.95 0.34 9.2 0.0070 0.037 0.37
## asd6.y 0.89 0.90 0.96 0.33 8.8 0.0073 0.042 0.37
## asd7.y 0.89 0.90 0.95 0.32 8.5 0.0074 0.042 0.34
## asd8.y 0.89 0.90 0.95 0.34 9.1 0.0072 0.034 0.37
## asd9.y 0.89 0.90 0.95 0.32 8.6 0.0075 0.042 0.36
## asd10.y 0.89 0.90 0.95 0.32 8.6 0.0075 0.040 0.36
## asd11.y 0.89 0.89 0.95 0.32 8.4 0.0077 0.040 0.35
## asd12.y 0.89 0.90 0.95 0.33 8.8 0.0073 0.039 0.36
## asd13.y 0.90 0.90 0.95 0.34 9.1 0.0068 0.038 0.37
## asd14.y 0.89 0.90 0.95 0.32 8.6 0.0074 0.042 0.36
## asd15.y 0.89 0.89 0.95 0.32 8.4 0.0075 0.040 0.36
## asd16.y 0.89 0.90 0.95 0.33 8.8 0.0074 0.041 0.36
## asd17.y 0.89 0.90 0.95 0.32 8.6 0.0075 0.041 0.36
## asd18.y 0.89 0.90 0.95 0.32 8.7 0.0074 0.039 0.36
## asd19.y 0.90 0.90 0.95 0.34 9.4 0.0068 0.035 0.37
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## asd1.y 48 0.36 0.46 0.44 0.35 2.3 1.1
## asd2.y 48 0.57 0.63 0.62 0.57 4.0 2.1
## asd3.y 48 0.18 0.28 0.24 0.18 4.5 2.1
## asd4.y 49 0.72 0.73 0.71 0.68 35.4 19.6
## asd5.y 49 0.50 0.48 0.46 0.43 36.9 19.1
## asd6.y 49 0.61 0.63 0.61 0.55 42.6 20.1
## asd7.y 49 0.68 0.71 0.69 0.62 41.2 20.4
## asd8.y 49 0.57 0.52 0.51 0.51 34.5 18.0
## asd9.y 49 0.70 0.68 0.66 0.65 42.1 20.4
## asd10.y 49 0.70 0.67 0.66 0.66 39.2 19.3
## asd11.y 49 0.78 0.74 0.74 0.75 40.7 19.3
## asd12.y 49 0.67 0.60 0.59 0.58 35.0 23.4
## asd13.y 49 0.45 0.52 0.51 0.38 46.9 21.0
## asd14.y 49 0.66 0.69 0.68 0.63 44.6 17.7
## asd15.y 49 0.72 0.75 0.75 0.67 42.9 23.0
## asd16.y 49 0.66 0.62 0.61 0.61 40.6 18.7
## asd17.y 49 0.68 0.67 0.66 0.63 36.4 19.6
## asd18.y 49 0.69 0.66 0.66 0.63 35.3 21.5
## asd19.y 49 0.38 0.42 0.41 0.32 46.4 17.1
ASD.m<- dplyr::select(mydata, asd1.m:asd19.m) #aging semantic difference scale - middle
psych::alpha(ASD.m) #alpha = .97
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = ASD.m)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.97 0.98 0.99 0.73 52 0.0014 35 18 0.75
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.97 0.97 0.98
## Duhachek 0.97 0.97 0.97
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## asd1.m 0.97 0.98 0.99 0.74 51 0.0015 0.0059 0.76
## asd2.m 0.97 0.98 0.99 0.74 52 0.0015 0.0052 0.76
## asd3.m 0.97 0.98 0.99 0.73 50 0.0015 0.0059 0.75
## asd4.m 0.97 0.98 0.99 0.73 49 0.0015 0.0063 0.75
## asd5.m 0.97 0.98 0.99 0.75 53 0.0014 0.0050 0.76
## asd6.m 0.97 0.98 0.99 0.73 48 0.0016 0.0060 0.75
## asd7.m 0.97 0.98 0.99 0.73 49 0.0016 0.0063 0.75
## asd8.m 0.97 0.98 0.99 0.73 50 0.0015 0.0064 0.76
## asd9.m 0.97 0.98 0.99 0.74 51 0.0015 0.0058 0.76
## asd10.m 0.97 0.98 0.99 0.73 49 0.0015 0.0059 0.75
## asd11.m 0.97 0.98 0.99 0.73 49 0.0016 0.0060 0.75
## asd12.m 0.97 0.98 0.99 0.73 49 0.0016 0.0062 0.75
## asd13.m 0.97 0.98 0.99 0.74 51 0.0015 0.0062 0.76
## asd14.m 0.97 0.98 0.99 0.73 49 0.0015 0.0062 0.75
## asd15.m 0.97 0.98 0.99 0.73 49 0.0016 0.0060 0.75
## asd16.m 0.97 0.98 0.99 0.73 49 0.0016 0.0059 0.75
## asd17.m 0.97 0.98 0.99 0.73 50 0.0015 0.0062 0.75
## asd18.m 0.97 0.98 0.99 0.73 48 0.0016 0.0062 0.75
## asd19.m 0.97 0.98 0.99 0.73 49 0.0015 0.0060 0.75
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## asd1.m 112 0.78 0.80 0.79 0.78 2.2 1.4
## asd2.m 114 0.73 0.77 0.76 0.74 4.5 2.3
## asd3.m 112 0.85 0.87 0.87 0.86 3.7 2.5
## asd4.m 111 0.88 0.89 0.89 0.86 39.0 25.3
## asd5.m 113 0.75 0.76 0.75 0.72 44.6 24.0
## asd6.m 112 0.92 0.91 0.91 0.90 39.8 24.3
## asd7.m 112 0.90 0.90 0.90 0.89 41.3 24.0
## asd8.m 113 0.86 0.86 0.85 0.84 42.9 24.7
## asd9.m 113 0.85 0.83 0.82 0.82 38.7 26.8
## asd10.m 112 0.88 0.88 0.88 0.87 37.9 24.8
## asd11.m 111 0.91 0.91 0.91 0.90 39.0 24.1
## asd12.m 113 0.90 0.90 0.89 0.89 41.2 25.6
## asd13.m 111 0.81 0.82 0.81 0.79 44.8 23.3
## asd14.m 113 0.89 0.88 0.88 0.87 43.5 25.5
## asd15.m 112 0.91 0.90 0.90 0.90 38.4 24.4
## asd16.m 113 0.89 0.89 0.89 0.88 37.7 25.4
## asd17.m 112 0.86 0.86 0.85 0.84 40.9 25.2
## asd18.m 111 0.92 0.92 0.92 0.91 39.7 23.5
## asd19.m 113 0.88 0.88 0.87 0.86 40.3 24.4
ASD.o<- dplyr::select(mydata, asd1.o:asd19.o) #aging semantic difference scale - older
psych::alpha(ASD.o) #alpha = .96
## Number of categories should be increased in order to count frequencies.
##
## Reliability analysis
## Call: psych::alpha(x = ASD.o)
##
## raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
## 0.97 0.98 0.98 0.67 39 0.0019 37 17 0.69
##
## 95% confidence boundaries
## lower alpha upper
## Feldt 0.96 0.97 0.97
## Duhachek 0.96 0.97 0.97
##
## Reliability if an item is dropped:
## raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## asd1.o 0.97 0.97 0.98 0.68 38 0.0019 0.0134 0.70
## asd2.o 0.97 0.97 0.98 0.68 39 0.0019 0.0120 0.69
## asd3.o 0.97 0.98 0.98 0.68 39 0.0019 0.0102 0.69
## asd4.o 0.96 0.97 0.98 0.68 38 0.0019 0.0137 0.69
## asd5.o 0.97 0.98 0.98 0.69 40 0.0018 0.0094 0.70
## asd6.o 0.96 0.97 0.98 0.67 37 0.0020 0.0130 0.69
## asd7.o 0.96 0.97 0.98 0.67 36 0.0020 0.0136 0.68
## asd8.o 0.96 0.97 0.98 0.68 37 0.0020 0.0136 0.69
## asd9.o 0.96 0.97 0.98 0.67 36 0.0021 0.0134 0.69
## asd10.o 0.96 0.97 0.98 0.67 37 0.0020 0.0128 0.68
## asd11.o 0.96 0.97 0.98 0.67 36 0.0021 0.0126 0.68
## asd12.o 0.96 0.97 0.98 0.67 36 0.0020 0.0135 0.68
## asd13.o 0.96 0.97 0.98 0.67 37 0.0020 0.0136 0.69
## asd14.o 0.96 0.97 0.98 0.67 36 0.0021 0.0129 0.68
## asd15.o 0.96 0.97 0.98 0.67 37 0.0020 0.0135 0.69
## asd16.o 0.96 0.97 0.98 0.67 37 0.0020 0.0122 0.69
## asd17.o 0.96 0.97 0.98 0.67 37 0.0020 0.0139 0.69
## asd18.o 0.96 0.97 0.98 0.67 37 0.0020 0.0135 0.69
## asd19.o 0.96 0.97 0.98 0.68 38 0.0019 0.0117 0.69
##
## Item statistics
## n raw.r std.r r.cor r.drop mean sd
## asd1.o 130 0.73 0.77 0.75 0.74 2.5 1.2
## asd2.o 129 0.73 0.75 0.75 0.73 4.8 2.2
## asd3.o 132 0.72 0.73 0.73 0.72 3.5 2.5
## asd4.o 128 0.79 0.80 0.79 0.77 41.4 22.8
## asd5.o 131 0.65 0.68 0.68 0.62 53.2 22.2
## asd6.o 131 0.87 0.87 0.87 0.85 41.0 22.7
## asd7.o 131 0.88 0.88 0.88 0.86 44.8 21.9
## asd8.o 130 0.81 0.82 0.81 0.79 47.9 22.4
## asd9.o 129 0.90 0.90 0.89 0.88 44.8 23.2
## asd10.o 131 0.87 0.87 0.86 0.85 37.7 24.1
## asd11.o 129 0.91 0.91 0.91 0.90 41.6 23.3
## asd12.o 131 0.90 0.89 0.89 0.88 42.9 21.8
## asd13.o 130 0.84 0.83 0.82 0.81 44.3 23.6
## asd14.o 130 0.92 0.91 0.91 0.91 41.7 23.4
## asd15.o 130 0.85 0.85 0.84 0.83 44.3 24.9
## asd16.o 130 0.86 0.85 0.85 0.84 38.9 25.0
## asd17.o 129 0.85 0.85 0.84 0.83 45.1 22.8
## asd18.o 130 0.84 0.84 0.83 0.82 46.1 22.8
## asd19.o 130 0.80 0.79 0.79 0.77 39.1 24.1
ggviolin(data=subset(mydata, !is.na(idi)), x = "age.group.f", y = "idi", fill = "#F5EABF",
add = "boxplot", add.params = list(fill = "#94AEBC")) +
coord_flip()

ggviolin(data=subset(mydata, !is.na(idi)), x = "age.group.f", y = "mma", fill = "#F5EABF",
add = "boxplot", add.params = list(fill = "#94AEBC")) +
coord_flip()
## Warning: Removed 9 rows containing non-finite values (`stat_ydensity()`).
## Warning: Removed 9 rows containing non-finite values (`stat_boxplot()`).

ggviolin(data=subset(mydata, !is.na(idi)), x = "age.group.f", y = "att.aging", fill = "#F5EABF",
add = "boxplot", add.params = list(fill = "#94AEBC")) +
coord_flip()

corr.df<- mydata[,c("age.chron", "att.aging", "idi", "mma")]
#calculating correlations and CIs
cor1 <- cor.mtest(corr.df, use="pairwise.complete.obs", conf.level = 0.95)
cor1
## $p
## age.chron att.aging idi mma
## age.chron 0.000000e+00 0.023366534 1.364118e-05 1.549046e-11
## att.aging 2.336653e-02 0.000000000 6.114464e-02 5.302071e-03
## idi 1.364118e-05 0.061144638 0.000000e+00 4.520382e-20
## mma 1.549046e-11 0.005302071 4.520382e-20 0.000000e+00
##
## $lowCI
## age.chron att.aging idi mma
## age.chron 1.00000000 0.02003395 -0.4791117 -0.6115729
## att.aging 0.02003395 1.00000000 -0.2731676 -0.3302199
## idi -0.47911170 -0.27316762 1.0000000 0.5131914
## mma -0.61157287 -0.33021992 0.5131914 1.0000000
##
## $uppCI
## age.chron att.aging idi mma
## age.chron 1.0000000 0.26746159 -0.19700489 -0.3770137
## att.aging 0.2674616 1.00000000 0.00636975 -0.0601061
## idi -0.1970049 0.00636975 1.00000000 0.6967024
## mma -0.3770137 -0.06010610 0.69670238 1.0000000
cor1b <- cor(corr.df, use="pairwise.complete.obs")
rownames(cor1b) <- c("Age",
"Attitude toward aging",
"Intersectional discrimination index",
"Multidimensional mortality awareness")
colnames(cor1b) <- c("Age",
"Attitude toward aging",
"Intersectional discrimination index",
"Multidimensional mortality awareness")
corrplot(cor1b, method = "color",type = "upper",
p.mat = cor1$p, addCoef.col = 'black', sig.level = 0.05,
insig = "blank", number.cex=0.8, tl.col="#94AEBC",
col=colorRampPalette(c("#94AEBC", "#F5EABF", "#728393"))(50), cl.pos = 'n')
## Warning in corrplot(cor1b, method = "color", type = "upper", p.mat = cor1$p, :
## p.mat and corr may be not paired, their rownames and colnames are not totally
## same!

dplyr::count(mydata, 'age.group.f')
## # A tibble: 1 × 2
## `"age.group.f"` n
## <chr> <int>
## 1 age.group.f 393
ggplot(data=subset(mydata, !is.na(age.group.f)), aes(x=mma, y=age.group.f)) +
geom_boxplot(fill='#F5EABF', color='#94AEBC') +
coord_flip() +
theme_classic() +
labs(x = "age group", y = "multidimensional mortality awareness", title ='multidimensional mortality awareness across age groups')
## Warning: Removed 180 rows containing non-finite values (`stat_boxplot()`).

ggplot(data=subset(mydata, !is.na(age.group.f)), aes(x=att.aging, y=age.group.f)) +
geom_boxplot(fill='#F5EABF', color='#94AEBC') +
coord_flip() +
theme_classic() +
labs(x = "age group", y = "attitude toward aging", title ='attitude toward aging across age groups')
## Warning: Removed 64 rows containing non-finite values (`stat_boxplot()`).

ggplot(data=subset(mydata, !is.na(age.group.f)), aes(x=idi, y=age.group.f)) +
geom_boxplot(fill='#F5EABF', color='#94AEBC') +
coord_flip() +
theme_classic() +
labs(x = "intersectional discrimination index", y = "age group", title ='intersectional discrimination index across age groups')
## Warning: Removed 185 rows containing non-finite values (`stat_boxplot()`).
