library(readr)
d <- read_csv("data.csv")
## New names:
## Rows: 211 Columns: 30
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (7): recruitment, year, occupation, duration, Q19, Q22, Q23 dbl (23): ...1, ID,
## age, gender, sexuality, born, ethnicity, income, fam_inc...
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `` -> `...1`
d <- d[-c(211),]
#full dataset
write.csv(d, file = "FGP_fulldataset_data.csv", row.names = FALSE)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
d <- data.frame(d$fgp, d$sap_dis, d$fof, d$wswb, d$anxiety, d$depression, d$wellbeing)
d <- rename(d, fgp = d.fgp, sap_dis = d.sap_dis, fof = d.fof, swfw = d.wswb, anxiety = d.anxiety, depression = d.depression, wellbeing = d.wellbeing)
d <- na.omit(d)
d[163, 1] = "2"
#changing FGP variable to a character
d <- d %>%
mutate_at(c(1), as.character) #here i am changing the fgp variable from a numeric to character
str(d)
## 'data.frame': 203 obs. of 7 variables:
## $ fgp : chr "1" "1" "1" "1" ...
## $ sap_dis : num 27 19 15 17 24 18 15 19 20 26 ...
## $ fof : num 4.4 3.2 3.2 2.2 2.4 2.8 1.6 2.8 2.4 2.8 ...
## $ swfw : num 4.25 6.14 5.36 4.21 5.96 5.29 4.96 5.83 4.56 6.11 ...
## $ anxiety : num 1 1.14 1.71 1.43 1.86 1.71 1.29 2.14 1.43 2.57 ...
## $ depression: num 1.67 1.56 1.33 1.67 1.56 1.33 1.67 2.56 1.44 2.11 ...
## $ wellbeing : num 2.4 3 3.2 3.2 2.6 3.6 2.6 1 3.6 3 ...
## - attr(*, "na.action")= 'omit' Named int [1:7] 47 85 89 152 159 175 199
## ..- attr(*, "names")= chr [1:7] "47" "85" "89" "152" ...
#change firstgen variable to be categorical
d$fgp <- factor(d$fgp, #good idea to label IV as categorical factor
levels = c("1", "2"),
labels = c("firstgen", "contgen"))
table <- apaTables::apa.cor.table(d, table.number = 1, show.sig.stars = TRUE,
landscape = TRUE, filename = "table.doc")
psych::pairs.panels(d)
print(table)
##
##
## Table 1
##
## Means, standard deviations, and correlations with confidence intervals
##
##
## Variable M SD 1 2 3 4
## 1. sap_dis 20.39 4.42
##
## 2. fof 3.00 0.95 .48**
## [.36, .58]
##
## 3. swfw 5.14 0.90 -.10 -.32**
## [-.23, .04] [-.44, -.19]
##
## 4. anxiety 1.85 0.77 .42** .45** -.26**
## [.30, .52] [.34, .56] [-.38, -.12]
##
## 5. depression 1.75 0.67 .36** .42** -.38** .80**
## [.23, .47] [.30, .53] [-.49, -.25] [.74, .84]
##
## 6. wellbeing 3.02 0.92 -.08 -.24** .27** -.27**
## [-.22, .06] [-.37, -.11] [.14, .39] [-.40, -.14]
##
## 5
##
##
##
##
##
##
##
##
##
##
##
##
##
##
## -.34**
## [-.46, -.21]
##
##
## Note. M and SD are used to represent mean and standard deviation, respectively.
## Values in square brackets indicate the 95% confidence interval.
## The confidence interval is a plausible range of population correlations
## that could have caused the sample correlation (Cumming, 2014).
## * indicates p < .05. ** indicates p < .01.
##
# Load the pwr package
library(pwr)
# Set parameters
effect_size <- 0.5 # Cohen's d effect size
alpha <- 0.05 # Significance level
power <- 0.80 # Desired power
sample_size <- NULL # We want to find the sample size
# Perform power analysis
pwr.t.test(d = effect_size, sig.level = alpha, power = power)
##
## Two-sample t test power calculation
##
## n = 63.76561
## d = 0.5
## sig.level = 0.05
## power = 0.8
## alternative = two.sided
##
## NOTE: n is number in *each* group
# The output will give you the sample size needed for the specified effect size, significance level, and power.
#Levene's test to check for unequal variances in DV between groups (assumption)
library(car)
## Loading required package: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
leveneTest(d$sap_dis, d$fgp) #(note: put DV before IV in the code)
#to get Descriptives for each group
library(pastecs)
##
## Attaching package: 'pastecs'
## The following objects are masked from 'package:dplyr':
##
## first, last
by(d$sap_dis, d$fgp, stat.desc, basic = FALSE, norm = TRUE)
## d$fgp: firstgen
## median mean SE.mean CI.mean.0.95 var std.dev
## 21.000000000 20.983050847 0.381178029 0.754903113 17.145009416 4.140653260
## coef.var skewness skew.2SE kurtosis kurt.2SE normtest.W
## 0.197333233 -0.016712561 -0.037523091 -0.931138936 -1.053598542 0.968665246
## normtest.p
## 0.007370079
## ------------------------------------------------------------
## d$fgp: contgen
## median mean SE.mean CI.mean.0.95 var std.dev
## 19.000000000 19.564705882 0.507767966 1.009752287 21.915406162 4.681389341
## coef.var skewness skew.2SE kurtosis kurt.2SE normtest.W
## 0.239277266 0.043804866 0.083868183 -0.273525993 -0.264656644 0.957857986
## normtest.p
## 0.007245632
#"by" command gives descriptives (stat.desc) broken down *BY* IV groups)
#"stat.desc" function gives descriptives. "norm = TRUE" gives normality info
#Independent samples t-test (Note: DV ~ IV)
options(scipen=999) #turning off scientific notation (optional)
model1 <- t.test(sap_dis ~ fgp, data = d, paired = FALSE, var.equal = TRUE)
#"var.equal" assumes equal variances (FALSE if unequal variances)
model1 #prints the model output
##
## Two Sample t-test
##
## data: sap_dis by fgp
## t = 2.2789, df = 201, p-value = 0.02372
## alternative hypothesis: true difference in means between group firstgen and group contgen is not equal to 0
## 95 percent confidence interval:
## 0.1911216 2.6455684
## sample estimates:
## mean in group firstgen mean in group contgen
## 20.98305 19.56471
# note: if var.equal = FALSE, get "Welch's t-test" that corrects df for unequal variances
#Cohen's d effect size
library(effsize)
#in cohen.d, put DV first then IV, then specify paired or not
cohen.d(d$sap_dis, d$fgp, paired=FALSE)
##
## Cohen's d
##
## d estimate: 0.3242102 (small)
## 95 percent confidence interval:
## lower upper
## 0.04189873 0.60652170
#Note: if you see a warning about functions being "masked" or "unused arguments"
#...you may need to turn off other competing packages or just do this:
#package::functionName (which tells R to use the function only for that package)
#effsize::cohen.d(df6$sap_mal_perf, df6$first_gen, paired=FALSE)
#creating BOX PLOT
library(ggplot2)
library(Hmisc)
##
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
##
## src, summarize
## The following objects are masked from 'package:base':
##
## format.pval, units
boxplot <- ggplot(d, aes(fgp, sap_dis)) #basic layer created by aes (aesthetic mappings)
boxplot + #shows the basic layer
geom_boxplot() + #adds geom (geometric object) which is a boxplot
labs(x="First- vs. Continuing-Generation", y="Personal Maladaptive Perfectionism") + #adds labels
theme_classic() #removes gray background for APA style
#Levene's test to check for unequal variances in DV between groups (assumption)
library(car)
leveneTest(d$fof, d$fgp) #(note: put DV before IV in the code)
#to get Descriptives for each group
library(pastecs)
by(d$fof, d$fgp, stat.desc, basic = FALSE, norm = TRUE)
## d$fgp: firstgen
## median mean SE.mean CI.mean.0.95 var std.dev
## 3.00000000 3.03220339 0.08682499 0.17195235 0.88955237 0.94316084
## coef.var skewness skew.2SE kurtosis kurt.2SE normtest.W
## 0.31104801 0.15592885 0.35009192 -0.38161508 -0.43180355 0.97472499
## normtest.p
## 0.02513579
## ------------------------------------------------------------
## d$fgp: contgen
## median mean SE.mean CI.mean.0.95 var std.dev
## 3.0000000 2.9458824 0.1046476 0.2081033 0.9308459 0.9648036
## coef.var skewness skew.2SE kurtosis kurt.2SE normtest.W
## 0.3275092 -0.1333556 -0.2553208 -0.4801461 -0.4645769 0.9789823
## normtest.p
## 0.1799983
#"by" command gives descriptives (stat.desc) broken down *BY* IV groups)
#"stat.desc" function gives descriptives. "norm = TRUE" gives normality info
#Independent samples t-test (Note: DV ~ IV)
options(scipen=999) #turning off scientific notation (optional)
model2 <- t.test(fof ~ fgp, data = d, paired = FALSE, var.equal = TRUE)
#"var.equal" assumes equal variances (FALSE if unequal variances)
model2 #prints the model output
##
## Two Sample t-test
##
## data: fof by fgp
## t = 0.63718, df = 201, p-value = 0.5247
## alternative hypothesis: true difference in means between group firstgen and group contgen is not equal to 0
## 95 percent confidence interval:
## -0.1808113 0.3534534
## sample estimates:
## mean in group firstgen mean in group contgen
## 3.032203 2.945882
# note: if var.equal = FALSE, get "Welch's t-test" that corrects df for unequal variances
#Cohen's d effect size
library(effsize)
#in cohen.d, put DV first then IV, then specify paired or not
cohen.d(d$fof, d$fgp, paired=FALSE)
##
## Cohen's d
##
## d estimate: 0.09064809 (negligible)
## 95 percent confidence interval:
## lower upper
## -0.1900151 0.3713113
#Note: if you see a warning about functions being "masked" or "unused arguments"
#...you may need to turn off other competing packages or just do this:
#package::functionName (which tells R to use the function only for that package)
#effsize::cohen.d(df6$sap_mal_perf, df6$first_gen, paired=FALSE)
#creating BOX PLOT
library(ggplot2)
library(Hmisc)
boxplot <- ggplot(d, aes(fgp, sap_dis)) #basic layer created by aes (aesthetic mappings)
boxplot + #shows the basic layer
geom_boxplot() + #adds geom (geometric object) which is a boxplot
labs(x="First- vs. Continuing-Generation", y="Fear of Failure") + #adds labels
theme_classic() #removes gray background for APA style
# Independent Samples t-test Social Wellbeing from Work X FGP
#Levene's test to check for unequal variances in DV between groups (assumption)
library(car)
leveneTest(d$swfw, d$fgp) #(note: put DV before IV in the code)
#to get Descriptives for each group
library(pastecs)
by(d$swfw, d$fgp, stat.desc, basic = FALSE, norm = TRUE)
## d$fgp: firstgen
## median mean SE.mean CI.mean.0.95 var std.dev
## 5.21000000 5.12881356 0.07719694 0.15288450 0.70320542 0.83857344
## coef.var skewness skew.2SE kurtosis kurt.2SE normtest.W
## 0.16350242 -0.43003186 -0.96550880 -0.55266093 -0.62534465 0.97277268
## normtest.p
## 0.01682705
## ------------------------------------------------------------
## d$fgp: contgen
## median mean SE.mean CI.mean.0.95 var std.dev
## 5.25000000 5.16611765 0.10553732 0.20987253 0.94674070 0.97300601
## coef.var skewness skew.2SE kurtosis kurt.2SE normtest.W
## 0.18834376 -0.54741079 -1.04806504 0.10644730 0.10299564 0.97415927
## normtest.p
## 0.08541232
#"by" command gives descriptives (stat.desc) broken down *BY* IV groups)
#"stat.desc" function gives descriptives. "norm = TRUE" gives normality info
#Independent samples t-test (Note: DV ~ IV)
options(scipen=999) #turning off scientific notation (optional)
model3 <- t.test(swfw ~ fgp, data = d, paired = FALSE, var.equal = TRUE)
#"var.equal" assumes equal variances (FALSE if unequal variances)
model3 #prints the model output
##
## Two Sample t-test
##
## data: swfw by fgp
## t = -0.29226, df = 201, p-value = 0.7704
## alternative hypothesis: true difference in means between group firstgen and group contgen is not equal to 0
## 95 percent confidence interval:
## -0.2889914 0.2143832
## sample estimates:
## mean in group firstgen mean in group contgen
## 5.128814 5.166118
# note: if var.equal = FALSE, get "Welch's t-test" that corrects df for unequal variances
#Cohen's d effect size
library(effsize)
#in cohen.d, put DV first then IV, then specify paired or not
cohen.d(d$swfw, d$fgp, paired=FALSE)
##
## Cohen's d
##
## d estimate: -0.04157799 (negligible)
## 95 percent confidence interval:
## lower upper
## -0.3221305 0.2389745
#Note: if you see a warning about functions being "masked" or "unused arguments"
#...you may need to turn off other competing packages or just do this:
#package::functionName (which tells R to use the function only for that package)
#effsize::cohen.d(df6$sap_mal_perf, df6$first_gen, paired=FALSE)
#creating BOX PLOT
library(ggplot2)
library(Hmisc)
boxplot <- ggplot(d, aes(fgp, swfw)) #basic layer created by aes (aesthetic mappings)
boxplot + #shows the basic layer
geom_boxplot() + #adds geom (geometric object) which is a boxplot
labs(x="First- vs. Continuing-Generation", y="Social Wellbeing From Work") + #adds labels
theme_classic() #removes gray background for APA style
#Levene's test to check for unequal variances in DV between groups (assumption)
library(car)
leveneTest(d$anxiety, d$fgp) #(note: put DV before IV in the code)
#to get Descriptives for each group
library(pastecs)
by(d$anxiety, d$fgp, stat.desc, basic = FALSE, norm = TRUE)
## d$fgp: firstgen
## median mean SE.mean CI.mean.0.95 var
## 1.710000000000 1.888135593220 0.068940256259 0.136532564962 0.560825554107
## std.dev coef.var skewness skew.2SE kurtosis
## 0.748882870753 0.396625577867 0.813464290473 1.826392428529 -0.080815092468
## kurt.2SE normtest.W normtest.p
## -0.091443564769 0.916560114958 0.000001819748
## ------------------------------------------------------------
## d$fgp: contgen
## median mean SE.mean CI.mean.0.95 var
## 1.57000000000 1.79988235294 0.08681679963 0.17264472700 0.64065831933
## std.dev coef.var skewness skew.2SE kurtosis
## 0.80041134383 0.44470203429 1.11768869805 2.13991114467 0.62774397790
## kurt.2SE normtest.W normtest.p
## 0.60738876280 0.86558170854 0.00000029424
#"by" command gives descriptives (stat.desc) broken down *BY* IV groups)
#"stat.desc" function gives descriptives. "norm = TRUE" gives normality info
#Independent samples t-test (Note: DV ~ IV)
options(scipen=999) #turning off scientific notation (optional)
model4 <- t.test(anxiety ~ fgp, data = d, paired = FALSE, var.equal = TRUE)
#"var.equal" assumes equal variances (FALSE if unequal variances)
model4 #prints the model output
##
## Two Sample t-test
##
## data: anxiety by fgp
## t = 0.80477, df = 201, p-value = 0.4219
## alternative hypothesis: true difference in means between group firstgen and group contgen is not equal to 0
## 95 percent confidence interval:
## -0.1279840 0.3044905
## sample estimates:
## mean in group firstgen mean in group contgen
## 1.888136 1.799882
# note: if var.equal = FALSE, get "Welch's t-test" that corrects df for unequal variances
#Cohen's d effect size
library(effsize)
#in cohen.d, put DV first then IV, then specify paired or not
cohen.d(d$anxiety, d$fgp, paired=FALSE)
##
## Cohen's d
##
## d estimate: 0.1144903 (negligible)
## 95 percent confidence interval:
## lower upper
## -0.1662564 0.3952369
#Note: if you see a warning about functions being "masked" or "unused arguments"
#...you may need to turn off other competing packages or just do this:
#package::functionName (which tells R to use the function only for that package)
#effsize::cohen.d(df6$sap_mal_perf, df6$first_gen, paired=FALSE)
#creating BOX PLOT
library(ggplot2)
library(Hmisc)
boxplot <- ggplot(d, aes(fgp, anxiety)) #basic layer created by aes (aesthetic mappings)
boxplot + #shows the basic layer
geom_boxplot() + #adds geom (geometric object) which is a boxplot
labs(x="First- vs. Continuing-Generation", y="Anxiety") + #adds labels
theme_classic() #removes gray background for APA style
#Levene's test to check for unequal variances in DV between groups (assumption)
library(car)
leveneTest(d$depression, d$fgp) #(note: put DV before IV in the code)
#to get Descriptives for each group
library(pastecs)
by(d$depression, d$fgp, stat.desc, basic = FALSE, norm = TRUE)
## d$fgp: firstgen
## median mean SE.mean CI.mean.0.95 var
## 1.670000000000 1.814745762712 0.061740381592 0.122273590466 0.449801216862
## std.dev coef.var skewness skew.2SE kurtosis
## 0.670672212681 0.369568138117 0.827486641206 1.857875451828 -0.150279545379
## kurt.2SE normtest.W normtest.p
## -0.170043700026 0.910315663599 0.000000823506
## ------------------------------------------------------------
## d$fgp: contgen
## median mean SE.mean CI.mean.0.95 var
## 1.440000000000 1.665294117647 0.071632932241 0.142449941527 0.436158543417
## std.dev coef.var skewness skew.2SE kurtosis
## 0.660423003398 0.396580397660 1.324762284257 2.536371335835 1.531201893080
## kurt.2SE normtest.W normtest.p
## 1.481551167648 0.862531832190 0.000000227609
#"by" command gives descriptives (stat.desc) broken down *BY* IV groups)
#"stat.desc" function gives descriptives. "norm = TRUE" gives normality info
#Independent samples t-test (Note: DV ~ IV)
options(scipen=999) #turning off scientific notation (optional)
model5 <- t.test(depression ~ fgp, data = d, paired = FALSE, var.equal = TRUE)
#"var.equal" assumes equal variances (FALSE if unequal variances)
model5 #prints the model output
##
## Two Sample t-test
##
## data: depression by fgp
## t = 1.5764, df = 201, p-value = 0.1165
## alternative hypothesis: true difference in means between group firstgen and group contgen is not equal to 0
## 95 percent confidence interval:
## -0.03749116 0.33639445
## sample estimates:
## mean in group firstgen mean in group contgen
## 1.814746 1.665294
# note: if var.equal = FALSE, get "Welch's t-test" that corrects df for unequal variances
#Cohen's d effect size
library(effsize)
#in cohen.d, put DV first then IV, then specify paired or not
cohen.d(d$depression, d$fgp, paired=FALSE)
##
## Cohen's d
##
## d estimate: 0.2242644 (small)
## 95 percent confidence interval:
## lower upper
## -0.05711574 0.50564461
#Note: if you see a warning about functions being "masked" or "unused arguments"
#...you may need to turn off other competing packages or just do this:
#package::functionName (which tells R to use the function only for that package)
#effsize::cohen.d(df6$sap_mal_perf, df6$first_gen, paired=FALSE)
#creating BOX PLOT
library(ggplot2)
library(Hmisc)
boxplot <- ggplot(d, aes(fgp, depression)) #basic layer created by aes (aesthetic mappings)
boxplot + #shows the basic layer
geom_boxplot() + #adds geom (geometric object) which is a boxplot
labs(x="First- vs. Continuing-Generation", y="Depression") + #adds labels
theme_classic() #removes gray background for APA style
#Levene's test to check for unequal variances in DV between groups (assumption)
library(car)
leveneTest(d$wellbeing, d$fgp) #(note: put DV before IV in the code)
#to get Descriptives for each group
library(pastecs)
by(d$wellbeing, d$fgp, stat.desc, basic = FALSE, norm = TRUE)
## d$fgp: firstgen
## median mean SE.mean CI.mean.0.95 var std.dev
## 3.00000000 2.98898305 0.08141676 0.16124163 0.78218528 0.88441239
## coef.var skewness skew.2SE kurtosis kurt.2SE normtest.W
## 0.29589074 0.11745562 0.26371170 0.36265986 0.41035541 0.98354748
## normtest.p
## 0.15947393
## ------------------------------------------------------------
## d$fgp: contgen
## median mean SE.mean CI.mean.0.95 var std.dev
## 3.00000000 3.05411765 0.10597755 0.21074798 0.95465546 0.97706472
## coef.var skewness skew.2SE kurtosis kurt.2SE normtest.W
## 0.31991718 0.07768561 0.14873578 0.04179150 0.04043637 0.98125393
## normtest.p
## 0.25337761
#"by" command gives descriptives (stat.desc) broken down *BY* IV groups)
#"stat.desc" function gives descriptives. "norm = TRUE" gives normality info
#Independent samples t-test (Note: DV ~ IV)
options(scipen=999) #turning off scientific notation (optional)
model6 <- t.test(wellbeing ~ fgp, data = d, paired = FALSE, var.equal = TRUE)
#"var.equal" assumes equal variances (FALSE if unequal variances)
model6 #prints the model output
##
## Two Sample t-test
##
## data: wellbeing by fgp
## t = -0.49536, df = 201, p-value = 0.6209
## alternative hypothesis: true difference in means between group firstgen and group contgen is not equal to 0
## 95 percent confidence interval:
## -0.3244117 0.1941425
## sample estimates:
## mean in group firstgen mean in group contgen
## 2.988983 3.054118
# note: if var.equal = FALSE, get "Welch's t-test" that corrects df for unequal variances
#Cohen's d effect size
library(effsize)
#in cohen.d, put DV first then IV, then specify paired or not
cohen.d(d$wellbeing, d$fgp, paired=FALSE)
##
## Cohen's d
##
## d estimate: -0.07047192 (negligible)
## 95 percent confidence interval:
## lower upper
## -0.3510797 0.2101358
#Note: if you see a warning about functions being "masked" or "unused arguments"
#...you may need to turn off other competing packages or just do this:
#package::functionName (which tells R to use the function only for that package)
#effsize::cohen.d(df6$sap_mal_perf, df6$first_gen, paired=FALSE)
#creating BOX PLOT
library(ggplot2)
library(Hmisc)
boxplot <- ggplot(d, aes(fgp, wellbeing)) #basic layer created by aes (aesthetic mappings)
boxplot + #shows the basic layer
geom_boxplot() + #adds geom (geometric object) which is a boxplot
labs(x="First- vs. Continuing-Generation", y="Wellbeing") + #adds labels
theme_classic() #removes gray background for APA style
# Other Correlations
library(ggplot2)
library(ggpubr)
#fof
ggscatter(d, x = "sap_dis", y = "fof",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Fear of Failure")
# p < 0.001
#swfw
ggscatter(d, x = "sap_dis", y = "swfw",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Social Wellbeing From Work")
# p < 0.001
#anxiety
ggscatter(d, x = "sap_dis", y = "anxiety",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Anxiety")
# p < 0.001
#depression
ggscatter(d, x = "sap_dis", y = "depression",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Depression")
# p < 0.001
#wellbeing
ggscatter(d, x = "sap_dis", y = "wellbeing",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Wellbeing")
# p < 0.001
#fof
ggscatter(nonfgp, x = "sap_dis", y = "fof",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Fear of Failure")
# p < 0.001
#swfw
ggscatter(nonfgp, x = "sap_dis", y = "swfw",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Social Wellbeing From Work")
# p < 0.001
#anxiety
ggscatter(nonfgp, x = "sap_dis", y = "anxiety",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Anxiety")
# p < 0.001
#depression
ggscatter(nonfgp, x = "sap_dis", y = "depression",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Depression")
# p < 0.001
#wellbeing
ggscatter(nonfgp, x = "sap_dis", y = "wellbeing",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Personal Maldaptive Perfectionism", ylab = "Wellbeing")
# p < 0.001
#sap_dis
ggscatter(fgp, x = "fof", y = "sap_dis",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Fear of Failure", ylab = "Personal Maladaptive Perfectionism")
# p < 0.001
#swfw
ggscatter(fgp, x = "fof", y = "swfw",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Fear of Failure", ylab = "Social Wellbeing From Work")
# p < 0.001
#anxiety
ggscatter(fgp, x = "fof", y = "anxiety",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Fear of Failure", ylab = "Anxiety")
# p < 0.001
#depression
ggscatter(fgp, x = "fof", y = "depression",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Fear of Failure", ylab = "Depression")
# p < 0.001
#wellbeing
ggscatter(fgp, x = "fof", y = "wellbeing",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Fear of Failure", ylab = "Wellbeing")
# p < 0.001
#### only these for results
#anxiety
ggscatter(fgp, x = "wellbeing", y = "anxiety",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Wellbeing", ylab = "Anxiety")
# p < 0.001
#depression
ggscatter(fgp, x = "wellbeing", y = "depression",
add = "reg.line", conf.int = TRUE,
cor.coef = TRUE, cor.method = "pearson",
xlab = "Wellbeing", ylab = "Depression")
# p < 0.001
# means and sds
library(psych)
##
## Attaching package: 'psych'
## The following object is masked from 'package:Hmisc':
##
## describe
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
## The following object is masked from 'package:effsize':
##
## cohen.d
## The following object is masked from 'package:car':
##
## logit
#total sample
mean(d$sap_dis)
## [1] 20.38916
mean(d$fof)
## [1] 2.996059
mean(d$swfw)
## [1] 5.144433
mean(d$anxiety)
## [1] 1.851182
mean(d$depression)
## [1] 1.752167
mean(d$wellbeing)
## [1] 3.016256
#fgp sample
mean(fgp$sap_dis)
## [1] 20.98305
mean(fgp$fof)
## [1] 3.032203
mean(fgp$swfw)
## [1] 5.128814
mean(fgp$anxiety)
## [1] 1.888136
mean(fgp$depression)
## [1] 1.814746
mean(fgp$wellbeing)
## [1] 2.988983
#nonfgp sample
mean(nonfgp$sap_dis)
## [1] 19.56471
mean(nonfgp$fof)
## [1] 2.945882
mean(nonfgp$swfw)
## [1] 5.166118
mean(nonfgp$anxiety)
## [1] 1.799882
mean(nonfgp$depression)
## [1] 1.665294
mean(nonfgp$wellbeing)
## [1] 3.054118
#SDs
#fgp sample
sd(fgp$sap_dis)
## [1] 4.140653
sd(fgp$fof)
## [1] 0.9431608
sd(fgp$swfw)
## [1] 0.8385734
sd(fgp$anxiety)
## [1] 0.7488829
sd(fgp$depression)
## [1] 0.6706722
sd(fgp$wellbeing)
## [1] 0.8844124
#nonfgp sample
sd(nonfgp$sap_dis)
## [1] 4.681389
sd(nonfgp$fof)
## [1] 0.9648036
sd(nonfgp$swfw)
## [1] 0.973006
sd(nonfgp$anxiety)
## [1] 0.8004113
sd(nonfgp$depression)
## [1] 0.660423
sd(nonfgp$wellbeing)
## [1] 0.9770647