Skip to content

Commit

Permalink
CCFI Profile and additional scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeloman committed Oct 27, 2020
1 parent 04420e0 commit c5c6664
Show file tree
Hide file tree
Showing 8 changed files with 293 additions and 427 deletions.
4 changes: 2 additions & 2 deletions .Rproj.user/DFCA1C7C/sources/prop/421CC383
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"tempName": "Untitled1",
"cursorPosition": "133,17",
"scrollLine": "127"
"cursorPosition": "5,21",
"scrollLine": "0"
}
2 changes: 2 additions & 0 deletions .Rproj.user/DFCA1C7C/sources/prop/INDEX
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
D%3A%2FRProjects%2FHability_Taxon%2Fconsistency.R="7ADF8CD9"
D%3A%2FRProjects%2FHability_Taxon%2Fdemographics.R="AE710784"
D%3A%2FRProjects%2FHability_Taxon%2Fhability_taxon_data_prep.R="421CC383"
D%3A%2FRProjects%2FHability_Taxon%2Fhability_taxon_data_prep_report.Rmd="E6AC997F"
3 changes: 3 additions & 0 deletions .Rproj.user/shared/notebooks/paths
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
D:/RProjects/Hability_Taxon/consistency.R="4DDD5EC2"
D:/RProjects/Hability_Taxon/demographics.R="7A2E7641"
D:/RProjects/Hability_Taxon/hability_taxon_data_prep.R="3FB27ABB"
D:/RProjects/Hability_Taxon/hability_taxon_data_prep_report.Rmd="47D7A566"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ hability_taxon_data_prep_report.pdf
*.pdf
*.png
*.txt
*.jpeg
17 changes: 17 additions & 0 deletions consistency.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
library("DescTools")

data <- read.csv("oxford_hgshsa_260820_modded.csv", sep = ";")

data <- na.omit(data)

invol <- select(data, INV.1:INV.12)

hab <- select(data, HGSHS.A1:HGSHS.A11, HGSHS.A12)

cron_invol <- CronbachAlpha(invol)

cron_hab <- CronbachAlpha(hab)

cron_invol

cron_hab
15 changes: 15 additions & 0 deletions demographics.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
demographics <- read.csv("oxford_hgshsa_260820_demographics.csv", sep = ";")

data <- read.csv("oxford_hgshsa_260820_modded.csv", sep = ";")

data <- na.omit(data)

demographics_filtered <- demographics[demographics$id %in% data$id,]

#Removing problematic entries
demographics_filtered <- demographics_filtered[demographics_filtered$age > 0,]
demographics_filtered <- demographics_filtered[!is.na(demographics_filtered$age),]

mean(demographics_filtered$age)

sd(demographics_filtered$age)
23 changes: 23 additions & 0 deletions hability_taxon_data_prep.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,34 +111,57 @@ hab_subsc_pur10 <- ClassifyCases(hab_subsc_pur10, p = 0.10)

### P = 0.15

cat("invol15")
RunTaxometrics(invol15) # Я дома

cat("invol10")
RunTaxometrics(invol10) # Я дома

cat("invol_pur15")
RunTaxometrics(invol_pur15) #Драгон

cat("invol_pur10")
RunTaxometrics(invol_pur10) #Драгон

cat("invol_subscales15")
RunTaxometrics(invol_subscales15) # Я ноут

cat("invol_subscales10")
RunTaxometrics(invol_subscales10) # Я ноут

cat("invol_subscales_pur15")
RunTaxometrics(invol_subscales_pur15) # Шляпа

cat("invol_subscales_pur10")
RunTaxometrics(invol_subscales_pur10) # Я дома

cat("hab15")
RunTaxometrics(hab15) #Шляпа

cat("hab10")
RunTaxometrics(hab10) #Драгон

cat("hab_pur15")
RunTaxometrics(hab_pur15) # Вика

cat("hab_pur10")
RunTaxometrics(hab_pur10) # Вика

cat("hab_subsc15")
RunTaxometrics(hab_subsc15) # Я ноут

cat("hab_subsc10")
RunTaxometrics(hab_subsc10) # Я дома

cat("hab_subsc_pur15")
RunTaxometrics(hab_subsc_pur15) # Я дома

cat("hab_subsc_pur10")
RunTaxometrics(hab_subsc_pur10) # Я дома

#CCFI Profile for selected models:

RunCCFIProfile(select(invol, ideomotor, challenge, cogper, amnesia))

RunCCFIProfile(select(hab, ideomotor, challenge, cogper, amnesia))

Loading

0 comments on commit c5c6664

Please sign in to comment.