Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GOSe-6mo-imputation
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Kevin Kunzmann
GOSe-6mo-imputation
Commits
c1840dfc
Commit
c1840dfc
authored
Apr 18, 2019
by
Kevin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
naming convention + minor fixed in input checking
parent
326fb908
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
imputation-report.Rmd
imputation-report.Rmd
+3
-4
scripts/check-inputs.R
scripts/check-inputs.R
+8
-3
No files found.
imputation-report.Rmd
View file @
c1840dfc
...
...
@@ -106,7 +106,6 @@ tbl_combined$Outcomes.DerivedCompositeGOSE %>% table
# Impute
```{r impute}
tbl_gose_msm <- tbl_combined %>%
select(
...
...
@@ -163,7 +162,7 @@ fit <- msm::msm(
censor.states = 2:7, # cannot be dead since these were filtered previously
control = list(
fnscale = 12000,
maxit = 10^4,
maxit = 10
, # 10
^4,
trace = 2
)
)
...
...
@@ -331,7 +330,7 @@ tbl_final_imputations %>%
```{r save-imputed-values}
tbl_final_imputations %>% {
tmp <- .
names(tmp) <- gsub("gose", "
Outcomes.Derived
GOSE", x = names(.))
names(tmp) <- gsub("gose", "
Subject.Subject.DerivedImputed180Days
GOSE", x = names(.))
tmp } %>%
write_csv("tbl_imputed_gose.csv")
```
...
...
scripts/check-inputs.R
View file @
c1840dfc
...
...
@@ -15,8 +15,13 @@ varnames <- c(
"Subject.PatientType"
,
"Subject.DeathDate"
)
colnames
<-
readr
::
read_csv
(
input_csv
,
n_max
=
1
)
%>%
names
colnames
<-
readr
::
read_csv
(
input_csv
,
n_max
=
1
,
,
col_types
=
"cinncD"
)
%>%
names
if
(
!
all
(
colnames
==
varnames
))
stop
(
"colnames do not match varnames, check order!"
)
tbl_gose_imputation
<-
readr
::
read_csv
(
input_csv
,
col_types
=
"cinncD"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment