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

changing the order of prediction processesing

first we do everything and then we take the exponential
i.e., we model-average the linear predictor
parent 46163ff7
No related branches found
No related tags found
No related merge requests found
...@@ -129,10 +129,10 @@ pred_estimates_sum <- apply(pred_estimates_wcoeffs, 1, sum) ...@@ -129,10 +129,10 @@ pred_estimates_sum <- apply(pred_estimates_wcoeffs, 1, sum)
# check this # check this
# sonst zeroinflated part. wahrscheinlichkeit das null ist durhc 1- --> wahrscheinl das es 1 ist # sonst zeroinflated part. wahrscheinlichkeit das null ist durhc 1- --> wahrscheinl das es 1 ist
# wahrscheinlich macht es auch sinn da prediktoren drin zu haben in zeroinflated part # wahrscheinlich macht es auch sinn da prediktoren drin zu haben in zeroinflated part
pred_estimates_calc <- exp(pred_estimates_sum) pred_estimates_weighted <- pred_estimates_sum * coeff_weights$w_aic
pred_estimates_weighted <- pred_estimates_calc * coeff_weights$w_aic pred_estimates_calc <- sum(pred_estimates_weigthed)
return(sum(pred_estimates_weighted)) return(exp(pred_estimates_calc))
} }
print(paste(Sys.time(), "2. finished dopar loop")) print(paste(Sys.time(), "2. finished dopar loop"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment