-Bxy <- 0.2
-Bgy <- -0.2
-Bgx <- 0.5
-
-df <- simulate_data(args$N, args$m, B0, Bxy, Bgy, Bgx, seed=args$seed, y_explained_variance = 0.025, gx_explained_variance = 0.15)
-result <- list('N'=args$N,'m'=args$m,'B0'=B0,'Bxy'=Bxy,'Bgy'=Bgy, 'Bgx'=Bgx, 'seed'=args$seed)
-outline <- run_simulation(df, result)
-
-outfile_lock <- lock(paste0(args$outfile, '_lock'),exclusive=TRUE)
-if(file.exists(args$outfile)){
- logdata <- read_feather(args$outfile)
- logdata <- rbind(logdata,as.data.table(outline))
-} else {
- logdata <- as.data.table(outline)
-}
+Bxy <- 0.3
+Bzy <- -0.3
+Bzx <- args$Bzx
+
+if (args$m < args$N){
+
+ df <- simulate_data(args$N, args$m, B0, Bxy, Bzy, Bzx, seed=args$seed + 500, y_explained_variance = args$y_explained_variance, prediction_accuracy=args$prediction_accuracy)