Fix size of NaN vector returned so that resid.m does not crash

(cherry picked from commit 616dad634a2f97200d29003ef29898dc65fac167)
More explicit error message when using the derivative of an external function in the model block.

Closes #678

(cherry picked from commit 31a14262773d21aa8c7df5209c698bbabbac8bde)
Fix two bug in resol that lead to crashes instead of error messages when loglinear option was used and steady state were negative

(cherry picked from commit 39bfc1dd041a991ade9a776fcda08f2102da5c78)
Restore backward compatibility of mode_file option

Displays warning and then assumes the user provided a correct mode-file. Closes #658

(cherry picked from commit 2caa9eb9d4420ef0f8679892302c46ca55834115)
Add forgotten case to likelihood functions

Code 25 was not filtered out, leading to cryptic crashes

(cherry picked from commit ca6803b5310df303b2b754193f8cc31e836bf89b)
Account for loading of only one variable when loading Excel-file

Closes #654

(cherry picked from commit 9f793d10696e6bc4604e04f8532344c08624e3b4)
Filter out ML of model_comparison.m

Also documents that ML is not supported and adds reference for model comparison
Related to #681

(cherry picked from commit 85f336496d09615c4e0a39c9284d3ee9b6d6d62a)
Steady state calculation of Ramsey problem: fix bug when params are updated.

If the steady state file was modifying parameters, the changes were not taken
fully taken into account.

Thanks to Junior Maih for noticing and proposing the fix.

(cherry picked from commit def9ee92e560d1eeb7277d4be41315f139316caa)
evaluate_steady_state.m: fix bug with block when static and dynamic models differ.

(partial cherry-pick of 7400c2c1431c1c4e24df638f3811605cdd1a715f)
Update documentation for building under Cygwin.

In particular, document the procedure for Cygwin64 (ref #640).

Thanks to Johannes Pfeifer for his feedback on this issue.

(cherry picked from commit 8ac6a671dba23f626fa737090002d1b1313717be)
Clarify error message for external functions misuse in model block.

Thanks to Johannes Pfeifer.

(cherry picked from commit cebed5435f2d3fac8935fa72af4f8d3bd37019f0)
Better error message when block option when a variable does not appear at current period.

(cherry picked from commit 46a0edb9b30a17396d29dde69cb9fa68759648e8)
make install, closes #576
(manually cherry picked from commit 8d2b79a224c49109affa73d1af2165dc0acc0fc6)
Fixes to make install.

- fix DESTDIR for preprocessor and MEX files (it was duplicated)
- don't install libdynare++.a

(cherry picked from commit 9b5a09958c53371cea1e591ab36896ecd7483747)
Add more info on requirement on dsge_var prior weight needed for prior to be proper.

(cherry picked from commit 74fd0850d61f8ba464ff08ed42c4019d27722fb3)
(cherry picked from commit b69174477c1e0afbcc01ca8a1b63fa2014130418)
Document computation of theoretical mean at second order

(cherry picked from commit 7084913382dc892fa4385fb7783e5daec41449f7)
(cherry picked from commit fbdfaf640a0873fdb176fa8b62edde3025400b87)
Fix bug in DSGE-VAR. Initialization sample must be strictly larger than lag order

Also provides a more informative error message
Fix bug in imcforecast.m where covariance matrix was decomposed element-wise instead of via Cholesky.

(cherry picked from commit 04554967fc49539b570b7c266b274eb433783e32)
Deal with cases where too few draws are available for posterior moments

(cherry picked from commit bf674fa59fc300f6a5ba3aaf30eecfbff2521230)
Expand manual entry for conditional forecasts

(cherry picked from commit e7727ba2d3365cf5269ab718cfbed86c82243cbe)