Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ericward-noaa committed Aug 29, 2020
1 parent 2d3dbdd commit a45e802
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions R/fit_dfa.R
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,6 @@ fit_dfa <- function(y = y,

if(is.null(par_list)) {
pars <- c("x", "Z", "sigma", "log_lik", "psi","xstar")
} else {
if(par_list == "all") pars <- c("x", "Z", "sigma", "log_lik", "psi","xstar",
"devs","x0","z","zpos","sigma_process","p_z",
"b_obs","b_pro","phi","theta","Lcorr","ymiss","nu") # removed pred
}
if (est_correlation) pars <- c(pars, "Omega", "Sigma") # add correlation matrix
if (estimate_nu) pars <- c(pars, "nu")
Expand All @@ -352,6 +348,14 @@ fit_dfa <- function(y = y,
if(!is.null(pro_covar)) pars <- c(pars, "b_pro")
if(est_sigma_process) pars <- c(pars, "sigma_process")

if(!is.null(par_list)) {
if(par_list=="all") {
pars <- pars <- c("x", "Z", "sigma", "log_lik", "psi","xstar",
"devs","x0","z","zpos","sigma_process","p_z",
"b_obs","b_pro","phi","theta","Lcorr","ymiss","nu") # removed pred
}
}

sampling_args <- list(
object = stanmodels$dfa,
data = data_list,
Expand Down

0 comments on commit a45e802

Please sign in to comment.