diff --git a/inst/include/distributions/functors/lognormal_lpdf.hpp b/inst/include/distributions/functors/lognormal_lpdf.hpp index f845af39..46fbce65 100644 --- a/inst/include/distributions/functors/lognormal_lpdf.hpp +++ b/inst/include/distributions/functors/lognormal_lpdf.hpp @@ -88,13 +88,13 @@ namespace fims_distributions if(this->input_type == "data"){ if(this->observed_values->at(i) != this->observed_values->na_value){ // this->lpdf_vec[i] = this->keep[i] * -dnorm(log(this->observed_values->at(i)), logmu[i], logsd[i], true) - log(this->observed_values->->at(i)); - this->lpdf_vec[i] = fims_math::dnorm(log(this->observed_values->at(i)), logmu[i], logsd[i], true) - log(this->observed_values->at(i)); + this->lpdf_vec[i] = dnorm(log(this->observed_values->at(i)), logmu[i], logsd[i], true) - log(this->observed_values->at(i)); } else { this->lpdf_vec[i] = 0; MODEL_LOG << "lpdf_vec for obs " << i << " is: " << this->lpdf_vec[i] <lpdf_vec[i] = fims_math::dnorm(log(this->x[i]), logmu[i], logsd[i], true); + this->lpdf_vec[i] = dnorm(log(this->x[i]), logmu[i], logsd[i], true); } lpdf += this->lpdf_vec[i]; diff --git a/inst/include/distributions/functors/multinomial_lpmf.hpp b/inst/include/distributions/functors/multinomial_lpmf.hpp index a380ec13..be44505c 100644 --- a/inst/include/distributions/functors/multinomial_lpmf.hpp +++ b/inst/include/distributions/functors/multinomial_lpmf.hpp @@ -88,7 +88,7 @@ namespace fims_distributions } } - this->lpdf_vec[i] = fims_math::dmultinom(x_vector, prob_vector, true); + this->lpdf_vec[i] = dmultinom((vector)x_vector, (vector) prob_vector, true); lpdf += this->lpdf_vec[i]; /* if (this->simulate_flag) diff --git a/inst/include/distributions/functors/normal_lpdf.hpp b/inst/include/distributions/functors/normal_lpdf.hpp index 60aef4c2..317d22ef 100644 --- a/inst/include/distributions/functors/normal_lpdf.hpp +++ b/inst/include/distributions/functors/normal_lpdf.hpp @@ -83,7 +83,7 @@ struct NormalLPDF : public DensityComponentBase { if(this->input_type == "data"){ if(this->observed_values->at(i) != this->observed_values->na_value){ // this->lpdf_vec[i] = this->keep[i] * -dnorm(this->observed_values->at(i), mu[i], sd[i], true); - this->lpdf_vec[i] = fims_math::dnorm(this->observed_values->at(i), mu[i], sd[i], true); + this->lpdf_vec[i] = dnorm(this->observed_values->at(i), mu[i], sd[i], true); DISTRIBUTIONS_LOG << "obsered_values " << i << " is: " << this->observed_values->at(i) << std::endl; DISTRIBUTIONS_LOG << "mu " << i << " is: " << mu[i] << std::endl; DISTRIBUTIONS_LOG << "sd " << i << " is: " << sd[i] << std::endl; @@ -93,7 +93,7 @@ struct NormalLPDF : public DensityComponentBase { } } else { - this->lpdf_vec[i] = fims_math::dnorm(this->x[i], mu[i], sd[i], true); + this->lpdf_vec[i] = dnorm(this->x[i], mu[i], sd[i], true); DISTRIBUTIONS_LOG << "x " << i << " is: " << this->x[i] << std::endl; DISTRIBUTIONS_LOG << "mu " << i << " is: " << mu[i] << std::endl; DISTRIBUTIONS_LOG << "sd " << i << " is: " << sd[i] << std::endl;