Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GOSe-6mo-imputation-paper
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-paper
Commits
f4679a85
Commit
f4679a85
authored
Feb 02, 2019
by
Kevin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed post processing issue
parent
9723914a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
scripts/post_process_imputations.R
scripts/post_process_imputations.R
+5
-4
No files found.
scripts/post_process_imputations.R
View file @
f4679a85
...
...
@@ -12,7 +12,7 @@ df_gose <- readRDS(gosefile)
posteriors
<-
list.files
(
modelimputations_dir
,
pattern
=
"*.rds"
)
# load and combine all posteri
ro
s over different (baseline) imputations
# load and combine all posteri
or
s over different (baseline) imputations
df_imputations
<-
c
()
for
(
i
in
1
:
length
(
posteriors
))
{
df_imputations
<-
rbind
(
...
...
@@ -40,11 +40,12 @@ df_imputations <- df_imputations %>%
{
if
(
length
(
.
)
==
0
)
{
# fix all probs. NA case
return
(
NA
)
}
else
{
return
(
.
)
}
if
(
length
(
.
)
>
1
)
{
# need to resolve ambiguous gose predictions !
return
(
sample
(
.
,
1
))
}
return
(
.
)
}
%>%
sample
(
1
)
%>%
# need to resolve ambiguous gose predictions !
rep
(
n
()),
GOSE
=
factor
(
GOSE
,
...
...
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