Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CHIN_sim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Margarete Walden
CHIN_sim
Commits
b0fc82cf
Commit
b0fc82cf
authored
10 months ago
by
Margarete Walden
Browse files
Options
Downloads
Patches
Plain Diff
Replace sim_run.R due to unknown error. Set to nset 150, eff .1, nsim 100.
parent
236d3faa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
chin_sim_image/scripts/sim_run.R
+10
-9
10 additions, 9 deletions
chin_sim_image/scripts/sim_run.R
with
10 additions
and
9 deletions
chin_sim_image/scripts/sim_run.R
+
10
−
9
View file @
b0fc82cf
...
...
@@ -103,11 +103,11 @@ source("scripts/sim_variables.R")
# Tuning matrix
sim_tunemat
<-
read.csv
(
"data/sim_tunemat.csv"
,
header
=
TRUE
)
summary
(
sim_tunemat
)
#
summary(sim_tunemat)
# Dataset seeds
sim_datamat
<-
read.csv
(
"data/sim_datamat.csv"
,
header
=
TRUE
)
summary
(
sim_datamat
)
#
summary(sim_datamat)
####
####----5. SIMULATION FOR-LOOP----------------------------------------------####
...
...
@@ -116,17 +116,18 @@ summary(sim_datamat)
## For each N, run model for each simulated dataset and store
## parameter estimates
xtracores
<-
16
xtracores
<-
25
# xtracores <- 3
nimblecores
<-
9
# nimblecores <-
3
# nimblecores <-
2
nimblechains
<-
9
# nimblechains <- 2
nset
<-
150
nsim
<-
100
theseefficiencies
<-
"Max efficiency 0.1"
arrResults
<-
array
(
data
=
NA
,
dim
=
c
(
length
(
nset
)
*
2
,
nsim
,
7
,
300
))
...
...
@@ -184,11 +185,11 @@ print(Sys.time())
thiscounter
<-
0
# i <- 200
# i <- 1
5
0
# i <- 1
0
0
# nset <- 200
for
(
i
in
nset
)
{
theseefficiencies
<-
"Max efficiency 0.
25
"
#
theseefficiencies <- "Max efficiency 0.
1
"
# thisefficiency <- "Max efficiency 0.1"
for
(
thisefficiency
in
theseefficiencies
)
{
...
...
@@ -1225,9 +1226,9 @@ for (i in nset) {
##----Save simulation results/print to console
if
(
j
%%
5
0
==
0
)
{
if
(
j
%%
5
==
0
)
{
filename
<-
paste0
(
'output/R_ss'
,
i
,
'_'
,
theseefficiencies
,
'_'
,
j
,
'.RData'
,
collapse
=
''
)
filename
<-
paste0
(
'output/R_ss'
,
thiscounter
,
'_'
,
j
,
'.RData'
,
collapse
=
''
)
save
(
arrResults
,
file
=
filename
)
}
thisstring
<-
paste0
(
"Completed one simulation: Sample size: "
,
i
,
...
...
@@ -1249,6 +1250,6 @@ print(Sys.time())
##----6. Save output----
## Save output array
thisstring
<-
paste0
(
'output/R_nsim_'
,
nsim
,
'_nset_'
,
nset
,
'_'
,
th
e
se
e
fficienc
ies
,
'.RData'
,
collapse
=
''
)
thisstring
<-
paste0
(
'output/R_nsim_'
,
nsim
,
'_nset_'
,
nset
,
th
i
sefficienc
y
,
'.RData'
,
collapse
=
''
)
save
(
arrResults
,
file
=
thisstring
)
# sessionInfo()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment