Skip to content
Snippets Groups Projects
Commit c1d2df2c authored by Maria Voigt's avatar Maria Voigt
Browse files

merging stuff from cluster down

parents c59ca384 0ce4ce38
No related branches found
No related tags found
No related merge requests found
...@@ -338,8 +338,8 @@ if (!is.na(exclude_rand)){ ...@@ -338,8 +338,8 @@ if (!is.na(exclude_rand)){
ids_to_exclude <- sample(predictors_obs$id, ids_to_exclude <- sample(predictors_obs$id,
size = nrow(predictors_obs)/100 * exclude_rand_perc, size = nrow(predictors_obs)/100 * exclude_rand_perc,
replace = FALSE) replace = FALSE)
predictors_excluded <- predictors_obs[predictors_obs$bin_id %in% ids_to_exclude, ] predictors_excluded <- predictors_obs[predictors_obs$id %in% ids_to_exclude, ]
predictors_obs <- predictors_obs[!predictors_obs$bin_id %in% ids_to_exclude, ] predictors_obs <- predictors_obs[!predictors_obs$id %in% ids_to_exclude, ]
nr_excluded <- nrow(predictors_excluded) nr_excluded <- nrow(predictors_excluded)
} }
...@@ -388,8 +388,6 @@ m_terms <- c("1", ...@@ -388,8 +388,6 @@ m_terms <- c("1",
"I(rain_dry^2)") "I(rain_dry^2)")
save.image(file.path(outdir, paste0("image_before_model_", exclude_rand, ".RData")))
# save model_terms here # save model_terms here
model_terms <- names(glm.nb(as.formula(paste("nr_nests~", paste(m_terms, model_terms <- names(glm.nb(as.formula(paste("nr_nests~", paste(m_terms,
collapse = "+"), collapse = "+"),
...@@ -516,7 +514,7 @@ results_res <- foreach(i = 1:nrow(all_model_terms), ...@@ -516,7 +514,7 @@ results_res <- foreach(i = 1:nrow(all_model_terms),
predictors_excluded_pred <- predictors_excluded predictors_excluded_pred <- predictors_excluded
predictors_excluded_pred$offset_term <- 0 predictors_excluded_pred$offset_term <- 0
prediction_transect_excluded <- predict.glm(res, prediction_transect_excluded <- predict.glm(res,
newdata = predictors_excluded, newdata = predictors_excluded_pred,
type = "response") type = "response")
cross_lm = lm(log(predictors_excluded$ou_dens+ 1) ~ cross_lm = lm(log(predictors_excluded$ou_dens+ 1) ~
log(prediction_transect_excluded + 1)) log(prediction_transect_excluded + 1))
...@@ -573,8 +571,8 @@ write.csv(summary_mean_coefficients, ...@@ -573,8 +571,8 @@ write.csv(summary_mean_coefficients,
Sys.Date(), ".csv"))) Sys.Date(), ".csv")))
save.image(file.path(outdir, paste0("abundance_model_fitting_", #save.image(file.path(outdir, paste0("abundance_model_fitting_",
name_suffix, # name_suffix,
Sys.Date(), ".RData"))) # Sys.Date(), ".RData")))
print(paste("Finished model_fitting script, at", Sys.time())) print(paste("Finished model_fitting script, at", Sys.time()))
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
# here somehow write the prefix depending on what we are testing # here somehow write the prefix depending on what we are testing
JOB_NAME_PREFIX=ppln_ae75m_50_ac JOB_NAME_PREFIX=ppln_ae150m_50
INPUT_PATH='/work/voigtma/ppln_ae75m_50_fixing-2017-02-28T18-00-52' INPUT_PATH='/data/idiv_kuehl/maria_data/pipeline'
NAME=$JOB_NAME_PREFIX-$(date +%FT%H-%M-%S) NAME=$JOB_NAME_PREFIX-$(date +%FT%H-%M-%S)
# FIX THIS # FIX THIS
...@@ -27,7 +27,7 @@ QSUB="qsub -terse -v OUTPUT_PATH=$OUTPUT_PATH -o /work/$USER/$NAME.log -j y" ...@@ -27,7 +27,7 @@ QSUB="qsub -terse -v OUTPUT_PATH=$OUTPUT_PATH -o /work/$USER/$NAME.log -j y"
-N ${JOB_NAME_PREFIX}_fitting \ -N ${JOB_NAME_PREFIX}_fitting \
$HOME/orangutan_density_distribution/src/model_fitting/submit_abundance_model_ac_term.sh \ $HOME/orangutan_density_distribution/src/model_fitting/submit_abundance_model_ac_term.sh \
-i $INPUT_PATH \ -i $INPUT_PATH \
--ESW-aerial 0.075 \ --ESW-aerial 0.15 \
--include-aerial \ --include-aerial \
--stability) --stability)
...@@ -38,5 +38,6 @@ QSUB="qsub -terse -v OUTPUT_PATH=$OUTPUT_PATH -o /work/$USER/$NAME.log -j y" ...@@ -38,5 +38,6 @@ QSUB="qsub -terse -v OUTPUT_PATH=$OUTPUT_PATH -o /work/$USER/$NAME.log -j y"
-hold_jid $MODEL_JOB_ID_FITTING \ -hold_jid $MODEL_JOB_ID_FITTING \
-t 1999:2015 \ -t 1999:2015 \
$HOME/orangutan_density_distribution/src/prediction/submit_abundance_pred.sh \ $HOME/orangutan_density_distribution/src/prediction/submit_abundance_pred.sh \
-i $INPUT_PATH ) -i $INPUT_PATH \
--focal-change-predictor NA)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment