CLEAR ENVIRONMENT

# CLEAR ENVIRONMENT
cat("\014") #Clear Console
rm(list = ls())
timeOfRun <- Sys.time()
timeOfRun <- gsub(" ","_",timeOfRun)
timeOfRun <- gsub("-","_",timeOfRun)
timeOfRun <- gsub(":","_",timeOfRun)

# TO DO 
# Recreate ADJ MIND MIN SR DURATION OBJ USE VARIABLE 
# Create regression model for Qs 1, 2/3 and 5 

LOAD PACKAGES

SET WORKING DIRECTORY

## SET WORKING DIRECTORY
## If it works, should autoset wd to whichever user is running this code....

Paths = c(
  "C://Users/daviesjd/OneDrive - The University of Melbourne/Documents/R/csc_r_project_prolific_apps/",
  "C:/Users/juliaa1/OneDrive - The University of Melbourne/Documents/Research (Apps)", "/Users/nvan3/Downloads",
  "/Users/wattanatakup/Desktop/app_engagement", "C:/Users/juadams/Documents/Research (Apps)"
)

names(Paths) = c("daviesjd", "juliaa1","nvan3","wattanatakup") # names must match username in sys.info

# change this back to auto-detect user 20-Mar-24 NVD 
#setwd(Paths[Sys.info()[7]])
setwd(Paths[5])


## load data file 
data <- read.csv("CSC_Apps_Final_MostlyScored8Jan24.csv", header=T)

#is this the latest data file?
#CSC_Apps_Final_MostlyScored.csv

#saveRDS(data, file = (file.path(Paths[Sys.info()[7]], "data/input/CSC_Apps_Final_MostlyScored8Jan24.rds"))) ## Save as RDS for future use
#moving up from Line 455-461

# # For total sessions errors (would change valid N from 144 to 138 and rho from 0.731 to 0.792)
# data$AppRECENT_TOTALSESSIONS[data$AppRECENT_TOTALSESSIONS == "0"] <- NA
# data$ADJ.SESSIONS.SR[data$ADJ.SESSIONS.SR == "0"] <- NA
# data$ADJ.SESSIONS.SR[data$ADJ.SESSIONS.SR == "0.0000000"] <- NA

# employ some corrections to "ADJ_MIN_PER_SESS.OBJ" (used to be "/OBJ_years")
data$ADJ_MIN_PER_SESS.OBJ <- (data$OBJ_PRAC.Minutes/data$OBJ.SESSIONS)
#would change valid N from 142 to 140 & rho from 0.416 to 0.418

#corrections to "ADJ_MIN_PER_SESS.OBJ.win"
data$ADJ_MIN_PER_SESS.OBJ.win <- data$ADJ_MIN_PER_SESS.OBJ
# estimate upper limit - Q3 + 2xIQI and Winsorize 
upper <- quantile(data$ADJ_MIN_PER_SESS.OBJ,.75,na.rm=T) + 3*(IQR(data$ADJ_MIN_PER_SESS.OBJ, na.rm=T))
data$ADJ_MIN_PER_SESS.OBJ.win[data$ADJ_MIN_PER_SESS.OBJ.win > upper] <- upper

##corrections to "ADJ_MIN_PER_SESS.OBJ.win.log"
data$ADJ_MIN_PER_SESS.OBJ.win.log <- log(data$ADJ_MIN_PER_SESS.OBJ.win)

data$OBJ.SESSIONS[data$OBJ.SESSIONS == "0"] <- NA
# Clean the data 
### per pre-registration, exclude multivariate outliers 
# isolate BFI variables -- double check column numbers 
# BFI was not specified specifically 
#install.packages(psych::outlier)
library(psych)

#BFI2 <- data[,240:284]
#BFI2 <- data[,243:287]
BFI2 <- data[,244:288]
names(BFI2)
##  [1] "BFI2_SF_1"   "BFI2_SF_1R"  "BFI2_SF_2"   "BFI2_SF_3"   "BFI2_SF_3R" 
##  [6] "BFI2_SF_4"   "BFI2_SF_5"   "BFI2_SF_6"   "BFI2_SF_7"   "BFI2_SF_7R" 
## [11] "BFI2_SF_8"   "BFI2_SF_8R"  "BFI2_SF_9"   "BF2_SF_10"   "BF2_SF_10R" 
## [16] "BFI2_SF_11"  "BFI2_SF_12"  "BFI2_SF_13"  "BFI2_SF_14"  "BFI2_SF_14R"
## [21] "BFI2_SF_15"  "BFI2_SF_16"  "BFI2_SF_17"  "BFI2_SF_17R" "BFI2_SF_18" 
## [26] "BFI2_SF_19"  "BFI2_SF_19R" "BFI2_SF_20"  "BFI2_SF_20R" "BFI2_SF_21" 
## [31] "BFI2_SF_21R" "BFI2_SF_22"  "BFI_SF_23"   "BFI2_SF_24"  "BFI2_SF_24R"
## [36] "BFI2_SF_25"  "BFI2_SF_26"  "BFI2_SF_26R" "BFI2_SF_27"  "BFI2_SF_27R"
## [41] "BFI2_SF_28"  "BFI2_SF_28R" "BFI2_SF_29"  "BFI2_SF_30"  "BFI2_SF_30R"
keep <- c("BFI2_SF_1R",  "BFI2_SF_2",   "BFI2_SF_3R",  "BFI2_SF_4",   "BFI2_SF_5",   "BFI2_SF_6",   "BFI2_SF_7R",  "BFI2_SF_8R",  "BFI2_SF_9",   "BF2_SF_10R",  "BFI2_SF_11",  "BFI2_SF_12",  "BFI2_SF_13",  "BFI2_SF_14R","BFI2_SF_15",  "BFI2_SF_16",  "BFI2_SF_17R", "BFI2_SF_18",  "BFI2_SF_19R", "BFI2_SF_20R", "BFI2_SF_21R", "BFI2_SF_22",  "BFI_SF_23",   "BFI2_SF_24R", "BFI2_SF_25",  "BFI2_SF_26R", "BFI2_SF_27R", "BFI2_SF_28R","BFI2_SF_29",  "BFI2_SF_30R")

BFI2.recode <- BFI2[,keep]

# mahalanobis distance
#out <- mahal(BFI2.recode, flag=TRUE, confidence=0.999)
out <- mahalanobis(BFI2.recode, center = colMeans(BFI2.recode), cov = cov(BFI2.recode))

mahalanobis_dist <- mahalanobis(x = BFI2.recode, center = colMeans(BFI2.recode), cov = cov(BFI2.recode))

# Set a threshold value (e.g., based on chi-square distribution)
threshold <- qchisq(0.99, df = ncol(BFI2.recode))

# Identify outliers
outliers <- which(mahalanobis_dist > threshold)
outlier_flag <- rep(FALSE, nrow(BFI2.recode))
outlier_flag[outliers] <- TRUE

data$mahad_val <- out
data$mahad_excl <- outlier_flag
sum(data$mahad_excl) # n = 27
## [1] 27
# exclude multivariate outliers on BFI 
data2_mahal <- subset(data, mahad_excl=="FALSE")
nrow(data2_mahal)
## [1] 536
#data2_mahal (after cleaning multivariate outliers)
# now that we've excluded outliers, let's look at correlations 
## All defined engagement vars, in order

#create "SR" dataframe w/ self-report vars
SR <- data2_mahal %>%
  select(
ADJ_MIND_MIN.SR,
ADJ.SESSIONS.SR,
AppRECENT_STREAKDAYS,
ADJ_MIN_PER_SESS.SR,
AppDURATION_days,
APP_Pattern_MPS,
AppRECENT_HRS,
AppRECENT_MINS,
ENGAGE_PRAC.MINS,
AppDURATION_years)

#create "OBJ" dataframe w/ app-verified/objective vars
OBJ <- data2_mahal %>%
  select(
ADJ_MIND_MIN.OBJ,
OBJ.SESSIONS,
OBJ.Streak,
ADJ_MIN_PER_SESS.OBJ,
OBJ.MindfulDays,
OBJ.AvgSession.min,
OBJ.Hours,
OBJ.Minutes,
OBJ_PRAC.Minutes,
OBJ_years)

#### fixed above to yield correlations, p values, and valid N #### 
out <- matrix(0,nrow=length(SR),ncol=5)
out[,1] <- names(SR) #SR var names into 1st column
out[,2] <- names(OBJ) #OBJ var names into 2nd column

#calculate corr. btw self-reported (SR) & app-verified (OBJ) engagement variables
for (i in 1:length(SR)) {
   if (cor.test(SR[, i], OBJ[, i], na.action = na.omit)$parameter + 2 >= 50) { #parameter = df?
  out[i,3] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$estimate,3) #estimate = rho
  out[i,4] <- cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$p.value #p-value
  out[i,5] <- cor.test(SR[,i],OBJ[,i], na.action=na.omit)$parameter + 2 #valid n
   }
}
#renaming table columns
colnames(out) <- c("var1", "var2", "rho", "p.val", "valid N") 

# END PREREG SPECIFICATIONS
# primary engagement defs (4 primary outcomes)
primary <- data2_mahal %>%
  select(
    ADJ_MIND_MIN.SR,
    ADJ_MIND_MIN.OBJ,
    ENGAGE_PRAC.MINS,
    OBJ_PRAC.Minutes,
  )

# Missing the ADJ.MIND.MIN.START variable

new_column_names <- c("Adjusted Self-report Minutes", "Adjusted Objective Minutes",
                      "Self-report Minutes", "Objective Minutes") 
colnames(primary) <- new_column_names

#engagement variables (other engagement outcomes)
engage <- data2_mahal %>%
  select(
ADJ_MIND_MIN.SR,
ADJ.SESSIONS.SR,
AppRECENT_STREAKDAYS,
ADJ.STREAK.SR,
ADJ.MINDFLDAYS.SR,
ADJ_MIN_PER_SESS.SR,
ADJ_MIN_PER_SESS.OBJ,
OBJ.SESSIONS,
OBJ.Streak,
ADJ_MIND_MIN.OBJ,
AppRECENT_TOTALDAYS,
AppRECENT_TOTALSESSIONS,
SUBJ.28days,
MED_HRS,
AppRECENT_HRS,
AppRECENT_MINS,
ENGAGE_PRAC.MINS,
ENGAGE_PRAC.MINS.win,
AppDURATION_years,
APP_Pattern_MPS,
APP_Pattern_MPS.int,
APP_Pattern_SPD,
APP_Pattern_DPW,
estminsperwk.ideal,
estminsperwk.ideal.adjusted,
estminsperwk.SR,
OBJ.MindfulDays,
OBJ.AvgSession.min,
OBJ.ActualPrac.min,
OBJ.Hours,
OBJ.Minutes,
OBJ_PRAC.Minutes,
OBJ_years,
estminperwk.OBJ_denomyrs,
estminperwk.OBJ_denomdays)

# Assign new column names
new_column_names <- c("Adjusted Self-report Minutes", "Adjusted Self-Report Sessions", "Streak", "Adjusted Self-report Streak", "Adjusted Self-report Days", "Adjusted Self-report Minutes per Session", "Adjusted Objective Minutes Per Session", "Objective Sessions", "Objective Streak", "Adjusted Objective Minutes", "Self-report Days", "Self-report Sessions", "Self-report use in last 28 days", "Self-report Meditation Hrs (?)", "Self-report hours", "Self-report Minutes", "Objective Minutes (unadjusted)", "Objective Minutes (unadjusted, wins)", "Duration of Use (years)", "Regular Practice: Mins per Session", "Regular Practice: Minutes per Session (integer)", "Regular Practice: Sessions per Day", "Regular Practice: Days per Week", "Estimated ideal minutes per week", "Estimated ideal minutes per week (adjusted)", "Estimated Self-report Minutes per Week", "Objective Days", "Objective Average Session Length (minutes)", "Objective Actual Practice (minutes)", "Objective hours", "Objective Minutes", "Objective Minutes (combined)", "Objective Years", "Estimated minutes per week (years)", "Estimated mins per week (days)") 
colnames(engage) <- new_column_names
#Q1. To what extent do user related factors (including sociodemographics, spirituality, personality, self-efficacy, self-regulation, motivation, expectations, self-compassion, mental health care status and psychological distress) associate with mindfulness app engagement?
#H1. Conscientiousness, neuroticism, agreeableness, and openness, self-efficacy, self-regulation, motivation, expectancy, psychological distress and receiving mental health support will be associated with engagement. 

# sociodemographic factors

# Age  (spearman's corr)
data2_mahal$Age[data2_mahal$Age == "CONSENT_REVOKED" |  data2_mahal$Age == "DATA_EXPIRED"] <- NA  
cor.test(data2_mahal$ADJ_MIND_MIN.SR, as.numeric(data2_mahal$Age), method="spearman",na.rm=TRUE)
## Warning in cor.test.default(data2_mahal$ADJ_MIND_MIN.SR,
## as.numeric(data2_mahal$Age), : Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data2_mahal$ADJ_MIND_MIN.SR and as.numeric(data2_mahal$Age)
## S = 17744185, p-value = 0.003023
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.1327588
cor.test(data2_mahal$ADJ_MIND_MIN.OBJ, as.numeric(data2_mahal$Age), method="spearman",na.rm=TRUE)
## Warning in cor.test.default(data2_mahal$ADJ_MIND_MIN.OBJ,
## as.numeric(data2_mahal$Age), : Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data2_mahal$ADJ_MIND_MIN.OBJ and as.numeric(data2_mahal$Age)
## S = 534856, p-value = 0.4077
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## 0.06786996
cor.test(data2_mahal$ENGAGE_PRAC.MINS, as.numeric(data2_mahal$Age), method="spearman",na.rm=TRUE)
## Warning in cor.test.default(data2_mahal$ENGAGE_PRAC.MINS,
## as.numeric(data2_mahal$Age), : Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data2_mahal$ENGAGE_PRAC.MINS and as.numeric(data2_mahal$Age)
## S = 18133625, p-value = 0.001671
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.1399445
cor.test(data2_mahal$OBJ_PRAC.Minutes, as.numeric(data2_mahal$Age), method="spearman",na.rm=TRUE)
## Warning in cor.test.default(data2_mahal$OBJ_PRAC.Minutes,
## as.numeric(data2_mahal$Age), : Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  data2_mahal$OBJ_PRAC.Minutes and as.numeric(data2_mahal$Age)
## S = 15268751, p-value = 0.0009847
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.1505539
# Sex (wilcoxon; men, women?)
data2_mahal$Sex[data2_mahal$Sex == "CONSENT_REVOKED" |  data2_mahal$Sex == "DATA_EXPIRED" | data2_mahal$Sex == "Prefer not to say"] <- NA  
wilcox.test(ADJ_MIND_MIN.SR ~ Sex, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ADJ_MIND_MIN.SR by Sex
## W = 26128, p-value = 0.7518
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(ADJ_MIND_MIN.OBJ ~ Sex, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ADJ_MIND_MIN.OBJ by Sex
## W = 1847.5, p-value = 0.02891
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(ENGAGE_PRAC.MINS ~ Sex, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ENGAGE_PRAC.MINS by Sex
## W = 27949, p-value = 0.5233
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(OBJ_PRAC.Minutes ~ Sex, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  OBJ_PRAC.Minutes by Sex
## W = 24120, p-value = 0.8877
## alternative hypothesis: true location shift is not equal to 0
# Ethnicity  (wilcoxon; majority, minority)
data2_mahal$Ethnicity.simplified[data2_mahal$Ethnicity.simplified == "CONSENT_REVOKED" |  data2_mahal$Ethnicity.simplified == "DATA_EXPIRED"] <- NA  
data2_mahal$Ethnic.majority[data2_mahal$Ethnicity.simplified == "White"] <- "Majority"
data2_mahal$Ethnic.majority[data2_mahal$Ethnicity.simplified == "Asian" | data2_mahal$Ethnicity.simplified == "Black" | data2_mahal$Ethnicity.simplified == "Mixed" | data2_mahal$Ethnicity.simplified == "Other"] <- "Minority"
# car::Anova(lm(ADJ_MIND_MIN.SR ~ Ethnicity.simplified, data=data2_mahal),type=3)
# car::Anova(lm(ADJ_MIND_MIN.OBJ ~ Ethnicity.simplified, data=data2_mahal),type=3)
# car::Anova(lm(ENGAGE_PRAC.MINS ~ Ethnicity.simplified, data=data2_mahal),type=3)
# car::Anova(lm(OBJ_PRAC.Minutes ~ Ethnicity.simplified, data=data2_mahal),type=3)
wilcox.test(ADJ_MIND_MIN.SR ~ Ethnic.majority, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ADJ_MIND_MIN.SR by Ethnic.majority
## W = 23457, p-value = 0.03717
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(ADJ_MIND_MIN.OBJ ~ Ethnic.majority, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ADJ_MIND_MIN.OBJ by Ethnic.majority
## W = 2021, p-value = 0.5433
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(ENGAGE_PRAC.MINS ~ Ethnic.majority, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ENGAGE_PRAC.MINS by Ethnic.majority
## W = 24946, p-value = 0.004177
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(OBJ_PRAC.Minutes ~ Ethnic.majority, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  OBJ_PRAC.Minutes by Ethnic.majority
## W = 21930, p-value = 0.005483
## alternative hypothesis: true location shift is not equal to 0
# Religion (ANOVA; 12 groups, including 1 self-described/free response) -> are we grping "other(12)" all tgt?
car::Anova(lm(ADJ_MIND_MIN.SR ~ RELIGION_NOW, data=data2_mahal),type=3)
## Anova Table (Type III tests)
## 
## Response: ADJ_MIND_MIN.SR
##                  Sum Sq  Df F value  Pr(>F)    
## (Intercept)  1006886699   1 79.0459 < 2e-16 ***
## RELIGION_NOW   40655038   1  3.1916 0.07462 .  
## Residuals    6356261897 499                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(lm(ADJ_MIND_MIN.OBJ ~ RELIGION_NOW, data=data2_mahal),type=3)
## Anova Table (Type III tests)
## 
## Response: ADJ_MIND_MIN.OBJ
##                  Sum Sq  Df F value   Pr(>F)   
## (Intercept)   156516634   1 10.6170 0.001388 **
## RELIGION_NOW   14427437   1  0.9787 0.324135   
## Residuals    2196574549 149                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(lm(ENGAGE_PRAC.MINS ~ RELIGION_NOW, data=data2_mahal),type=3)
## Anova Table (Type III tests)
## 
## Response: ENGAGE_PRAC.MINS
##                  Sum Sq  Df F value    Pr(>F)    
## (Intercept)  3.6916e+09   1 49.3358 7.021e-12 ***
## RELIGION_NOW 3.4707e+07   1  0.4638    0.4962    
## Residuals    3.7713e+10 504                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
car::Anova(lm(OBJ_PRAC.Minutes ~ RELIGION_NOW, data=data2_mahal),type=3)
## Anova Table (Type III tests)
## 
## Response: OBJ_PRAC.Minutes
##                  Sum Sq  Df F value    Pr(>F)    
## (Intercept)  5.8730e+09   1  20.421 7.848e-06 ***
## RELIGION_NOW 2.2693e+08   1   0.789    0.3748    
## Residuals    1.3719e+11 477                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# MH support  (wilcoxon; yes, no)
wilcox.test(ADJ_MIND_MIN.SR ~ MH_SUPPORT_1, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ADJ_MIND_MIN.SR by MH_SUPPORT_1
## W = 28179, p-value = 0.6777
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(ADJ_MIND_MIN.OBJ ~ MH_SUPPORT_1, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ADJ_MIND_MIN.OBJ by MH_SUPPORT_1
## W = 3001.5, p-value = 0.1381
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(ENGAGE_PRAC.MINS ~ MH_SUPPORT_1, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  ENGAGE_PRAC.MINS by MH_SUPPORT_1
## W = 29911, p-value = 0.2253
## alternative hypothesis: true location shift is not equal to 0
wilcox.test(OBJ_PRAC.Minutes ~ MH_SUPPORT_1, data=data2_mahal)
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  OBJ_PRAC.Minutes by MH_SUPPORT_1
## W = 27452, p-value = 0.08635
## alternative hypothesis: true location shift is not equal to 0
#other 22 user-related variables (i.e., numeric predictors)
dv1 <- data2_mahal %>%
  select(
    Education, 
    Income, 
    MH_baseline, # mental health at baseline 
    Stress_baseline, # stress at download
    Stress_now, # stress at survey 
    BFI2_EXT, # extroversion
    BFI2_AGR, # agreeableness
    BFI2_CON, # conscientiousness
    BFI2_NEU, # neuroticism
    BFI2_OPEN, # openness to experience
    GSE6_TOTAL, # general self-efficacy
    READINESS_TO_CHANGE_1, # readiness to change
    EXPECT_MATCH_1, # app matched expectancy 
    EXPGen_1.y, # sleep
    EXPGen_2.y, # stress
    EXPGen_3.y, # anxiety
    EXPGen_4.y, # Attn/Focus
    EXPGen_5.y, # Happiness
    EXPGen_6.y, # Thriving
    EXPGen_7.y, # Performance Enhance
    SCS12_TOTAL, # self-compassion
    K10_TOTAL # psych distress 
    )

new_column_names <- c("Education", "Income", "Mental Health at Baseline", "Stress at Baseline", "Stress now", "Extraversion",
                      "Aggression", "Conscientiousness", "Neuroticism", "Openness", "Self-Efficacy", "Readiness to Change", "Matches Expectations", "Expectations for Sleep", "Expectations for Stress", "Expectations for Anxiety", "Expectations for Attention/Focus", "Expectations for Happiness", "Expectations for Thriving", "Expectations for Performance Enhancement", "Self-Compassion", "Distress")
colnames(dv1) <- new_column_names

#create 3 new columns w/ zeros
rho.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv1))
p.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv1))
N.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv1))

#calculate spearman's correlations between each 4 primary predictors & 22 user-related predictors
for (x in 1:length(primary)) { #every row in "primary" (outcomes)
  for (y in 1:length(dv1)) {  #every row in "dv1" (predictors)
   if (cor.test(primary[,x], dv1[, y], na.action = na.omit)$parameter + 2 >= 50) { #if df+2 >= 50???
    rho.mat[x,y] <- round(cor.test(primary[,x],dv1[,y], method="spearman",na.action=na.omit)$estimate,3) #spearman's rho values
    p.mat[x,y] <- round(cor.test(primary[,x],dv1[,y], method="spearman",na.action=na.omit)$p.value,4) #p-value
    N.mat[x,y] <- cor.test(primary[,x],dv1[,y], na.action=na.omit)$parameter + 2 #(valid) sample
   }
  }
}
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
#corr plot
library(corrplot)
## corrplot 0.92 loaded
rownames(rho.mat) <- colnames(primary)   
colnames(rho.mat) <- colnames(dv1) 
rownames(p.mat) <- colnames(primary)   
colnames(p.mat) <- colnames(dv1) 

rho.mat_transp <- t(rho.mat)
p.mat_transp <- t(p.mat)

# generate correlation plot 
corrplot(rho.mat_transp, p.mat = p.mat_transp, insig='blank', method='circle', addCoef.col='black', number.cex=0.8,
              title = "Association between main engagement variables and user factors (Q1)",
         tl.col = 'black', tl.srt = 45)

corrplot(rho.mat_transp, p.mat = p.mat_transp, insig='blank', method='color', addCoef.col='black', number.cex=0.8,
              title = "Association between main engagement variables and user factors (Q1)",
         tl.col = 'black', tl.srt = 45)

#create new matrix w/ zeros
cor_table <- matrix(0,nrow=nrow(rho.mat),ncol=ncol(rho.mat))
# format correlation table 
c <- ncol(rho.mat) # number of columns = 22
r <- nrow(rho.mat) # number of rows = 4
for (y in 1:c){
  for (x in 1:r) {
    pval <- p.mat[x,y]
    stars <- ifelse(pval < .001, "***", 
                ifelse(pval < .01, "** ", 
                       ifelse(pval < .05, "*  ", 
                              ifelse(pval < .1, "~ ", "   "))))
    coeff = round(rho.mat[x,y],3)
    cor_table[x,y] = paste(c(coeff,stars),collapse='')
  }
}

# fix NA labels 
cor_table[cor_table == "NANA"] <- NA
# erase the upper triangle
#cor_table[upper.tri(cor_table)] <- '' 
# change names 
rownames(cor_table) <- colnames(primary)  
colnames(cor_table) <- colnames(dv1) 

#do it all again, but with all engagement vars

#create 3 new columns 
rho.mat <- matrix(0,nrow=ncol(engage),ncol=ncol(dv1))
p.mat <- matrix(0,nrow=ncol(engage),ncol=ncol(dv1))
N.mat <- matrix(0,nrow=ncol(engage),ncol=ncol(dv1))

#calculate corr. btw 22 user-related predictors & all engagement outcomes
for (x in 1:length(engage)) {
  for (y in 1:length(dv1)) { 
   if (cor.test(engage[,x], dv1[, y], na.action = na.omit)$parameter + 2 >= 50) {
    rho.mat[x,y] <- round(cor.test(engage[,x],dv1[,y], method="spearman",na.action=na.omit)$estimate,3)
    p.mat[x,y] <- round(cor.test(engage[,x],dv1[,y], method="spearman",na.action=na.omit)$p.value,4)
    N.mat[x,y] <- cor.test(engage[,x],dv1[,y], na.action=na.omit)$parameter + 2
   }
  }
}
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(engage[, x], dv1[, y], method = "spearman", :
## Cannot compute exact p-value with ties
#corr plot
rownames(rho.mat) <- colnames(engage)
colnames(rho.mat) <- colnames(dv1)
rownames(p.mat) <- colnames(engage)
colnames(p.mat) <- colnames(dv1)

# generate correlation plot # JA edits - text size, number size 

# Transpose the correlation matrix
rho.mat_transposed <- t(rho.mat)
p.mat_transposed <- t(p.mat)

corrplot(rho.mat, p.mat=p.mat, insig='blank', method='color', addCoef.col='black', number.cex=0.5, 
         title = "Association between all engagement variables and user factors (Q1)",
         tl.col = 'black', tl.srt = 45, # rotation,
         tl.cex = 0.6,
         cex.lab = 0.5,
         cex.axis = 0.5) # font size

#create corr. table
cor_table <- matrix(0,nrow=nrow(rho.mat),ncol=ncol(rho.mat))
# format correlation table 
c <- ncol(rho.mat) # number of columns 
r <- nrow(rho.mat) # number of rows 
for (y in 1:c){
  for (x in 1:r) {
    pval <- p.mat[x,y]
    stars <- ifelse(pval < .001, "***", 
                ifelse(pval < .01, "** ", 
                       ifelse(pval < .05, "*  ", 
                              ifelse(pval < .1, "~ ", "   "))))
    coeff = round(rho.mat[x,y],3)
    cor_table[x,y] = paste(c(coeff,stars),collapse='')
  }
}

# fix NA labels 
cor_table[cor_table == "NANA"] <- NA
# erase the upper triangle
#cor_table[upper.tri(cor_table)] <- '' 
# change names 
rownames(cor_table) <- colnames(engage)  
colnames(cor_table) <- colnames(dv1) 

# # Create a workbook for depositing outputs (openxlsx)
wb <- createWorkbook()
# 
# # Add a worksheet for the combined results
 addWorksheet(wb, "1. user factors")

# Write row names from cor_table
writeData(wb, sheet = "1. user factors", x = rownames(cor_table), startCol = 1, startRow = 2)

# Write the correlation table data
writeData(wb, sheet = "1. user factors", x = cor_table, startCol = 2, startRow = 1)

 
 # JA edit - should all defs be added in different sheets?

# # Save the workbook
saveWorkbook(wb, file = file.path(getwd(), "Prolific_1_userfactors_20240505_2.xlsx"), overwrite = 
TRUE)
# Q2. To what extent do user-app relationship factors (including therapeutic alliance, agreement on tasks and goals, empathy and expertise) associate with mindfulness app engagement?
# H2. Therapeutic alliance and goal agreement will be associated with engagement
#Q3. To what extent do app-related factors (including engagement, functionality, aesthetics, information quality/quantity/credibility, customisation, accessibility, usability) associate with mindfulness app engagement?
#H3. Customisation, flexibility and progress tracking will be associated with engagement. 

#create dataframe w/ only use-app r'ship factors & app-related factors
dv2_3 <- data2_mahal %>%
  select(
    DWAI6_GOAL,
    DWAI6_BOND,
    DWAI6_TASK,
    READINESS_TO_CHANGE_1,
    EXPECT_MATCH_1,
    uMARS_ENGAG,
    uMARS_FUNC,
    uMARS_AEST,
    uMARS_INFO,
    uMARS_SUBJ,
    uMARS_PIMPACT)

new_column_names <- c("DWAI (Goal)", "DWAI (Bond)", "DWAI (Task)", "Readiness to Change", "Expectations Matched", "uMARS: Engagement", "uMARS: Functionality", "uMARS: Aesthetics", "uMARS Information", "uMARS: Subjective Quality", "uMARS: Perceived Impact")
colnames(dv2_3) <- new_column_names

#create 3 new columns
rho.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv2_3))
p.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv2_3))
N.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv2_3))

#calculate corr. btw dv2_3 (app-user r'ship & app-related predictors) & 4 primary outcomes
for (x in 1:length(primary)) { #primary outcomes
  for (y in 1:length(dv2_3)) { #app-user r'ship & app-related predictors
   if (cor.test(primary[,x], dv2_3[, y], na.action = na.omit)$parameter + 2 >= 50) {
    rho.mat[x,y] <- round(cor.test(primary[,x],dv2_3[,y], method="spearman",na.action=na.omit)$estimate,3) #rho
    p.mat[x,y] <- round(cor.test(primary[,x],dv2_3[,y], method="spearman",na.action=na.omit)$p.value,4) # p-value
    N.mat[x,y] <- cor.test(primary[,x],dv2_3[,y], na.action=na.omit)$parameter + 2 #valid n
   }
  }
}
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv2_3[, y], method = "spearman", :
## Cannot compute exact p-value with ties
write.csv(data2_mahal, "mahalanobis_cleaned_data_05May2024.csv")

#corr plot
rownames(rho.mat) <- colnames(primary)   
colnames(rho.mat) <- colnames(dv2_3) 
rownames(p.mat) <- colnames(primary)   
colnames(p.mat) <- colnames(dv2_3) 
# generate correlation plot 
corrplot(rho.mat, p.mat=p.mat, insig='blank', method='color', addCoef.col='black', number.cex=0.8)

#corr. table
cor_table <- matrix(0,nrow=nrow(rho.mat),ncol=ncol(rho.mat))
# format correlation table 
c <- ncol(rho.mat) # number of columns 
r <- nrow(rho.mat) # number of rows 
for (y in 1:c){
  for (x in 1:r) {
    pval <- p.mat[x,y]
    sstars <- ifelse(pval < .001, "***", 
                ifelse(pval < .01, "** ", 
                       ifelse(pval < .05, "*  ", 
                              ifelse(pval < .1, "~ ", "   "))))
    coeff = round(rho.mat[x,y],3)
    cor_table[x,y] = paste(c(coeff,stars),collapse='')
  }
}

# fix NA labels 
cor_table[cor_table == "NANA"] <- NA
# erase the upper triangle
#cor_table[upper.tri(cor_table)] <- '' 
# change names 
rownames(cor_table) <- colnames(primary)  
colnames(cor_table) <- colnames(dv2_3) 

#????? Q4. To what extent are user, relationship and app-related factors associated with mental health  (including psychological distress, depression, anxiety, affect, trait mindfulness, self-compassion) and wellbeing outcomes (including psychological wellbeing, satisfaction with life, quality of life)?
#H4. User-related factors including motivation and expectations will be most strongly associated with mental health and wellbeing outcomes whereas relationship and app-related factors will be more weakly associated. These associations may be moderated by changes over time. 
# included into the above alr?
#Q5. How much does engagement with mindfulness apps associate with mental health  (including psychological distress, depression, anxiety, affect) and wellbeing (including psychological wellbeing, attentional control, satisfaction with life, quality of life)? 
#H5. Greater engagement with mindfulness apps will be weakly associated with mental health and wellbeing outcomes. These associations may be moderated by changes over time.

#ERROR - GENERATING NAMES OF USER FACTORS ROWS

#create new dataframe w/ only WB & MH vars
dv5 <- data2_mahal %>%
  select(
    K10_TOTAL,
    WEMWBS_TOTAL,
    SWLS_1,
    GAD7_TOTAL,
    PHQ_TOTAL,
    MH_SUPPORT_1,
    Stress_baseline,
    Stress_now
    
  )

new_column_names <- c("Distress", "Wellbeing", "Satisfaction with Life", "Anxiety", "Depression", "Mental Health Support", "Baseline Stress", "Stress now")
colnames(dv5) <- new_column_names

#calculate corr. btw WB & MH variables and 4 primary outcomes
rho.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv5))
p.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv5))
N.mat <- matrix(0,nrow=ncol(primary),ncol=ncol(dv5))
for (x in 1:length(primary)) {
  for (y in 1:length(dv5)) { 
   if (cor.test(primary[,x], dv5[, y], na.action = na.omit)$parameter + 2 >= 50) {
    rho.mat[x,y] <- round(cor.test(primary[,x],dv5[,y], method="spearman",na.action=na.omit)$estimate,3)
    p.mat[x,y] <- round(cor.test(primary[,x],dv5[,y], method="spearman",na.action=na.omit)$p.value,4)
    N.mat[x,y] <- cor.test(primary[,x],dv5[,y], na.action=na.omit)$parameter + 2
   }
  }
}
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
## Warning in cor.test.default(primary[, x], dv5[, y], method = "spearman", :
## Cannot compute exact p-value with ties
#corr plot
rownames(rho.mat) <- colnames(primary)   
colnames(rho.mat) <- colnames(dv5) 
rownames(p.mat) <- colnames(primary)   
colnames(p.mat) <- colnames(dv5) 
# generate correlation plot 
corrplot(rho.mat, p.mat=p.mat, insig='blank', method='color', addCoef.col='black', number.cex=0.8,
       title = 'Association of main engagement variables with Mental Health Factors (Q5)', # Add title if needed
         tl.col = 'black', tl.srt = 45  )

#corr. table for H5
cor_table <- matrix(0,nrow=nrow(rho.mat),ncol=ncol(rho.mat))
# format correlation table 
c <- ncol(rho.mat) # number of columns 
r <- nrow(rho.mat) # number of rows 
for (y in 1:c){
  for (x in 1:r) {
    pval <- p.mat[x,y]
    stars <- ifelse(pval < .001, "***", 
                ifelse(pval < .01, "** ", 
                       ifelse(pval < .05, "*  ", 
                              ifelse(pval < .1, "~ ", "   "))))

    coeff = round(rho.mat[x,y],3)
    cor_table[x,y] = paste(c(coeff,stars),collapse='')
  }
}

# fix NA labels 
cor_table[cor_table == "NANA"] <- NA
# erase the upper triangle
#cor_table[upper.tri(cor_table)] <- '' 
# change names 
rownames(cor_table) <- colnames(primary)  
colnames(cor_table) <- colnames(dv5)

# JA MAKE 2 SEPERATE SHEETS, 1 - USER 5 - MH

file_path <- "C:/Users/juadams/Documents/Research (Apps)/Prolific_1_userfactors_20240505_2.xlsx"

wb <- loadWorkbook(file_path)

# Write column names from dv1
addWorksheet(wb, sheetName = "5. MH factors")

# Write column names
#writeData(wb, sheet = "5. MH factors", x = colnames(cor_table), startCol = 2, startRow = 1)

# Write row names
writeData(wb, sheet = "5. MH factors", x = rownames(cor_table), startCol = 1, startRow = 2)

# Write the correlation table data
writeData(wb, sheet = "5. MH factors", x = cor_table, startCol = 2, startRow = 1)


# # Save the workbook
saveWorkbook(wb, file = file.path(getwd(), "Prolific_1_5_USER_MHfactors_20240505_6.xlsx"), overwrite = 
TRUE)

more conservative cleaning

########## check for careless responding ############

# generate a for loop which outputs correlations for each iteration of more progressively conservative data cleaning
# then graph results
# will need something like this code to change a matrix into an object that can be graphed with ggplot

#???
# require(Rfast)
# # get range of values for each row and column 
# rowMinsMaxs(abs(rho.mat))
# colMinsMaxs(abs(rho.mat))

# require(reshape2)
# ggplot(data=melt(abs(rho.mat)),aes(x=Var2,y=value)) + # what is it taking? 
#   geom_boxplot()

#install.packages("careless")
library(careless)

# isolate BFI variables -- double check column numbers 
#BFI2 <- data2_mahal[,240:284] # changed per above note 
BFI2 <- data2_mahal[,244:288] # change for JA right selection
#BFI2 <- data2_mahal[,243:287]

keep1 <- c("BFI2_SF_1",  "BFI2_SF_2",  "BFI2_SF_3",  "BFI2_SF_4",  "BFI2_SF_5",  "BFI2_SF_6",  "BFI2_SF_7",  "BFI2_SF_8", "BFI2_SF_9",  "BF2_SF_10",  "BFI2_SF_11", "BFI2_SF_12", "BFI2_SF_13", "BFI2_SF_14", "BFI2_SF_15", "BFI2_SF_16", "BFI2_SF_17", "BFI2_SF_18", "BFI2_SF_19", "BFI2_SF_20", "BFI2_SF_21", "BFI2_SF_22", "BFI_SF_23",  "BFI2_SF_24","BFI2_SF_25", "BFI2_SF_26", "BFI2_SF_27", "BFI2_SF_28", "BFI2_SF_29", "BFI2_SF_30")

BFI2.orig <- BFI2[,keep1]

#longstring
data2_mahal$longstring <- longstring(BFI2.orig)

max(data2_mahal$longstring) #11
## [1] 11
hist(data2_mahal$longstring)

quantile(data2_mahal$longstring,0.99) #8
## 99% 
##   8
quantile(data2_mahal$longstring,0.98) #6.3
## 98% 
## 6.3
quantile(data2_mahal$longstring,0.97) #6
## 97% 
##   6
quantile(data2_mahal$longstring,0.95) #6
## 95% 
##   6
quantile(data2_mahal$longstring,0.925) #5
## 92.5% 
##     5
quantile(data2_mahal$longstring,0.9) #5
## 90% 
##   5
# specify vector of values over which to iterate for exclusion 
lngstrexcl <- c(8,7,6,5)

#### fixed above to yield correlations, p values, and valid N #### 
rho.mat.long <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
rho.mat.long[,1] <- names(SR) #SR var names into 1st column
rho.mat.long[,2] <- names(OBJ) #OBJ var names into 2nd column
p.mat.long <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
p.mat.long[,1] <- names(SR) #SR var names into 1st column
p.mat.long[,2] <- names(OBJ) #OBJ var names into 2nd column
N.mat.long <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
N.mat.long[,1] <- names(SR) #SR var names into 1st column
N.mat.long[,2] <- names(OBJ) #OBJ var names into 2nd column

for (x in 1:length(lngstrexcl)){
  dat <- subset(data2_mahal, longstring < lngstrexcl[x])
  
  #create "SR" dataframe w/ self-report vars
    SR <- dat %>%
      select(
      ADJ_MIND_MIN.SR,
      ADJ.SESSIONS.SR,
      AppRECENT_STREAKDAYS,
      ADJ_MIN_PER_SESS.SR,
      AppDURATION_days,
      APP_Pattern_MPS,
      AppRECENT_HRS,
      AppRECENT_MINS,
      ENGAGE_PRAC.MINS,
      AppDURATION_years)

    #create "OBJ" dataframe w/ app-verified/objective vars
    OBJ <- dat %>%
      select(
      ADJ_MIND_MIN.OBJ,
      OBJ.SESSIONS,
      OBJ.Streak,
      ADJ_MIN_PER_SESS.OBJ,
      OBJ.MindfulDays,
      OBJ.AvgSession.min,
      OBJ.Hours,
      OBJ.Minutes,
      OBJ_PRAC.Minutes,
      OBJ_years)

      #calculate corr. btw self-reported (SR) & app-verified (OBJ) engagement variables
      for (i in 1:length(SR)) {
        z <- x + 2 
        if (cor.test(SR[,i], OBJ[,i], na.action = na.omit)$parameter + 2 >= 50) { #parameter 
        rho.mat.long[i,z] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$estimate,3) #estimate = rho
        p.mat.long[i,z] <- cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$p.value #p-value
        N.mat.long[i,z] <- cor.test(SR[,i],OBJ[,i], na.action=na.omit)$parameter + 2 #valid n
        }
      }
}
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
colnames(rho.mat.long) <- c("var1", "var2", "99th quantile", "98.5th quantile", "95th quantile", "90th quantile")
colnames(p.mat.long) <- c("var1", "var2", "99th quantile", "98.5th quantile", "95th quantile", "90th quantile")
colnames(N.mat.long) <- c("var1", "var2", "99th quantile", "98.5th quantile", "95th quantile", "90th quantile")

require(reshape2)
## Loading required package: reshape2
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths
rho.mat.alt.long <- rho.mat.long[,3:6]
df.m.long <- melt(rho.mat.alt.long)
ggplot(data=df.m.long, aes(Var2,as.numeric(value))) + 
         geom_boxplot(aes(fill=Var2), show.legend=FALSE) + 
         geom_jitter(width=0.2) + 
         ylim(c(0,1)) + 
         xlab("longstring quantile") + 
         ylab("correlation")

####### OUTCOME INTERCORRELATIONS ####

# #create "outcome1" w/ MH & WB vars
outcome1 <- data2_mahal %>%
      select(
      EQHWB_TOTAL,
      K10_TOTAL,
      PHQ_TOTAL,
      GAD7_TOTAL,
      WEMWBS_TOTAL,
      BFI2_NEU)

#### fixed above to yield "outcome" correlations, p values, and valid N #### 
fin.rho.mat <- matrix(0,nrow=15,ncol=6)
fin.p.mat <- matrix(0,nrow=15,ncol=6)
fin.N.mat <- matrix(0,nrow=15,ncol=6)

rho.mat<- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(rho.mat) <- names(outcome1)
rownames(rho.mat) <- names(outcome1)
p.mat <- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(p.mat) <- names(outcome1)
rownames(p.mat) <- names(outcome1)
N.mat <- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(N.mat) <- names(outcome1)
rownames(N.mat) <- names(outcome1)

for (x in 1:length(lngstrexcl)){
  dat <- subset(data2_mahal, longstring < lngstrexcl[x])
  
  #create "outcome1" w/ MH & WB vars
    outcome1 <- dat %>%
      select(
      EQHWB_TOTAL,
      K10_TOTAL,
      PHQ_TOTAL,
      GAD7_TOTAL,
      WEMWBS_TOTAL,
      BFI2_NEU)

      #calculate corr. btw MH & WB variables (i.e., outcome1 & outcome2)
      for (a in 1:length(outcome1)) {
        for (b in 1:length(outcome1)) {
        if (cor.test(outcome1[,a], outcome1[,b], na.action = na.omit)$parameter + 2 >= 50) { #parameter 
        rho.mat[a,b] <- abs(round(cor.test(outcome1[,a],outcome1[,b], method="spearman",na.action=na.omit)$estimate,3)) #rho
        p.mat[a,b] <- cor.test(outcome1[,a],outcome1[,b], method="spearman",na.action=na.omit)$p.value #p-value
        N.mat[a,b] <- cor.test(outcome1[,a],outcome1[,b], na.action=na.omit)$parameter + 2 #valid n
        }
        }
      }
      z = x+2
      # organise correlations 
      rho <- lower.tri(rho.mat,diag=F) * rho.mat
      rho[rho == 0] <- NA
      temp1 <- as.data.frame(cor_gather(rho,drop.na=T))
      fin.rho.mat[,1] <- temp1[,1]
      fin.rho.mat[,2] <- temp1[,2]
      fin.rho.mat[,z] <- temp1[,3]
      # organise p values 
      pval <- lower.tri(p.mat,diag=F) * p.mat
      pval[pval == 0] <- NA
      temp2 <- as.data.frame(cor_gather(pval,drop.na=T))
      fin.p.mat[,1] <- temp2[,1]
      fin.p.mat[,2] <- temp2[,2]
      fin.p.mat[,z] <- temp2[,3]
      # organise N values 
      Nval <- lower.tri(N.mat,diag=F) * N.mat
      Nval[Nval == 0] <- NA
      temp3 <- as.data.frame(cor_gather(Nval,drop.na=T))
      fin.N.mat[,1] <- temp3[,1]
      fin.N.mat[,2] <- temp3[,2]
      fin.N.mat[,z] <- temp3[,3]
      
}
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
colnames(fin.rho.mat) <- c("var1", "var2", "99th quantile", "98.5th quantile", "95th quantile", "90th quantile")
colnames(fin.p.mat) <- c("var1", "var2", "99th quantile", "98.5th quantile", "95th quantile", "90th quantile")
colnames(fin.N.mat) <- c("var1", "var2", "99th quantile", "98.5th quantile", "95th quantile", "90th quantile")

#boxplot for
adj.fin.rho.mat <- fin.rho.mat[,3:6]
df.m <- melt(adj.fin.rho.mat)
ggplot(data=df.m, aes(Var2,as.numeric(value))) + 
         geom_boxplot(aes(fill=Var2), show.legend=FALSE) + 
         geom_jitter(width=0.2) + 
         ylim(c(0,1)) + 
         xlab("longstring quantile") + 
         ylab("correlation")

#isolate BFI variables with reverse-coding done (for consistency)

keep2 <- c("BFI2_SF_1R",  "BFI2_SF_2",   "BFI2_SF_3R",  "BFI2_SF_4",   "BFI2_SF_5",   "BFI2_SF_6",   "BFI2_SF_7R",  "BFI2_SF_8R",  "BFI2_SF_9",   "BF2_SF_10R",  "BFI2_SF_11",  "BFI2_SF_12",  "BFI2_SF_13",  "BFI2_SF_14R","BFI2_SF_15",  "BFI2_SF_16",  "BFI2_SF_17R", "BFI2_SF_18",  "BFI2_SF_19R", "BFI2_SF_20R", "BFI2_SF_21R", "BFI2_SF_22",  "BFI_SF_23",   "BFI2_SF_24R", "BFI2_SF_25",  "BFI2_SF_26R", "BFI2_SF_27R", "BFI2_SF_28R","BFI2_SF_29", "BFI2_SF_30R")

BFI2.recode <- BFI2[,keep2]

#from BFI inconsistency
# cor pairs
# 3R-18; 4-9; 14R-19R; 7R-17R; 19R-24R; 21R-30R
data2_mahal$incon <- abs(BFI2.recode$BFI2_SF_3R - BFI2.recode$BFI2_SF_18) + abs(BFI2.recode$BFI2_SF_4 - BFI2.recode$BFI2_SF_9) + abs(BFI2.recode$BFI2_SF_14R - BFI2.recode$BFI2_SF_19R) + abs(BFI2.recode$BFI2_SF_7R - BFI2.recode$BFI2_SF_17R) + abs(BFI2.recode$BFI2_SF_19R - BFI2.recode$BFI2_SF_24R) + abs(BFI2.recode$BFI2_SF_21R - BFI2.recode$BFI2_SF_30R)

hist(data2_mahal$incon)

quantile(data2_mahal$incon,.99) # 11.65 
##   99% 
## 11.65
quantile(data2_mahal$incon,.985) #11
## 98.5% 
##    11
quantile(data2_mahal$incon,.98) #11
## 98% 
##  11
quantile(data2_mahal$incon,.975) # 11
## 97.5% 
##    11
quantile(data2_mahal$incon,.95) # 10
## 95% 
##  10
quantile(data2_mahal$incon,.9) #9
## 90% 
##   9
quantile(data2_mahal$incon,.85) #8
## 85% 
##   8
# #note: changed from ncol=10000 to ncol=1000, but still same value for threshold values
# scrdat <- matrix(0,nrow=1000,ncol=1000)
# for (y in 1:1000) {
#   for (x in 1:1000){ 
#     scrdat[x,y] <- abs(sample(x=1:5,size=1)-sample(x=1:5,size=1)) + abs(sample(x=1:5,size=1)-sample(x=1:5,size=1)) + abs(sample(x=1:5,size=1)-sample(x=1:5,size=1)) + 
#   abs(sample(x=1:5,size=1)-sample(x=1:5,size=1)) + abs(sample(x=1:5,size=1)-sample(x=1:5,size=1)) + abs(sample(x=1:5,size=1)-sample(x=1:5,size=1))
#   }
# }
# 
# quantile(scrdat,.99) # 17 
# quantile(scrdat,.975) # 16
# quantile(scrdat,.95) # 15
# quantile(scrdat,.925) # 14
# quantile(scrdat,.90) # 13
# quantile(scrdat,.875) # 13
# quantile(scrdat,.85) # 13
# quantile(scrdat,.825) # 12
# quantile(scrdat,.80) #12

# specify vector of values over which to iterate for exclusion 
inconsist_excl <- c(11,10,9,8) #98.5th, 95th, 90th, 85th 

#### fixed above to yield correlations, p values, and valid N #### 
rho.mat.incon <- matrix(0,nrow=length(SR),ncol=length(inconsist_excl)+2)
rho.mat.incon[,1] <- names(SR) #SR var names into 1st column
rho.mat.incon[,2] <- names(OBJ) #OBJ var names into 2nd column
p.mat.incon <- matrix(0,nrow=length(SR),ncol=length(inconsist_excl)+2)
p.mat.incon[,1] <- names(SR) #SR var names into 1st column
p.mat.incon[,2] <- names(OBJ) #OBJ var names into 2nd column
N.mat.incon <- matrix(0,nrow=length(SR),ncol=length(inconsist_excl)+2)
N.mat.incon[,1] <- names(SR) #SR var names into 1st column
N.mat.incon[,2] <- names(OBJ) #OBJ var names into 2nd column

for (x in 1:length(inconsist_excl)){
  dat <- subset(data2_mahal, incon < inconsist_excl[x])
  
  #create "SR" dataframe w/ self-report vars
    SR <- dat %>%
      select(
      ADJ_MIND_MIN.SR,
      ADJ.SESSIONS.SR,
      AppRECENT_STREAKDAYS,
      ADJ_MIN_PER_SESS.SR,
      AppDURATION_days,
      APP_Pattern_MPS,
      AppRECENT_HRS,
      AppRECENT_MINS,
      ENGAGE_PRAC.MINS,
      AppDURATION_years)

    #create "OBJ" dataframe w/ app-verified/objective vars
    OBJ <- dat %>%
      select(
      ADJ_MIND_MIN.OBJ,
      OBJ.SESSIONS,
      OBJ.Streak,
      ADJ_MIN_PER_SESS.OBJ,
      OBJ.MindfulDays,
      OBJ.AvgSession.min,
      OBJ.Hours,
      OBJ.Minutes,
      OBJ_PRAC.Minutes,
      OBJ_years)

      #calculate corr. btw self-reported (SR) & app-verified (OBJ) engagement variables
      for (i in 1:length(SR)) {
        z <- x + 2 
        if (cor.test(SR[,i], OBJ[,i], na.action = na.omit)$parameter + 2 >= 50) { #parameter 
        rho.mat.incon[i,z] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$estimate,3) #estimate = rho
        p.mat.incon[i,z] <- cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$p.value #p-value
        N.mat.incon[i,z] <- cor.test(SR[,i],OBJ[,i], na.action=na.omit)$parameter + 2 #valid n
        }
      }
}
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
colnames(rho.mat.incon) <- c("var1", "var2", "98.5th quantile", "95th quantile", "90th quantile", "85th quantile")
colnames(p.mat.incon) <- c("var1", "var2", "98.5th quantile", "95th quantile", "90th quantile", "85th quantile")
colnames(N.mat.incon) <- c("var1", "var2", "98.5th quantile", "95th quantile", "90th quantile", "85th quantile")

rho.mat.alt.incon <- rho.mat.incon[,3:6]
df.m.incon <- melt(rho.mat.alt.incon)
ggplot(data=df.m.incon, aes(Var2,as.numeric(value))) + 
         geom_boxplot(aes(fill=Var2), show.legend=FALSE) + 
         geom_jitter(width=0.2) + 
         ylim(c(0,1)) + 
         xlab("BFI inconsistency quantile") + 
         ylab("correlation")

####### OUTCOME INTERCORRELATIONS ####

# # #create "outcome1" w/ MH & WB vars
# outcome1 <- data2_mahal %>%
#       select(
#       EQHWB_TOTAL,
#       K10_TOTAL,
#       PHQ_TOTAL,
#       GAD7_TOTAL,
#       WEMWBS_TOTAL,
#       BFI2_NEU)

#### fixed above to yield "outcome" correlations, p values, and valid N #### 
fin.rho.mat.incon <- matrix(0,nrow=15,ncol=6)
fin.p.mat.incon <- matrix(0,nrow=15,ncol=6)
fin.N.mat.incon <- matrix(0,nrow=15,ncol=6)

rho.mat.incon <- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(rho.mat.incon) <- names(outcome1)
rownames(rho.mat.incon) <- names(outcome1)
p.mat.incon <- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(p.mat.incon) <- names(outcome1)
rownames(p.mat.incon) <- names(outcome1)
N.mat.incon <- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(N.mat.incon) <- names(outcome1)
rownames(N.mat.incon) <- names(outcome1)

for (x in 1:length(inconsist_excl)){
  dat <- subset(data2_mahal, incon < inconsist_excl[x])
  
  #create "outcome1" w/ MH & WB vars
    outcome1 <- dat %>%
      select(
      EQHWB_TOTAL,
      K10_TOTAL,
      PHQ_TOTAL,
      GAD7_TOTAL,
      WEMWBS_TOTAL,
      BFI2_NEU)

      #calculate corr. btw MH & WB variables (i.e., outcome1 & outcome2)
      for (a in 1:length(outcome1)) {
        for (b in 1:length(outcome1)) {
        if (cor.test(outcome1[,a], outcome1[,b], na.action = na.omit)$parameter + 2 >= 50) { #parameter 
        rho.mat.incon[a,b] <- abs(round(cor.test(outcome1[,a],outcome1[,b], method="spearman",na.action=na.omit)$estimate,3)) #rho
        p.mat.incon[a,b] <- cor.test(outcome1[,a],outcome1[,b], method="spearman",na.action=na.omit)$p.value #p-value
        N.mat.incon[a,b] <- cor.test(outcome1[,a],outcome1[,b], na.action=na.omit)$parameter + 2 #valid n
        }
        }
      }
      z = x+2
      # organise correlations 
      rho.incon <- lower.tri(rho.mat.incon,diag=F) * rho.mat.incon
      rho.incon[rho.incon == 0] <- NA
      temp1 <- as.data.frame(cor_gather(rho.incon,drop.na=T))
      fin.rho.mat.incon[,1] <- temp1[,1]
      fin.rho.mat.incon[,2] <- temp1[,2]
      fin.rho.mat.incon[,z] <- temp1[,3]
      # organise p values 
      pval.incon <- lower.tri(p.mat.incon,diag=F) * p.mat.incon
      pval.incon[pval.incon == 0] <- NA
      temp2 <- as.data.frame(cor_gather(pval.incon,drop.na=T))
      fin.p.mat.incon[,1] <- temp2[,1]
      fin.p.mat.incon[,2] <- temp2[,2]
      fin.p.mat.incon[,z] <- temp2[,3]
      # organise N values 
      Nval.incon <- lower.tri(N.mat.incon,diag=F) * N.mat.incon
      Nval.incon[Nval.incon == 0] <- NA
      temp3 <- as.data.frame(cor_gather(Nval.incon,drop.na=T))
      fin.N.mat.incon[,1] <- temp3[,1]
      fin.N.mat.incon[,2] <- temp3[,2]
      fin.N.mat.incon[,z] <- temp3[,3]
      
}
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
colnames(fin.rho.mat.incon) <- c("var1", "var2", "98.5th quantile", "95th quantile", "90th quantile", "85th quantile")
colnames(fin.p.mat.incon) <- c("var1", "var2", "98.5th quantile", "95th quantile", "90th quantile", "85th quantile")
colnames(fin.N.mat.incon) <- c("var1", "var2", "98.5th quantile", "95th quantile", "90th quantile", "85th quantile")

#boxplot for
adj.fin.rho.mat.incon <- fin.rho.mat.incon[,3:6]
df.m.incon <- melt(adj.fin.rho.mat.incon)
ggplot(data=df.m.incon, aes(Var2,as.numeric(value))) + 
         geom_boxplot(aes(fill=Var2), show.legend=FALSE) + 
         geom_jitter(width=0.2) + 
         ylim(c(0,1)) + 
         xlab("BFI inconsistency quantile") + 
         ylab("correlation")

#irv: Calculate the intra-individual response variability

### irv
data2_mahal$irv <- irv(BFI2.recode)
hist(data2_mahal$irv)

quantile(data2_mahal$irv,0.99) #1.736342
##      99% 
## 1.736342
quantile(data2_mahal$irv,0.985) #1.721909 
##    98.5% 
## 1.721909
quantile(data2_mahal$irv,0.98) #1.698138
##      98% 
## 1.698138
quantile(data2_mahal$irv,0.975) #1.692823 
##    97.5% 
## 1.692823
quantile(data2_mahal$irv,0.95) #1.608882
##      95% 
## 1.608882
quantile(data2_mahal$irv,0.925) #1.576541
##    92.5% 
## 1.576541
quantile(data2_mahal$irv,0.9) #1.539144
##      90% 
## 1.539144
# specify vector of values over which to iterate for exclusion 
irv_excl <- c(1.736342,1.698138,1.608882,1.539144) #99th, 98th, 95th, 90th

#### fixed above to yield correlations, p values, and valid N #### 
rho.mat.irv <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
rho.mat.irv[,1] <- names(SR) #SR var names into 1st column
rho.mat.irv[,2] <- names(OBJ) #OBJ var names into 2nd column
p.mat.irv <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
p.mat.irv[,1] <- names(SR) #SR var names into 1st column
p.mat.irv[,2] <- names(OBJ) #OBJ var names into 2nd column
N.mat.irv <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
N.mat.irv[,1] <- names(SR) #SR var names into 1st column
N.mat.irv[,2] <- names(OBJ) #OBJ var names into 2nd column

for (x in 1:length(irv_excl)){
  dat <- subset(data2_mahal, irv < irv_excl[x])
  
  #create "SR" dataframe w/ self-report vars
    SR <- dat %>%
      select(
      ADJ_MIND_MIN.SR,
      ADJ.SESSIONS.SR,
      AppRECENT_STREAKDAYS,
      ADJ_MIN_PER_SESS.SR,
      AppDURATION_days,
      APP_Pattern_MPS,
      AppRECENT_HRS,
      AppRECENT_MINS,
      ENGAGE_PRAC.MINS,
      AppDURATION_years)

    #create "OBJ" dataframe w/ app-verified/objective vars
    OBJ <- dat %>%
      select(
      ADJ_MIND_MIN.OBJ,
      OBJ.SESSIONS,
      OBJ.Streak,
      ADJ_MIN_PER_SESS.OBJ,
      OBJ.MindfulDays,
      OBJ.AvgSession.min,
      OBJ.Hours,
      OBJ.Minutes,
      OBJ_PRAC.Minutes,
      OBJ_years)

      #calculate corr. btw self-reported (SR) & app-verified (OBJ) engagement variables
      for (i in 1:length(SR)) {
        z <- x + 2
        if (cor.test(SR[,i], OBJ[,i], na.action = na.omit)$parameter + 2 >= 50) { #parameter 
        rho.mat.irv[i,z] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$estimate,3) #estimate = rho
        p.mat.irv[i,z] <- cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$p.value #p-value
        N.mat.irv[i,z] <- cor.test(SR[,i],OBJ[,i], na.action=na.omit)$parameter + 2 #valid n
        }
      }
}
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
colnames(rho.mat.irv) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")
colnames(p.mat.irv) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")
colnames(N.mat.irv) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")

rho.mat.alt.irv <- rho.mat.irv[,3:6]
df.m.irv <- melt(rho.mat.alt.irv)
ggplot(data=df.m.irv, aes(Var2,as.numeric(value))) + 
         geom_boxplot(aes(fill=Var2), show.legend=FALSE) + 
         geom_jitter(width=0.2) + 
         ylim(c(0,1)) + 
         xlab("irv quantile") + 
         ylab("correlation")

###irv.z
hold <- scale(data2_mahal$irv)
data2_mahal$irv.z <- hold[,1]
sum(data2_mahal$irv.z < -3.291 | data2_mahal$irv.z > 3.291)
## [1] 1
hist(data2_mahal$irv.z)

quantile(data2_mahal$irv.z,0.99) #2.277144
##      99% 
## 2.277144
quantile(data2_mahal$irv.z,0.985) #2.208741
##    98.5% 
## 2.208741
quantile(data2_mahal$irv.z,0.98) #2.096086
##      98% 
## 2.096086
quantile(data2_mahal$irv.z,0.975) #2.070897
##    97.5% 
## 2.070897
quantile(data2_mahal$irv.z,0.95) #1.673087
##      95% 
## 1.673087
quantile(data2_mahal$irv.z,0.925) #1.519817
##    92.5% 
## 1.519817
quantile(data2_mahal$irv.z,0.9) #1.342587
##      90% 
## 1.342587
# specify vector of values over which to iterate for exclusion 
irv.z_excl <- c(2.277144,2.096086,1.673087,1.342587) #99th, 98th, 95th, 90th

#### fixed above to yield correlations, p values, and valid N #### 
rho.mat.irv.z <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
rho.mat.irv.z[,1] <- names(SR) #SR var names into 1st column
rho.mat.irv.z[,2] <- names(OBJ) #OBJ var names into 2nd column
p.mat.irv.z <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
p.mat.irv.z[,1] <- names(SR) #SR var names into 1st column
p.mat.irv.z[,2] <- names(OBJ) #OBJ var names into 2nd column
N.mat.irv.z <- matrix(0,nrow=length(SR),ncol=length(lngstrexcl)+2)
N.mat.irv.z[,1] <- names(SR) #SR var names into 1st column
N.mat.irv.z[,2] <- names(OBJ) #OBJ var names into 2nd column

for (x in 1:length(irv.z_excl)){
  dat <- subset(data2_mahal, irv.z < irv.z_excl[x])
  
  #create "SR" dataframe w/ self-report vars
    SR <- dat %>%
      select(
      ADJ_MIND_MIN.SR,
      ADJ.SESSIONS.SR,
      AppRECENT_STREAKDAYS,
      ADJ_MIN_PER_SESS.SR,
      AppDURATION_days,
      APP_Pattern_MPS,
      AppRECENT_HRS,
      AppRECENT_MINS,
      ENGAGE_PRAC.MINS,
      AppDURATION_years)

    #create "OBJ" dataframe w/ app-verified/objective vars
    OBJ <- dat %>%
      select(
      ADJ_MIND_MIN.OBJ,
      OBJ.SESSIONS,
      OBJ.Streak,
      ADJ_MIN_PER_SESS.OBJ,
      OBJ.MindfulDays,
      OBJ.AvgSession.min,
      OBJ.Hours,
      OBJ.Minutes,
      OBJ_PRAC.Minutes,
      OBJ_years)

      #calculate corr. btw self-reported (SR) & app-verified (OBJ) engagement variables
      for (i in 1:length(SR)) {
        z <- x + 2
        if (cor.test(SR[,i], OBJ[,i], na.action = na.omit)$parameter + 2 >= 50) { #parameter 
        rho.mat.irv.z[i,z] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$estimate,3) #estimate = rho
        p.mat.irv.z[i,z] <- cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$p.value #p-value
        N.mat.irv.z[i,z] <- cor.test(SR[,i],OBJ[,i], na.action=na.omit)$parameter + 2 #valid n
        }
      }
}
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
colnames(rho.mat.irv.z) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")
colnames(p.mat.irv.z) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")
colnames(N.mat.irv.z) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")

rho.mat.alt.irv.z <- rho.mat.irv.z[,3:6]
df.m.irv.z <- melt(rho.mat.alt.irv.z)
ggplot(data=df.m.irv.z, aes(Var2,as.numeric(value))) + 
         geom_boxplot(aes(fill=Var2), show.legend=FALSE) + 
         geom_jitter(width=0.2) + 
         ylim(c(0,1)) + 
         xlab("irv.z quantile") + 
         ylab("correlation")

####### OUTCOME INTERCORRELATIONS ####

# # #create "outcome1" w/ MH & WB vars
# outcome1 <- data2_mahal %>%
#       select(
#       EQHWB_TOTAL,
#       K10_TOTAL,
#       PHQ_TOTAL,
#       GAD7_TOTAL,
#       WEMWBS_TOTAL,
#       BFI2_NEU)

#### fixed above to yield "outcome" correlations, p values, and valid N #### 
fin.rho.mat.irv <- matrix(0,nrow=15,ncol=6)
fin.p.mat.irv <- matrix(0,nrow=15,ncol=6)
fin.N.mat.irv <- matrix(0,nrow=15,ncol=6)

rho.mat.irv <- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(rho.mat.irv) <- names(outcome1)
rownames(rho.mat.irv) <- names(outcome1)
p.mat.irv <- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(p.mat.irv) <- names(outcome1)
rownames(p.mat.irv) <- names(outcome1)
N.mat.irv <- matrix(0,nrow=length(outcome1),ncol=length(outcome1))
colnames(N.mat.irv) <- names(outcome1)
rownames(N.mat.irv) <- names(outcome1)


for (x in 1:length(irv_excl)){
  dat <- subset(data2_mahal, irv < irv_excl[x])
  
  #create "outcome1" w/ MH & WB vars
    outcome1 <- dat %>%
      select(
      EQHWB_TOTAL,
      K10_TOTAL,
      PHQ_TOTAL,
      GAD7_TOTAL,
      WEMWBS_TOTAL,
      BFI2_NEU)

      #calculate corr. btw MH & WB variables (i.e., outcome1 & outcome2)
      for (a in 1:length(outcome1)) {
        for (b in 1:length(outcome1)) {
        if (cor.test(outcome1[,a], outcome1[,b], na.action = na.omit)$parameter + 2 >= 50) { #parameter 
        rho.mat.irv[a,b] <- abs(round(cor.test(outcome1[,a],outcome1[,b], method="spearman",na.action=na.omit)$estimate,3)) #rho
        p.mat.irv[a,b] <- cor.test(outcome1[,a],outcome1[,b], method="spearman",na.action=na.omit)$p.value #p-value
        N.mat.irv[a,b] <- cor.test(outcome1[,a],outcome1[,b], na.action=na.omit)$parameter + 2 #valid n
        }
        }
      }
      z = x+2
      # organise correlations 
      rho.irv <- lower.tri(rho.mat.irv,diag=F) * rho.mat.irv
      rho.irv[rho.irv == 0] <- NA
      temp1 <- as.data.frame(cor_gather(rho.irv,drop.na=T))
      fin.rho.mat.irv[,1] <- temp1[,1]
      fin.rho.mat.irv[,2] <- temp1[,2]
      fin.rho.mat.irv[,z] <- temp1[,3]
      # organise p values 
      pval.irv <- lower.tri(p.mat.irv,diag=F) * p.mat.irv
      pval.irv[pval.irv == 0] <- NA
      temp2 <- as.data.frame(cor_gather(pval.irv,drop.na=T))
      fin.p.mat.irv[,1] <- temp2[,1]
      fin.p.mat.irv[,2] <- temp2[,2]
      fin.p.mat.irv[,z] <- temp2[,3]
      # organise N values 
      Nval.irv <- lower.tri(N.mat.irv,diag=F) * N.mat.irv
      Nval.irv[Nval.irv == 0] <- NA
      temp3 <- as.data.frame(cor_gather(Nval.irv,drop.na=T))
      fin.N.mat.irv[,1] <- temp3[,1]
      fin.N.mat.irv[,2] <- temp3[,2]
      fin.N.mat.irv[,z] <- temp3[,3]
      
}
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
## Warning in cor.test.default(outcome1[, a], outcome1[, b], method = "spearman",
## : Cannot compute exact p-value with ties
colnames(fin.rho.mat.irv) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")
colnames(fin.p.mat.irv) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")
colnames(fin.N.mat.irv) <- c("var1", "var2", "99th quantile", "98th quantile", "95th quantile", "90th quantile")

#boxplot for
adj.fin.rho.mat.irv <- fin.rho.mat.irv[,3:6]
df.m.irv <- melt(adj.fin.rho.mat.irv)
ggplot(data=df.m.irv, aes(Var2,as.numeric(value))) + 
         geom_boxplot(aes(fill=Var2), show.legend=FALSE) + 
         geom_jitter(width=0.2) + 
         ylim(c(0,1)) + 
         xlab("irv quantile") + 
         ylab("correlation")

# # Longstring and IRV both in redux 
# #irv: Calculate the intra-individual response variability
# 
# # irv - change back to data2_mahal
# data3_M_L$irv <- irv(BFI2.recode)
# hist(data3_M_L$irv)
# hold <- scale(data3_M_L$irv)
# data3_M_L$irv.z <- hold[,1]
# sum(data3_M_L$irv.z < -3.291 | data3_M_L$irv.z > 3.291)
# 
# #exclude outliers & careless responders 
# dat <- subset(data3_M_L, longstring <7 & (irv.z > -3.291 | irv.z < 3.291))
# dat <- dat[dat$longstring_flag == FALSE]
# nrow(dat)
# now that we've excluded more, let's check again 
# JA edit - dat to dat
SR <- dat %>%
  select(
ADJ_MIND_MIN.SR,
ADJ.SESSIONS.SR,
AppRECENT_STREAKDAYS,
ADJ_MIN_PER_SESS.SR,
AppDURATION_days,
APP_Pattern_MPS,
AppRECENT_HRS,
AppRECENT_MINS,
ENGAGE_PRAC.MINS,
AppDURATION_years)

OBJ <- dat %>%
  select(
ADJ_MIND_MIN.OBJ,
OBJ.SESSIONS,
OBJ.Streak,
ADJ_MIN_PER_SESS.OBJ,
OBJ.MindfulDays,
OBJ.AvgSession.min,
OBJ.Hours,
OBJ.Minutes,
OBJ_PRAC.Minutes,
OBJ_years)

#### fixed above to yield correlations, p values, and valid N #### 
out2 <- matrix(0,nrow=length(SR),ncol=5)
out2[,1] <- names(SR)
out2[,2] <- names(OBJ)
for (i in 1:length(SR)) {
   if (cor.test(SR[, i], OBJ[, i], na.action = na.omit)$parameter + 2 >= 50) {
  out2[i,3] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$estimate,3)
  out2[i,4] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$p.value,4) #1st out didn't specify d.p./round()?
  out2[i,5] <- cor.test(SR[,i],OBJ[,i], na.action=na.omit)$parameter + 2
   }
}
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
colnames(out2) <- c("var1", "var2", "rho", "p.val", "valid N")

newout <- cbind(out,out2[,3:5])
# Create a continuous variable representing the absolute difference
dat$OBJ.minutes_difference <- abs(dat$OBJ_PRAC.Minutes - dat$ENGAGE_PRAC.MINS)

hist(dat$OBJ.minutes_difference, 
     main = "Histogram of OBJ Minutes Difference",
     xlab = "Difference between Objective and Self-reported Minutes",
     ylab = "Frequency",
     col = "lightblue")  # Change bar color

# get rid of extreme outlier 
#diff_subset <- dat[complete.cases(dat$OBJ.minutes_difference) & dat$OBJ.minutes_difference <= 10000, ]

# create an outlier score variable 
one_quartile <- quantile(dat$OBJ.minutes_difference, probs = 0.25,na.rm=T)
third_quartile <- quantile(dat$OBJ.minutes_difference, probs = 0.75,na.rm=T)


cut <- quantile(dat$OBJ.minutes_difference,0.95,na.rm=T)
cut <- quantile(dat$OBJ.minutes_difference,0.75,na.rm=T) + 3*(quantile(dat$OBJ.minutes_difference,0.75,na.rm=T) - quantile(dat$OBJ.minutes_difference,0.25,na.rm=T))

# have changed to 3 x IQI 
dat$major_difference_flag <- ifelse(dat$OBJ.minutes_difference > cut, "Major Difference", "No Major Difference")

table(dat$major_difference_flag)
## 
##    Major Difference No Major Difference 
##                  52                 364
# carry on working only with those who are not outliers 
dat <- dat[complete.cases(dat$OBJ.minutes_difference) & dat$major_difference_flag =="No Major Difference", ]

# now that we've excluded more, let's check again 
SR <- dat %>%
  select(
ADJ_MIND_MIN.SR,
ADJ.SESSIONS.SR,
AppRECENT_STREAKDAYS,
ADJ_MIN_PER_SESS.SR,
AppDURATION_days,
APP_Pattern_MPS,
AppRECENT_HRS,
AppRECENT_MINS,
ENGAGE_PRAC.MINS,
AppDURATION_years)

OBJ <- dat %>%
  select(
ADJ_MIND_MIN.OBJ,
OBJ.SESSIONS,
OBJ.Streak,
ADJ_MIN_PER_SESS.OBJ,
OBJ.MindfulDays,
OBJ.AvgSession.min,
OBJ.Hours,
OBJ.Minutes,
OBJ_PRAC.Minutes,
OBJ_years)

#### fixed above to yield correlations, p values, and valid N #### 
out3 <- matrix(0,nrow=length(SR),ncol=5)
out3[,1] <- names(SR)
out3[,2] <- names(OBJ)
for (i in 1:length(SR)) {
   if (cor.test(SR[, i], OBJ[, i], na.action = na.omit)$parameter + 2 >= 50) {
  out3[i,3] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$estimate,3)
  out3[i,4] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$p.value,4)
  out3[i,5] <- cor.test(SR[,i],OBJ[,i], na.action=na.omit)$parameter + 2
   }
}
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
colnames(out3) <- c("var1", "var2", "rho", "p.val", "valid N")

newout2 <- cbind(newout,out3[,3:5])
##What variables do we have?

## What do the data look like in terms of normality, missingness etc?
## RESULT: Most raw variables exhibit extreme skew, which is only resolved by log winsorisation.

describe_reordered <- c("mean", "median", "se", "sd", "skew", "kurtosis", "n", "trimmed", "mad", "min", "max", "range", "vars")

describe_subset <- function(dat, vars, order = NULL) {
  subset_dat <- dat %>% select(vars)   # Subset based on selected vars
  desc_stats <- psych::describe(subset_dat)  # Use psych::describe() on the subset of dat
  if (!is.null(order)) {desc_stats <- desc_stats %>% select(all_of(order))} # If order is specified, reorder the columns
  return(desc_stats)
}

# Skewness:
# Between -1 and 1: Generally considered acceptable skewness.
# Between -2 and -1 or 1 and 2: Slightly skewed.
# Beyond -2 or 2: Considered highly skewed.
# 
# Kurtosis:
# Around 0: Mesokurtic (similar to a normal distribution).
# Greater than 0: Leptokurtic (heavier tails, more outliers).
# Less than 0: Platykurtic (lighter tails, fewer outliers).

#### NOTE: All winsorized and log-transformed variables need to be recomputed with reduced dataset ####

# Merge datasets so longstring, mahal and IRV all applied 

## Definition 1A SR and 1B OBJ Mindful Minutes
# recompute winsorized values 
min <- mean(dat$ADJ_MIND_MIN.SR,na.rm=T) - 3.29*(sd(dat$ADJ_MIND_MIN.SR,na.rm=T))
max <- mean(dat$ADJ_MIND_MIN.SR,na.rm=T) + 3.29*(sd(dat$ADJ_MIND_MIN.SR,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ_MIND_MIN.SR[i])) {
      if (dat$ADJ_MIND_MIN.SR[i] < min) {
      dat$ADJ_MIND_MIN.SR.win[i] <- min
      } else if (dat$ADJ_MIND_MIN.SR[i] > max) { 
      dat$ADJ_MIND_MIN.SR.win[i] <- max  
      } else {
      dat$ADJ_MIND_MIN.SR.win[i] <- dat$ADJ_MIND_MIN.SR[i] 
      }
  }
}
# recompute log-transformed values 
dat$ADJ_MIND_MIN.SR.win.log <- log(dat$ADJ_MIND_MIN.SR.win)

def1a <- dat %>%
  select(
    ADJ_MIND_MIN.SR,
    ADJ_MIND_MIN.SR.win,
    ADJ_MIND_MIN.SR.win.log
  )

# recompute winsorized values 
min <- mean(dat$ADJ_MIND_MIN.OBJ,na.rm=T) - 3.29*(sd(dat$ADJ_MIND_MIN.OBJ,na.rm=T))
max <- mean(dat$ADJ_MIND_MIN.OBJ,na.rm=T) + 3.29*(sd(dat$ADJ_MIND_MIN.OBJ,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ_MIND_MIN.OBJ[i])) {
      if (dat$ADJ_MIND_MIN.OBJ[i] < min) {
      dat$ADJ_MIND_MIN.OBJ.win[i] <- min
      } else if (dat$ADJ_MIND_MIN.OBJ[i] > max) { 
      dat$ADJ_MIND_MIN.OBJ.win[i] <- max  
      } else {
      dat$ADJ_MIND_MIN.OBJ.win[i] <- dat$ADJ_MIND_MIN.OBJ[i] 
      }
  }
}
# recompute log-transformed values 
dat$ADJ_MIND_MIN.OBJ.win.log <- log(dat$ADJ_MIND_MIN.OBJ.win)

def1b <- dat %>%
  select(
    ADJ_MIND_MIN.OBJ,
   ADJ_MIND_MIN.OBJ.win,
   ADJ_MIND_MIN.OBJ.win.log
  )

# recompute winsorized values - 2A/B: Sessions
min <- mean(dat$ADJ.SESSIONS.SR,na.rm=T) - 3.29*(sd(dat$ADJ.SESSIONS.SR,na.rm=T))
max <- mean(dat$ADJ.SESSIONS.SR,na.rm=T) + 3.29*(sd(dat$ADJ.SESSIONS.SR,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ.SESSIONS.SR[i])) {
      if (dat$ADJ.SESSIONS.SR[i] < min) {
      dat$ADJ.SESSIONS.SR.win[i] <- min
      } else if (dat$ADJ.SESSIONS.SR[i] > max) { 
      dat$ADJ.SESSIONS.SR.win[i] <- max  
      } else {
      dat$ADJ.SESSIONS.SR.win[i] <- dat$ADJ.SESSIONS.SR[i] 
      }
  }
}
# recompute log-transformed values 
dat$ADJ.SESSIONS.SR.win.log <- log(dat$ADJ.SESSIONS.SR.win)

## Definition 2A SR and 2B OBJ Self-reported sessions 
def2a <- dat %>%
  select(
    ADJ.SESSIONS.SR,
    ADJ.SESSIONS.SR.win,
    ADJ.SESSIONS.SR.win.log
  )

# recompute winsorized values - 2B: Obj sessions
min <- mean(dat$OBJ.SESSIONS,na.rm=T) - 3.29*(sd(dat$OBJ.SESSIONS,na.rm=T))
max <- mean(dat$OBJ.SESSIONS,na.rm=T) + 3.29*(sd(dat$OBJ.SESSIONS,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$OBJ.SESSIONS[i])) {
      if (dat$OBJ.SESSIONS[i] < min) {
      dat$OBJ.SESSIONS.win[i] <- min
      } else if (dat$OBJ.SESSIONS[i] > max) { 
      dat$OBJ.SESSIONS.win[i] <- max  
      } else {
      dat$OBJ.SESSIONS.win[i] <- dat$OBJ.SESSIONS[i] 
      }
  }
}
# recompute log-transformed values 
dat$OBJ.SESSIONS.win.log <- log(dat$OBJ.SESSIONS.win)

def2b <- dat %>%
  select(
    OBJ.SESSIONS,
    OBJ.SESSIONS.win,
    OBJ.SESSIONS.win.log
  )

# recompute winsorized values 
min <- mean(dat$ADJ.STREAK.SR,na.rm=T) - 3.29*(sd(dat$ADJ.STREAK.SR,na.rm=T))
max <- mean(dat$ADJ.STREAK.SR,na.rm=T) + 3.29*(sd(dat$ADJ.STREAK.SR,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ.STREAK.SR[i])) {
      if (dat$ADJ.STREAK.SR[i] < min) {
      dat$ADJ.STREAK.SR.win[i] <- min
      } else if (dat$ADJ.STREAK.SR[i] > max) { 
      dat$ADJ.STREAK.SR.win[i] <- max  
      } else {
      dat$ADJ.STREAK.SR.win[i] <- dat$ADJ.STREAK.SR[i] 
      }
  }
}
# recompute log-transformed values 
dat$ADJ.STREAK.SR.win.log <- log(dat$ADJ.STREAK.SR.win)

## Definition 3A SR and 3B OBJ Streaks 
def3a <- dat %>%
  select(
AppRECENT_STREAKDAYS,
ADJ.STREAK.SR,
ADJ.STREAK.SR.win,
ADJ.STREAK.SR.win.log

  )

# recompute winsorized values 
min <- mean(dat$ADJ.OBJ.Streak,na.rm=T) - 3.29*(sd(dat$ADJ.OBJ.Streak,na.rm=T))
max <- mean(dat$ADJ.OBJ.Streak,na.rm=T) + 3.29*(sd(dat$ADJ.OBJ.Streak,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ.OBJ.Streak[i])) {
      if (dat$ADJ.OBJ.Streak[i] < min) {
      dat$ADJ.OBJ.Streak.win[i] <- min
      } else if (dat$ADJ.OBJ.Streak[i] > max) { 
      dat$ADJ.OBJ.Streak.win[i] <- max  
      } else {
      dat$ADJ.OBJ.Streak.win[i] <- dat$ADJ.OBJ.Streak[i] 
      }
  }
}

# recompute log-transformed values 
dat$ADJ.OBJ.Streak.win.log <- log(dat$ADJ.OBJ.Streak.win)

def3b <- dat %>%
  select(
OBJ.Streak,
ADJ.OBJ.Streak,
ADJ.OBJ.Streak.win,
ADJ.OBJ.Streak.win.log

  )

# recompute winsorized values 
min <- mean(dat$ADJ.MINDFLDAYS.SR,na.rm=T) - 3.29*(sd(dat$ADJ.MINDFLDAYS.SR,na.rm=T))
max <- mean(dat$ADJ.MINDFLDAYS.SR,na.rm=T) + 3.29*(sd(dat$ADJ.MINDFLDAYS.SR,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ.MINDFLDAYS.SR[i])) {
      if (dat$ADJ.MINDFLDAYS.SR[i] < min) {
      dat$ADJ.MINDFLDAYS.SR.win[i] <- min
      } else if (dat$ADJ.MINDFLDAYS.SR[i] > max) { 
      dat$ADJ.MINDFLDAYS.SR.win[i] <- max  
      } else {
      dat$ADJ.MINDFLDAYS.SR.win[i] <- dat$ADJ.MINDFLDAYS.SR[i] 
      }
  }
}

# recompute log-transformed values 
dat$ADJ.MINDFLDAYS.SR.win.log <- log(dat$ADJ.MINDFLDAYS.SR.win)

## Definition 4A SR and 4B OBJ Mindful Days 
def4a <- dat %>%
  select(
ADJ.MINDFLDAYS.SR,
ADJ.MINDFLDAYS.SR.win,
ADJ.MINDFLDAYS.SR.win.log

  )

# recompute winsorized values 
min <- mean(dat$ADJ.MINDFLDAYS.OBJ,na.rm=T) - 3.29*(sd(dat$ADJ.MINDFLDAYS.OBJ,na.rm=T))
max <- mean(dat$ADJ.MINDFLDAYS.OBJ,na.rm=T) + 3.29*(sd(dat$ADJ.MINDFLDAYS.OBJ,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ.MINDFLDAYS.OBJ[i])) {
      if (dat$ADJ.MINDFLDAYS.OBJ[i] < min) {
      dat$ADJ.MINDFLDAYS.OBJ.win[i] <- min
      } else if (dat$ADJ.MINDFLDAYS.OBJ[i] > max) { 
      dat$ADJ.MINDFLDAYS.OBJ.win[i] <- max  
      } else {
      dat$ADJ.MINDFLDAYS.OBJ.win[i] <- dat$ADJ.MINDFLDAYS.OBJ[i] 
      }
  }
}

# recompute log-transformed values 
dat$ADJ.MINDFLDAYS.OBJ.win.log <- log(dat$ADJ.MINDFLDAYS.OBJ.win)

def4b <- dat %>%
  select(
ADJ.MINDFLDAYS.OBJ,
ADJ.MINDFLDAYS.OBJ.win,
ADJ.MINDFLDAYS.OBJ.win.log

  )
#remove infinite values 
dat$ADJ_MIN_PER_SESS.SR[is.infinite(dat$ADJ_MIN_PER_SESS.SR)] <- NA
# recompute winsorized values 
min <- mean(dat$ADJ_MIN_PER_SESS.SR,na.rm=T) - 3.29*(sd(dat$ADJ_MIN_PER_SESS.SR,na.rm=T))
max <- mean(dat$ADJ_MIN_PER_SESS.SR,na.rm=T) + 3.29*(sd(dat$ADJ_MIN_PER_SESS.SR,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ_MIN_PER_SESS.SR[i])) {
      if (dat$ADJ_MIN_PER_SESS.SR[i] < min) {
      dat$ADJ_MIN_PER_SESS.SR.win[i] <- min
      } else if (dat$ADJ_MIN_PER_SESS.SR[i] > max) { 
      dat$ADJ_MIN_PER_SESS.SR.win[i] <- max  
      } else {
      dat$ADJ_MIN_PER_SESS.SR.win[i] <- dat$ADJ_MIN_PER_SESS.SR[i] 
      }
  }
}

# recompute log-transformed values 
dat$ADJ_MIN_PER_SESS.SR.win.log <- log(dat$ADJ_MIN_PER_SESS.SR.win)

## Definition 5A SR and 5B OBJ Minutes per session 
def5a <- dat %>%
  select(
ADJ_MIN_PER_SESS.SR,
ADJ_MIN_PER_SESS.SR.win,
ADJ_MIN_PER_SESS.SR.win.log
  )

# recompute winsorized values 
min <- mean(dat$ADJ_MIN_PER_SESS.OBJ,na.rm=T) - 3.29*(sd(dat$ADJ_MIN_PER_SESS.OBJ,na.rm=T))
max <- mean(dat$ADJ_MIN_PER_SESS.OBJ,na.rm=T) + 3.29*(sd(dat$ADJ_MIN_PER_SESS.OBJ,na.rm=T))
for (i in 1:nrow(dat)){
  if (!is.na(dat$ADJ_MIN_PER_SESS.OBJ[i])) {
      if (dat$ADJ_MIN_PER_SESS.OBJ[i] < min) {
      dat$ADJ_MIN_PER_SESS.OBJ.win[i] <- min
      } else if (dat$ADJ_MIN_PER_SESS.OBJ[i] > max) { 
      dat$ADJ_MIN_PER_SESS.OBJ.win[i] <- max  
      } else {
      dat$ADJ_MIN_PER_SESS.OBJ.win[i] <- dat$ADJ_MIN_PER_SESS.OBJ[i] 
      }
  }
}

# recompute log-transformed values 
dat$ADJ_MIN_PER_SESS.OBJ.win.log <- log(dat$ADJ_MIN_PER_SESS.OBJ.win)

def5b <- dat %>%
  select(
ADJ_MIN_PER_SESS.OBJ,
ADJ_MIN_PER_SESS.OBJ.win,
ADJ_MIN_PER_SESS.OBJ.win.log
  )


## Def 6a All Other SR Variables
def6a <- dat %>%
  select(
AppRECENT_TOTALDAYS,
AppRECENT_TOTALSESSIONS,
SUBJ.28days,
AppDURATION_days,
MED_HRS,
AppRECENT_OTHERSTATS,
AppRECENT_HRS,
AppRECENT_MINS,
ENGAGE_PRAC.MINS,
ENGAGE_PRAC.MINS.win,
AppDURATION_years,
APP_Pattern_MPS,
APP_Pattern_MPS.int,
APP_Pattern_SPD,
APP_Pattern_DPW,
estminsperwk.ideal,
estminsperwk.ideal.adjusted,
estminsperwk.SR

  )


## Def 6a All Other OBJ Variables
def6b <- dat %>%
  select(
ADJ_MIN_PER_SESS.OBJ,
ADJ_MIN_PER_SESS.OBJ.win,
ADJ_MIN_PER_SESS.OBJ.win.log,
OBJ.TotalSessions,
OBJ.MindfulDays,
OBJ.AvgSession.min,
OBJ.28days,
OBJ.PastWk.AvgPerSession.min,
OBJ.HMLearnSession,
OBJ.HMLearnTime.hr,
OBJ.ActualPrac.min,
OBJ.AvgSessPastMo.PerWk,
OBJ.Hours,
OBJ.Minutes,
OBJ_PRAC.Minutes,
OBJ_PRAC.Minutes.win,
OBJ.YearJoined,
OBJ_years,
estminperwk.OBJ_denomyrs,
estminperwk.OBJ_denomdays
  )

# Use the describe_subset function
# def1a_result <- describe_subset(dat, names(def1a), describe_reordered)
# def1a_result$Subheading <- "1A"
# def1b_result <- describe_subset(dat, names(def1b), describe_reordered)
# def1b_result$Subheading <- "1B"
# def2a_result <- describe_subset(dat, names(def2a), describe_reordered)
# def2a_result$Subheading <- "2A"
# # Use the describe_subset function
# def2b_result <- describe_subset(dat, names(def2b), describe_reordered)
# def2b_result$Subheading <- "2B"
# # Use the describe_subset function
# def3a_result <- describe_subset(dat, names(def3a), describe_reordered)
# def3a_result$Subheading <- "3A"
# # Use the describe_subset function
# def3b_result <- describe_subset(dat, names(def3b), describe_reordered)
# def3b_result$Subheading <- "3B"
# # Use the describe_subset function
# def4a_result <- describe_subset(dat, names(def4a), describe_reordered)
# def4a_result$Subheading <- "4A"
# # Use the describe_subset function
# def4b_result <- describe_subset(dat, names(def4b), describe_reordered)
# def4b_result$Subheading <- "4B"
# # Use the describe_subset function
# def5a_result <- describe_subset(dat, names(def5a), describe_reordered)
# def5a_result$Subheading <- "5A"
# # Use the describe_subset function
# def5b_result <- describe_subset(dat, names(def5b), describe_reordered)
# def5b_result$Subheading <- "5B"
# def6a_result <- describe_subset(dat, names(def6a), describe_reordered)
# def6a_result$Subheading <- "6A - Other SR"
# def6b_result <- describe_subset(dat, names(def6b), describe_reordered)
# def6b_result$Subheading <- "6B - Other OBJ"
# 
# combined_results <- bind_rows(def1a_result, def1b_result, def2a_result, def2b_result, def3a_result, def3b_result, def4a_result, def4b_result, def5a_result, def5b_result, def6a_result, def6b_result)
# 
# # Extract variable names
# variable_names <- rownames(combined_results)
# 
# # Create a new dat frame with variable names
#variable_names_df <- data.frame(variable_names)

## All defined engagement vars, in order
defined <- dat %>%
  select(
ADJ_MIND_MIN.SR,
#ADJ_MIND_MIN.SR.win,
#ADJ_MIND_MIN.SR.win.log,
ADJ.SESSIONS.SR,
#ADJ.SESSIONS.SR.win,
#ADJ.SESSIONS.SR.win.log,
AppRECENT_STREAKDAYS,
ADJ.STREAK.SR,
#ADJ.STREAK.SR.win,
#ADJ.STREAK.SR.win.log,
ADJ.MINDFLDAYS.SR,
#ADJ.MINDFLDAYS.SR.win,
#ADJ.MINDFLDAYS.SR.win.log,
ADJ_MIN_PER_SESS.SR,
#ADJ_MIN_PER_SESS.SR.win,
#ADJ_MIN_PER_SESS.SR.win.log,
ADJ_MIN_PER_SESS.OBJ,
#ADJ_MIN_PER_SESS.OBJ.win,
#ADJ_MIN_PER_SESS.OBJ.win.log,
OBJ.SESSIONS,
#OBJ.SESSIONS.win,
#OBJ.SESSIONS.win.log,
OBJ.Streak,
#ADJ.OBJ.Streak, n < 50
#ADJ.OBJ.Streak.win,
#ADJ.OBJ.Streak.win.log,
#ADJ.MINDFLDAYS.OBJ, n < 50
#ADJ.MINDFLDAYS.OBJ.win,
#ADJ.MINDFLDAYS.OBJ.win.log,
ADJ_MIND_MIN.OBJ)
#ADJ_MIND_MIN.OBJ.win,
#ADJ_MIND_MIN.OBJ.win.log)

#All other engagement vars, in order
other <- dat %>%
  select(
AppRECENT_TOTALDAYS,
AppRECENT_TOTALSESSIONS,
SUBJ.28days,
#AppDURATION_days, n < 50
MED_HRS,
#AppRECENT_OTHERSTATS, ##Type Character
AppRECENT_HRS,
AppRECENT_MINS,
ENGAGE_PRAC.MINS,
ENGAGE_PRAC.MINS.win,
AppDURATION_years,
APP_Pattern_MPS,
APP_Pattern_MPS.int,
APP_Pattern_SPD,
APP_Pattern_DPW,
estminsperwk.ideal,
estminsperwk.ideal.adjusted,
estminsperwk.SR,
# ADJ_MIN_PER_SESS.OBJ, # already defined above 
# ADJ_MIN_PER_SESS.OBJ.win, # already defined above
# ADJ_MIN_PER_SESS.OBJ.win.log, # already defined above
#OBJ.TotalSessions, n < 50
OBJ.MindfulDays,
OBJ.AvgSession.min,
OBJ.28days,
#OBJ.PastWk.AvgPerSession.min, n < 50
#OBJ.HMLearnSession, n < 50
#OBJ.HMLearnTime.hr, n < 50
OBJ.ActualPrac.min,
#OBJ.AvgSessPastMo.PerWk, n < 50
OBJ.Hours,
OBJ.Minutes,
OBJ_PRAC.Minutes,
#OBJ_PRAC.Minutes.win,
#OBJ.YearJoined, n < 50
OBJ_years,
estminperwk.OBJ_denomyrs,
estminperwk.OBJ_denomdays )

## All engagement variables in one data.frame
engagement_vars <- cbind(defined, other)

calculate_missingness <- function(dat) {
  n <- colSums(!is.na(dat))
  N <- nrow(dat)
  NAs <- colSums(is.na(dat))
  missingness <- round((NAs / N * 100), 2)
  result <- data.frame(n = n, NAs = NAs, N = N, Missingness = missingness)
  return(result)
}

missingness_df <- calculate_missingness(engagement_vars)
name1 <- colnames(defined)
name2 <- colnames(other)
names <- append(name1,name2)
rownames(missingness_df) <- names

# # Add columns to combined_results
#combined_results <- cbind(engagement_vars, missingness_df)
# 
# # Reorder the columns of the merged data frame
#combined_results <- combined_results[, c("Subheading", "variable_names", "n", "NAs", "N", "Missingness", setdiff(names(combined_results), c("Subheading", "variable_names", "n", "NAs", "N", "Missingness")))]
# 
# # # Merge combined_results_with_labels and variable_names_df
# merged_dat <- cbind(combined_results, variable_names_df)
# 
# # # Reorder the columns of the merged dat frame
#merged_dat <- merged_dat[, c("Subheading", "variable_names", setdiff(names(merged_dat), c("Subheading", "variable_names", )))]
# 

#JA edit - uncomment line 1836 - 1847 so first sheet of wb gets created
# # Create a workbook for depositing outputs (openxlsx)
wb <- createWorkbook()
# 
# # Add a worksheet for the combined results
 addWorksheet(wb, "1. Engagement Vars")
# 
# # Write combined results to the worksheet
 writeData(wb, "1. Engagement Vars", engagement_vars)
 
 # JA edit - should all defs be added in different sheets?


# # Save the workbook
saveWorkbook(wb, file = file.path(getwd(), "Prolific_1_descriptors_20240505_2.xlsx"), overwrite = 
TRUE)

# LOOK at all engagement variables 
# create empty matrices for output 
rho.mat <- matrix(0,nrow=ncol(engagement_vars),ncol=ncol(engagement_vars))
p.mat <- matrix(0,nrow=ncol(engagement_vars),ncol=ncol(engagement_vars))
N.mat <- matrix(0,nrow=ncol(engagement_vars),ncol=ncol(engagement_vars))

# only compute estimates if valid N > 50
for (x in 1:ncol(engagement_vars)){
  for (y in 1:ncol(engagement_vars)){
  if (sum(complete.cases(engagement_vars[,x],engagement_vars[,y])) < 50) { 
  rho.mat[x,y] <- NA 
  p.mat[x,y] <- NA 
  N.mat[x,y] <- sum(complete.cases(engagement_vars[,x],engagement_vars[,y]))
  } else if (sum(complete.cases(engagement_vars[,x],engagement_vars[,y])) > 49){
  rho.mat[x,y] <- round(cor.test(engagement_vars[,x], engagement_vars[,y],na.action=na.omit, method="spearman")$estimate,3)
  p.mat[x,y] <- round(cor.test(engagement_vars[,x], engagement_vars[,y],na.action=na.omit,method="spearman")$p.value,4) 
  N.mat[x,y] <- sum(complete.cases(engagement_vars[,x],engagement_vars[,y])) 
  }
  }
}

cor_table <- matrix(0,nrow=nrow(rho.mat),ncol=ncol(rho.mat))
# format correlation table 
c <- ncol(rho.mat) # number of columns 
r <- nrow(rho.mat) # number of rows 
for (y in 1:c){
  for (x in 1:r) {
    pval <- p.mat[x,y]
    stars <- ifelse(pval < .001, "***", 
                ifelse(pval < .01, "** ", 
                       ifelse(pval < .05, "*  ", 
                              ifelse(pval < .1, "~ ", "   "))))

    coeff = round(rho.mat[x,y],3)
    cor_table[x,y] = paste(c(coeff,stars),collapse='')
  }
}

# replace the diagonals by dash(-)
diag(cor_table) <- '-' 
# fix NA labels 
cor_table[cor_table == "NANA"] <- NA
# erase the upper triangle
#cor_table[upper.tri(cor_table)] <- '' 
# change names 
rownames(cor_table) <- colnames(engagement_vars)  
colnames(cor_table) <- colnames(engagement_vars) 

## How well do SR and OBJ variables correlate?
## RESULT: Most correlations moderate (<.8) or below

#JA edit - uncomment line 1836 - 1847 so first sheet of wb gets created
# # Create a workbook for depositing outputs (openxlsx)
wb <- createWorkbook()

row_names <-colnames(cor_table)

cor_table_with_rownames <- cbind(RowName = rownames(cor_table), cor_table)
# 
# # Add a worksheet for the combined results
 addWorksheet(wb, "1. Engagement var cor table")
# 
# # Write combined results to the worksheet
 writeData(wb, "1. Engagement var cor table", cor_table_with_rownames)
 
 # JA edit - should all defs be added in different sheets?


# # Save the workbook
saveWorkbook(wb, file = file.path(getwd(), "Prolific_1_descriptors_20240505_4.xlsx"), overwrite = 
TRUE)
SR <- dat %>%
  select(
ADJ_MIND_MIN.SR,
ADJ.SESSIONS.SR,
AppRECENT_STREAKDAYS,
ADJ.STREAK.SR,
ADJ.MINDFLDAYS.SR,
ADJ_MIN_PER_SESS.SR,
)

SR.win <- dat %>%
  select(
ADJ_MIND_MIN.SR.win,
ADJ.SESSIONS.SR.win,
ADJ.STREAK.SR.win,
ADJ.MINDFLDAYS.SR.win,
ADJ_MIN_PER_SESS.SR.win,
)

SR.win.log <- dat %>%
  select(
ADJ_MIND_MIN.SR.win.log,
ADJ.SESSIONS.SR.win.log,
ADJ.STREAK.SR.win.log,
ADJ.MINDFLDAYS.SR.win.log,
ADJ_MIN_PER_SESS.SR.win.log
)

OBJ <- dat %>%
  select(
ADJ_MIN_PER_SESS.OBJ,
OBJ.SESSIONS,
OBJ.Streak,
ADJ.OBJ.Streak,
ADJ.MINDFLDAYS.OBJ,
ADJ_MIND_MIN.OBJ,
  )

OBJ.win <- dat %>%
  select(
ADJ_MIN_PER_SESS.OBJ.win,
OBJ.SESSIONS.win,
ADJ.OBJ.Streak.win,
ADJ.MINDFLDAYS.OBJ.win,
ADJ_MIND_MIN.OBJ.win,
  )

OBJ.win.log <- dat %>%
  select(
ADJ_MIN_PER_SESS.OBJ.win.log,
OBJ.SESSIONS.win.log,
ADJ.OBJ.Streak.win.log,
ADJ.MINDFLDAYS.OBJ.win.log,
ADJ_MIND_MIN.OBJ.win.log,
  )

out <- matrix(0,nrow=length(SR),ncol=5)
out[,1] <- names(SR)
out[,2] <- names(OBJ)
for (i in 1:length(SR)) {
   if (cor.test(SR[, i], OBJ[, i], na.action = na.omit)$parameter + 2 >= 50) {
  out[i,3] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$estimate,3)
  out[i,4] <- round(cor.test(SR[,i],OBJ[,i], method="spearman",na.action=na.omit)$p.value,4)
  out[i,5] <- cor.test(SR[,i],OBJ[,i], na.action=na.omit)$parameter + 2
   }
}
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
## Warning in cor.test.default(SR[, i], OBJ[, i], method = "spearman", na.action =
## na.omit): Cannot compute exact p-value with ties
colnames(out) <- c("var1", "var2", "rho", "p.val", "valid N")

#### fixed above to yield correlations, p values, and valid N #### 

wb <- loadWorkbook(file.path(getwd(), "Prolific_1_descriptors_20240505_4.xlsx"))

addWorksheet(wb, "2. OBS vs SR primary")

# Write the correlation table data
writeData(wb, sheet = "2. OBS vs SR primary", x = out, startCol = 1, startRow = 1)

# Save the workbook
saveWorkbook(wb, file = file.path(getwd(), "Prolific_1_engagevars_OBJ_SR_20240505_4.xlsx"), overwrite = TRUE)

How well do all engagement variables correlate?

RESULT: Poor correlations between defined and other variables generally

## How well do all engagement variables correlate?
## RESULT: Poor correlations between defined and other variables generally

#upper_triangle <- upper.tri(correlation_results)
# corr_defined_only[!upper_triangle] <- NA
# corr_defined_only <- round(corr_defined_only, 3)
# corr_defined_only_df <- data.frame(corr_defined_only)
# 
# corr_other_only <- calculate_correlations(other)
# upper_triangle <- upper.tri(corr_other_only)
# corr_other_only[!upper_triangle] <- NA
# corr_other_only <- round(corr_other_only, 3)
# corr_other_only_df <- data.frame(corr_other_only)
#   
# corr_defined_only_df_with_labels <- data.frame(
#   Row_Labels = rownames(corr_defined_only_df),
#   corr_defined_only_df
# )
# 
# corr_other_only_df_with_labels <- data.frame(
#   Row_Labels = rownames(corr_other_only_df),
#   corr_other_only_df
# )
# 
# 
# # Add a worksheet for the combined results
# addWorksheet(wb, "3. Engagement Spearman Corr")
# 
# # Write defined results
# writedat(wb, sheet = "3. Engagement Spearman Corr", corr_defined_only_df_with_labels, startCol = 1, startRow = 2, colNames = TRUE, rowNames = FALSE)
# writedat(wb, sheet = "3. Engagement Spearman Corr", "Row Labels", startCol = 1, startRow = 1)
# 
# # Write other results
# writedat(wb, sheet = "3. Engagement Spearman Corr", corr_defined_only_df_with_labels, startCol = ncol(corr_defined_only_df_with_labels), startRow = 2, colNames = TRUE, rowNames = FALSE)
# writedat(wb, sheet = "3. Engagement Spearman Corr", "Row Labels", startCol = 1, startRow = 1)
# 
# # Save the workbook
# saveWorkbook(wb, file = file.path(Paths[Sys.info()[7]], "analysis/Prolific_datIntegrity_20240313.xlsx"), overwrite = TRUE)

Which engagement variables are most strongly associated with outcome variables and predictors?

RESULT: Strongest assocations between defined vars and outcomes MAX 0.087 MIN -0.104

RESULT: Strongest assocations between other vars and outcomes MAX 0.117 MIN -0.119

# Number of maximal associations (pos or neg) between DEFINED vars and outcomes:
  # ADJ_MIN_PER_SESS.OBJ.win.log (4) AE1    K10_TOTAL   WEMWBS_TOTAL PHQ_TOTAL
  # ADJ_MIND_MIN.OBJ.win.log (4) AE1    K10_TOTAL   WEMWBS_TOTAL PHQ_TOTAL
  # ADJ.SESSIONS.SR.win.log (4) EQHWB_TOTAL WEMWBS_TOTAL PHQ_TOTAL  SCS12_TOTAL
  # ADJ_MIN_PER_SESS.SR.win.log (2) EQ.HWB.L_9  EQHWB_TOTAL


# Number of maximal associations (pos or neg) between OTHER vars and outcomes:
  # OBJ.YearJoined (4) K10_TOTAL    WEMWBS_TOTAL    PHQ_TOTAL   SCS12_TOTAL
  # AppRECENT_MINS (2) EQ.HWB.L_9   EQHWB_TOTAL
  # ENGAGE_PRAC.MINS.win (2) K10_TOTAL  GAD7_TOTAL
  # APP_Pattern_SPD (2) EQHWB_TOTAL GAD7_TOTAL


#Engagement vars - defined and other as per above
defined_plus_outcomes <- dat %>%
  select(
ADJ_MIND_MIN.SR,
ADJ_MIND_MIN.SR.win,
ADJ_MIND_MIN.SR.win.log,
ADJ.SESSIONS.SR,
ADJ.SESSIONS.SR.win,
ADJ.SESSIONS.SR.win.log,
AppRECENT_STREAKDAYS,
ADJ.STREAK.SR,
ADJ.STREAK.SR.win,
ADJ.STREAK.SR.win.log,
ADJ.MINDFLDAYS.SR,
ADJ.MINDFLDAYS.SR.win,
ADJ.MINDFLDAYS.SR.win.log,
ADJ_MIN_PER_SESS.SR,
ADJ_MIN_PER_SESS.SR.win,
ADJ_MIN_PER_SESS.SR.win.log,
ADJ_MIN_PER_SESS.OBJ,
ADJ_MIN_PER_SESS.OBJ.win,
ADJ_MIN_PER_SESS.OBJ.win.log,
OBJ.SESSIONS,
OBJ.SESSIONS.win,
OBJ.SESSIONS.win.log,
OBJ.Streak,
ADJ.OBJ.Streak,
ADJ.OBJ.Streak.win,
ADJ.OBJ.Streak.win.log,
ADJ.MINDFLDAYS.OBJ,
ADJ.MINDFLDAYS.OBJ.win,
ADJ.MINDFLDAYS.OBJ.win.log,
ADJ_MIND_MIN.OBJ,
ADJ_MIND_MIN.OBJ.win,
ADJ_MIND_MIN.OBJ.win.log,
EQ.HWB.L_9,
EQHWB_TOTAL,
AE1,
K10_TOTAL,
WEMWBS_TOTAL,
GAD7_TOTAL,
PHQ_TOTAL,
SCS12_TOTAL,
MH_baseline,
Stress_baseline,
Stress_now,
MH_SUPPORT_1
  )

# create empty matrices for output 
rho.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))
p.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))
N.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))

# only compute estimates if valid N > 50
for (x in 1:ncol(defined_plus_outcomes)){
  for (y in 1:ncol(defined_plus_outcomes)){
  if (sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) < 50) { 
  rho.mat[x,y] <- NA 
  p.mat[x,y] <- NA 
  N.mat[x,y] <- sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y]))
  } else if (sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) > 49){
  rho.mat[x,y] <- round(cor.test(defined_plus_outcomes[,x], defined_plus_outcomes[,y],na.action=na.omit, method="spearman")$estimate,3)
  p.mat[x,y] <- round(cor.test(defined_plus_outcomes[,x], defined_plus_outcomes[,y],na.action=na.omit,method="spearman")$p.value,4) 
  N.mat[x,y] <- sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) 
  }
  }
}

cor_table <- matrix(0,nrow=nrow(rho.mat),ncol=ncol(rho.mat))
# format correlation table 
c <- ncol(rho.mat) # number of columns 
r <- nrow(rho.mat) # number of rows 
for (y in 1:c){
  for (x in 1:r) {
    pval <- p.mat[x,y]
    stars <- ifelse(pval < .001, "***", 
                ifelse(pval < .01, "** ", 
                       ifelse(pval < .05, "*  ", 
                              ifelse(pval < .1, "~ ", "   "))))

    coeff = round(rho.mat[x,y],3)
    cor_table[x,y] = paste(c(coeff,stars),collapse='')
  }
}

# replace the diagonals by dash(-)
diag(cor_table) <- '-' 
# fix NA labels 
cor_table[cor_table == "NANA"] <- NA
# erase the upper triangle
#cor_table[upper.tri(cor_table)] <- '' 
# change names 
rownames(cor_table) <- colnames(defined_plus_outcomes)  
colnames(cor_table) <- colnames(defined_plus_outcomes) 
 

# # check valid N - change numeric values to 1, NA's to 0 
# ncheck.SR <- SR 
# ncheck.SR[!is.na(ncheck.SR)] <- 1 
# ncheck.SR[is.na(ncheck.SR)] <- 0 
# 
# ncheck.OBJ <- OBJ
# ncheck.OBJ[!is.na(ncheck.OBJ)] <- 1 
# ncheck.OBJ[is.na(ncheck.OBJ)] <- 0 
# 
# mat <- matrix(0,nrow=length(SR),ncol=1)
# # multiply variables 
# for (i in 1:length(SR)) {
#   mat[i,1] <- sum(ncheck.SR[,i]*ncheck.OBJ[,i])
# }

#write.csv(correlation_results, file = file.path(Paths[Sys.info()[7]], "correlation_results_defined_plus_outcomes_csv_JA_18032024.csv"))

# JA edit - edited the above write.csv for new results object? 

write.csv(defined_plus_outcomes, file = file.path(getwd(), "PREREG_5_defined_MH_csv_JA_20240505.csv"))

other_plus_outcomes <- dat %>%
  select(

AppRECENT_TOTALDAYS,
AppRECENT_TOTALSESSIONS,
SUBJ.28days,
AppDURATION_days,
MED_HRS,
#AppRECENT_OTHERSTATS, ##Type Character
AppRECENT_HRS,
AppRECENT_MINS,
ENGAGE_PRAC.MINS,
ENGAGE_PRAC.MINS.win,
AppDURATION_years,
APP_Pattern_MPS,
APP_Pattern_MPS.int,
APP_Pattern_SPD,
APP_Pattern_DPW,
estminsperwk.ideal,
estminsperwk.ideal.adjusted,
estminsperwk.SR,
ADJ_MIN_PER_SESS.OBJ,
ADJ_MIN_PER_SESS.OBJ.win,
ADJ_MIN_PER_SESS.OBJ.win.log,
OBJ.TotalSessions,
OBJ.MindfulDays,
OBJ.AvgSession.min,
OBJ.28days,
OBJ.PastWk.AvgPerSession.min,
OBJ.HMLearnSession,
OBJ.HMLearnTime.hr,
OBJ.ActualPrac.min,
OBJ.AvgSessPastMo.PerWk,
OBJ.Hours,
OBJ.Minutes,
OBJ_PRAC.Minutes,
OBJ_PRAC.Minutes.win,
OBJ.YearJoined,
OBJ_years,
estminperwk.OBJ_denomyrs,
estminperwk.OBJ_denomdays,  
EQ.HWB.L_9,
EQHWB_TOTAL,
AE1,
K10_TOTAL,
WEMWBS_TOTAL,
GAD7_TOTAL,
PHQ_TOTAL,
SCS12_TOTAL
  )

#other_plus_outcomes[is.na(other_plus_outcomes)] <- NA
cor_matrix <- cor(other_plus_outcomes, use="pairwise.complete.obs", method=c("spearman"))
write.csv(cor_matrix, file = file.path(getwd(), "PREREG_5_other_engag_MH_csv_JA_20240505.csv"))
#Engagement vars - defined and other as per above
defined_plus_outcomes <- dat %>%
  select(
ADJ_MIND_MIN.SR,
ADJ_MIND_MIN.SR.win,
ADJ_MIND_MIN.SR.win.log,
ADJ.SESSIONS.SR,
ADJ.SESSIONS.SR.win,
ADJ.SESSIONS.SR.win.log,
AppRECENT_STREAKDAYS,
ADJ.STREAK.SR,
ADJ.STREAK.SR.win,
ADJ.STREAK.SR.win.log,
ADJ.MINDFLDAYS.SR,
ADJ.MINDFLDAYS.SR.win,
ADJ.MINDFLDAYS.SR.win.log,
ADJ_MIN_PER_SESS.SR,
ADJ_MIN_PER_SESS.SR.win,
ADJ_MIN_PER_SESS.SR.win.log,
ADJ_MIN_PER_SESS.OBJ,
ADJ_MIN_PER_SESS.OBJ.win,
ADJ_MIN_PER_SESS.OBJ.win.log,
OBJ.SESSIONS,
OBJ.SESSIONS.win,
OBJ.SESSIONS.win.log,
OBJ.Streak,
ADJ.OBJ.Streak,
ADJ.OBJ.Streak.win,
ADJ.OBJ.Streak.win.log,
ADJ.MINDFLDAYS.OBJ,
ADJ.MINDFLDAYS.OBJ.win,
ADJ.MINDFLDAYS.OBJ.win.log,
ADJ_MIND_MIN.OBJ,
ADJ_MIND_MIN.OBJ.win,
ADJ_MIND_MIN.OBJ.win.log,
DWAI6_TOTAL,
DWAI6_GOAL,
DWAI6_BOND,
DWAI6_TASK, 
MPOQ_10,
MPOQ_12,
MPOQ_14,
uMARS_TOTAL,
uMARS_TOTAL_4Sections,
uMARS_TOTAL_6Sections,
uMARS_ENGAG,
uMARS_FUNC,
uMARS_AEST,
uMARS_INFO,
uMARS_SUBJ,
uMARS_PIMPACT,
)

 

# create empty matrices for output 
rho.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))
p.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))
N.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))

# only compute estimates if valid N > 50
for (x in 1:ncol(defined_plus_outcomes)){
  for (y in 1:ncol(defined_plus_outcomes)){
  if (sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) < 50) { 
  rho.mat[x,y] <- NA 
  p.mat[x,y] <- NA 
  N.mat[x,y] <- sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y]))
  } else if (sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) > 49){
  rho.mat[x,y] <- round(cor.test(defined_plus_outcomes[,x], defined_plus_outcomes[,y],na.action=na.omit, method="spearman")$estimate,3)
  p.mat[x,y] <- round(cor.test(defined_plus_outcomes[,x], defined_plus_outcomes[,y],na.action=na.omit,method="spearman")$p.value,4) 
  N.mat[x,y] <- sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) 
  }
  }
}

cor_table <- matrix(0,nrow=nrow(rho.mat),ncol=ncol(rho.mat))
# format correlation table 
c <- ncol(rho.mat) # number of columns 
r <- nrow(rho.mat) # number of rows 
for (y in 1:c){
  for (x in 1:r) {
    pval <- p.mat[x,y]
    stars <- ifelse(pval < .001, "***", 
                ifelse(pval < .01, "** ", 
                       ifelse(pval < .05, "*  ", 
                              ifelse(pval < .1, "~ ", "   "))))
    coeff = round(rho.mat[x,y],3)
    cor_table[x,y] = paste(c(coeff,stars),collapse='')
  }
}

# replace the diagonals by dash(-)
diag(cor_table) <- '-' 
# fix NA labels 
cor_table[cor_table == "NANA"] <- NA
# erase the upper triangle
#cor_table[upper.tri(cor_table)] <- '' 
# change names 
rownames(cor_table) <- colnames(defined_plus_outcomes)  
colnames(cor_table) <- colnames(defined_plus_outcomes) 
 

# # check valid N - change numeric values to 1, NA's to 0 
# ncheck.SR <- SR 
# ncheck.SR[!is.na(ncheck.SR)] <- 1 
# ncheck.SR[is.na(ncheck.SR)] <- 0 
# 
# ncheck.OBJ <- OBJ
# ncheck.OBJ[!is.na(ncheck.OBJ)] <- 1 
# ncheck.OBJ[is.na(ncheck.OBJ)] <- 0 
# 
# mat <- matrix(0,nrow=length(SR),ncol=1)
# # multiply variables 
# for (i in 1:length(SR)) {
#   mat[i,1] <- sum(ncheck.SR[,i]*ncheck.OBJ[,i])
# }

#write.csv(correlation_results, file = file.path(Paths[Sys.info()[7]], "correlation_results_defined_plus_outcomes_csv_JA_18032024.csv"))

# JA edit - edited the above write.csv for new results object? 
file_path <- "C:/Users/juadams/Documents/Research (Apps)/Prolific_1_5_USER_MHfactors_20240505_6.xlsx"

wb <- loadWorkbook(file_path)

# Write column names from dv1
addWorksheet(wb, sheetName = "2-3. App factors")

# Write column names
#writeData(wb, sheet = "5. MH factors", x = colnames(cor_table), startCol = 2, startRow = 1)

# Write row names
writeData(wb, sheet = "2-3. App factors", x = rownames(cor_table), startCol = 1, startRow = 2)

# Write the correlation table data
writeData(wb, sheet = "2-3. App factors", x = cor_table, startCol = 2, startRow = 1)


# # Save the workbook
saveWorkbook(wb, file = file.path(getwd(), "Prolific_1_3_5_PREREG_RESULTS_05052024.xlsx"), overwrite = 
TRUE)

#write.csv(defined_plus_outcomes, file = file.path(Paths[Sys.info()[7]], "PREREG_2-3_defined_APP_csv_JA_20240505.csv"))
#write.csv(defined_plus_outcomes, file = file.path(getwd(), "PREREG_2-3_defined_APP_csv_JA_20240505.csv"))
#Engagement vars - defined and other as per above - & user factors
defined_plus_outcomes <- dat %>%
  select(
ADJ_MIND_MIN.SR,
ADJ_MIND_MIN.SR.win,
ADJ_MIND_MIN.SR.win.log,
ADJ.SESSIONS.SR,
ADJ.SESSIONS.SR.win,
ADJ.SESSIONS.SR.win.log,
AppRECENT_STREAKDAYS,
ADJ.STREAK.SR,
ADJ.STREAK.SR.win,
ADJ.STREAK.SR.win.log,
ADJ.MINDFLDAYS.SR,
ADJ.MINDFLDAYS.SR.win,
ADJ.MINDFLDAYS.SR.win.log,
ADJ_MIN_PER_SESS.SR,
ADJ_MIN_PER_SESS.SR.win,
ADJ_MIN_PER_SESS.SR.win.log,
ADJ_MIN_PER_SESS.OBJ,
ADJ_MIN_PER_SESS.OBJ.win,
ADJ_MIN_PER_SESS.OBJ.win.log,
OBJ.SESSIONS,
OBJ.SESSIONS.win,
OBJ.SESSIONS.win.log,
OBJ.Streak,
ADJ.OBJ.Streak,
ADJ.OBJ.Streak.win,
ADJ.OBJ.Streak.win.log,
ADJ.MINDFLDAYS.OBJ,
ADJ.MINDFLDAYS.OBJ.win,
ADJ.MINDFLDAYS.OBJ.win.log,
ADJ_MIND_MIN.OBJ,
ADJ_MIND_MIN.OBJ.win,
ADJ_MIND_MIN.OBJ.win.log,
AE2,
AE3,
AEapp,
AEtime,
AE4,
AE5,
AE6,
AE7, 
K10_TOTAL,
SCS12_TOTAL,
SCS12_TOTAL.sum,
READINESS_TO_CHANGE_1,
EXPECT_START_1,
EXPECT_START_2,
EXPECT_MATCH_1,
EXPECT_FUTURE_1,
EXPECT_FUTURE_4,
EXPGen_1.y,
EXPGen_2.y,
EXPGen_3.y,
EXPGen_4.y,
EXPGen_5.y,
EXPGen_6.y,
EXPGen_7.y,
BFI2_EXT,
BFI2_AGR,
BFI2_CON,
BFI2_NEU,
BFI2_OPEN,
BFI2_SOC,
BFI2_ASSERT,
BFI2_ENERGY,
BFI2_COMP,
BFI2_RESPECT,
BFI2_TRUST,
BFI2_ORG,
BFI2_PROD,
BFI2_RESP,
BFI2_ANX,
BFI2_ANX,
BFI2_DEP,
BFI2_DEP,
BFI2_EVOL,
BFI2_ASENS,
BFI2_INTCUR,
BFI2_CRIMAG,
GSE6_TOTAL,
APP_Motiv1,
APP_Motiv2,
App_Motiv3,
App_Motiv4,
)


#  USER FACTORS -  including sociodemographics, spirituality, personality, self-efficacy, self-regulation, motivation, expectations, self-compassion, mental health care status and psychological distress) associate with mindfulness app engagement?
  

# create empty matrices for output 
rho.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))
p.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))
N.mat <- matrix(0,nrow=ncol(defined_plus_outcomes),ncol=ncol(defined_plus_outcomes))

# only compute estimates if valid N > 50
for (x in 1:ncol(defined_plus_outcomes)){
  for (y in 1:ncol(defined_plus_outcomes)){
  if (sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) < 50) { 
  rho.mat[x,y] <- NA 
  p.mat[x,y] <- NA 
  N.mat[x,y] <- sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y]))
  } else if (sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) > 49){
  rho.mat[x,y] <- round(cor.test(defined_plus_outcomes[,x], defined_plus_outcomes[,y],na.action=na.omit, method="spearman")$estimate,3)
  p.mat[x,y] <- round(cor.test(defined_plus_outcomes[,x], defined_plus_outcomes[,y],na.action=na.omit,method="spearman")$p.value,4) 
  N.mat[x,y] <- sum(complete.cases(defined_plus_outcomes[,x],defined_plus_outcomes[,y])) 
  }
  }
}

cor_table <- matrix(0,nrow=nrow(rho.mat),ncol=ncol(rho.mat))
# format correlation table 
c <- ncol(rho.mat) # number of columns 
r <- nrow(rho.mat) # number of rows 
for (y in 1:c){
  for (x in 1:r) {
    pval <- p.mat[x,y]
    sstars <- ifelse(pval < .001, "***", 
                ifelse(pval < .01, "** ", 
                       ifelse(pval < .05, "*  ", 
                              ifelse(pval < .1, "~ ", "   "))))

    coeff = round(rho.mat[x,y],3)
    cor_table[x,y] = paste(c(coeff,stars),collapse='')
  }
}

# replace the diagonals by dash(-)
diag(cor_table) <- '-' 
# fix NA labels 
cor_table[cor_table == "NANA"] <- NA
# erase the upper triangle
#cor_table[upper.tri(cor_table)] <- '' 
# change names 
rownames(cor_table) <- colnames(defined_plus_outcomes)  
colnames(cor_table) <- colnames(defined_plus_outcomes) 
 

# # check valid N - change numeric values to 1, NA's to 0 
# ncheck.SR <- SR 
# ncheck.SR[!is.na(ncheck.SR)] <- 1 
# ncheck.SR[is.na(ncheck.SR)] <- 0 
# 
# ncheck.OBJ <- OBJ
# ncheck.OBJ[!is.na(ncheck.OBJ)] <- 1 
# ncheck.OBJ[is.na(ncheck.OBJ)] <- 0 
# 
# mat <- matrix(0,nrow=length(SR),ncol=1)
# # multiply variables 
# for (i in 1:length(SR)) {
#   mat[i,1] <- sum(ncheck.SR[,i]*ncheck.OBJ[,i])
# }

#write.csv(correlation_results, file = file.path(Paths[Sys.info()[7]], "correlation_results_defined_plus_outcomes_csv_JA_18032024.csv"))

# JA edit - edited the above write.csv for new results object? 

write.csv(defined_plus_outcomes, file = file.path(getwd(), "PREREG_1_user_csv_JA_20240505.csv"))
#library(ggplot2)

# Create a sub datset of observations with "Major Difference"
#hist(data$OBJ.minutes_difference)
#iqr <- IQR(data$OBJ.minutes_difference, na.rm = TRUE)
#threshold <- 3 * iqr

# Print the indices of complete cases with OBJ.minutes_differences exceeding the threshold
#print(complete_cases_outliers)

# Remove rows with missing values in OBJ.minutes_difference
#major_difference_subset <- data[complete.cases(dat) & dat$OBJ.minutes_difference >= threshold, ]

#selected_columns_dat <- major_difference_subset[, c("OBJ.minutes_difference","ENGAGE_PRAC.MINS", "OBJ_PRAC.Minutes")]

# Print or inspect the new datset
#print(selected_columns_dat)
#data$AppDURATION_days <- na.omit(data$AppDURATION_days)

# carry on working only with those who are not outliers 
#data <- data[complete.cases(data$OBJ.minutes_difference) & data$major_difference_flag =="No Major Difference", ]
#
#data$OBJ.SESSIONS[data$OBJ.SESSIONS == "0"] <- NA

#NODIFF.MINS.SR <- data$ENGAGE_PRAC.MINS/data$AppDURATION_days
#data$NODIFF.MINS.SR <- NODIFF.MINS.SR

# deal with non-answers for Sex and Age and AppDURATION_days
#data <- subset(data, Age!="dat_EXPIRED" & Age!="CONSENT_REVOKED" & Sex!="dat_EXPIRED" & Sex!="CONSENT_REVOKED" & Sex!="Prefer not to say" & AppDURATION_days!="NA")
                                
#NEW VARIABLE!
#ADJ.MINS.SR.START <- data$OBJ.Minutes/data$AppDURATION_days
#data$ADJ.MINS.SR.START <- ADJ.MINS.SR.START

#NEW SUBJECTIVE VARIABLE!
#ADJ.MINS.SR.SR <- data$ENGAGE_PRAC.MINS/data$AppDURATION_days

#Check # removed due to the 'major differences' stipulation
##########~~~~~~~~~~~~~~~~~~~~ prediction modelling ~~~~~~~~~~~~~~~~~~~~##########
# Edited by Julia 12/02/2024

# skewness = 2, kurtosis = 7
#(J) - assuming these are suggested limits? 

# Curran, P. J., West, S. G., & Finch, J. F. (1996). The robustness of test statistics to nonnormality and specification error

# in confirmatory factor analysis. Psychological Methods, 1(1), 16-29.
# create a list of continuous variables 
# create a list of variable names 
names <- c("ADJ.MINS.SR.START",  "EQHWB_TOTAL", "BFI2_CON", "BFI2_NEU",  "EXPECT_START_1", "EXPECT_START_2", "uMARS_ENGAG", "EXPGen_1.y" )
            # rows, #columns

#Binary:  "SexBinary", "Binary_headspace", "Binary_calm"

# generate summary descriptives of data 
#descriptors <- dat[names]
#describe(descriptors)
#DescTools::Desc(descriptors)

#Make Sex binary
SexBinary <- ifelse(data2$Sex == "Female", 1, 0)

data2$SexBinary = SexBinary
# Winsorize values Z = |3.29|
# Only ADJ.MINS.SR.START came out with skew > 2 and kurt > 7, therefore we wins

# Adjusted minutes (objective) / start date (subjective)

min <- mean(data2$ADJ.MINS.SR.START) - (3.29*(sd(data2$ADJ.MINS.SR.START)))
max <- mean(data2$ADJ.MINS.SR.START) + (3.29*(sd(data2$ADJ.MINS.SR.START)))

# Calculate mean and standard deviation
mean_val <- mean(data2$ADJ.MINS.SR.START)
sd_val <- sd(data2$ADJ.MINS.SR.START)
#ERROR - getting NA_REAL_ for min and max

#data$ADJ.MINS.SR.START.win <- #DescTools::Winsorize(data$ADJ.MINS.SR.START) minval= min, maxval= max, #na.rm=TRUE

# winsorization 
data2$ADJ.MINS.SR.START.win <- ifelse(data2$ADJ.MINS.SR.START > max, max, data2$ADJ.MINS.SR.START)

# Model 1
model <- lm(formula = scale(ADJ.MINS.SR.START.win) ~ scale(as.numeric(Age)) + Sex + scale(EQHWB_TOTAL) + scale(BFI2_CON) + scale(BFI2_NEU) + scale(EXPECT_START_1) + poly(EXPECT_START_2, degree=1) + scale(uMARS_ENGAG) + scale(EXPGen_1.y), dat=data2)

summary(model)


Age_na_none <- na.omit(data$age)
# Make new dat frame
#install.packages("corrplot")
library(corrplot)

correlation_dat <- data.frame(EQHWB_TOTAL = data2$EQHWB_TOTAL, 
BFI2_CON = data2$BFI2_CON,
BFI2_NEU = data2$BFI2_NEU, 
EXPECT_START_1 = data2$EXPECT_START_1, 
EXPECT_START_2 = data2$EXPECT_START_2, 
uMARS_ENGAG = data2$uMARS_ENGAG, 
EXPGen_1.y = data2$EXPGen_1.y, 
SexBinary = data2$SexBinary)

correlation_matrix <- cor(correlation_dat)
corrplot(correlation_matrix, method = "color")
         
# heatmap(correlation_matrix, 
#        col = colorRampPalette(c("blue", "white", "red"))(100),
#        main = "Correlation Heatmap",
#        xlab = "Variables",
#        ylab = "Variables",
#        col.text = "black")  # Set text color to black
#install.packages("car")
library(car)

# Calculate VIF
vif_values <- vif(model)
print(vif_values)
# Model 1
model <- lm(formula = scale(ADJ.MINS.SR.START.win) ~ scale(as.numeric(Age)) + scale(EQHWB_TOTAL) + scale(BFI2_CON) + scale(BFI2_NEU) + scale(EXPECT_START_1) + poly(EXPECT_START_2, degree=1) + scale(uMARS_ENGAG) + scale(EXPGen_1.y), dat=data2)

summary(model)
# Adjusted values # 

#model <- lm(formula= scale(ue_tot) ~ scale(Age) + sex + scale(poly(DEM_EDU,degree=1)) +
#
#              scale(med.years.win) + scale(sits.wk.win) + scale(med.dur.sit.win) + #scale(log(med.hrs.win)) + RETREAT_YN + scale(poly(MED.Apps,degree=1)) +

#              scale(K10_TOTAL) + scale(Psychoticism) + scale(UnusualBeliefs) + #scale(PTSD_TOTAL) +

#              scale(poly(tobacco,degree=1)) + scale(poly(alcohol, degree=1)) + scale(poly(cannabis, degree=1)) + psychedelics.cut,

 #           dat = regr.dat)

#summary(model)

# Robust Regression # 

model <- robustbase::lmrob(formula = scale(ADJ.MINS.SR.START.win) ~ scale(as.numeric(Age)) + scale(EQHWB_TOTAL) + scale(BFI2_CON) + scale(BFI2_NEU) + scale(EXPECT_START_1) + poly(EXPECT_START_2, degree=1) + scale(uMARS_ENGAG) + scale(EXPGen_1.y), dat=data2)

summary(model)
### ~~~ Assumption tests ~~~ ###

par(mfrow = c(2, 2))

plot(model)


# test for linearity

lmtest::resettest(model)
 

# test for normality

sresid <- MASS::studres(model) #using MASS package function to transform dat easily

shapiro.test(sresid) # p value non-sign: normal distribution of residuals
 

# homoscedasticity test

lmtest::bptest(model)
 

# independence/autocorrelation assumption

car::durbinWatsonTest(model)
 

# multicollinearity

max(car::vif(model)) # > 5 cause for concern