4DModeller / fdmr

4DModeller, Bayesian Spatio-temporal modeling in R
https://4dmodeller.github.io/fdmr/
GNU General Public License v3.0
15 stars 10 forks source link

model builder app creates code with syntax error #205

Closed mnky9800n closed 8 months ago

mnky9800n commented 9 months ago

The model builder app creates code with a bug where there is not a closed parantheses

spde <- INLA::inla.spde2.pcmatern(
                mesh = mesh,
                prior.range = c(0.55,0.1),
                prior.sigma = c(0.05,0.2)
            )

alphaprior <- list(theta = list(
                prior = 'pccor1',
                param = c(-0.2,0.8)
            )
############### NEEDS CLOSED PARANTHESES ################

formula <- water_balance_m3 ~ 0 + Intercept(1)  +  precip  +  f(
                main = coordinates,
                model = spde,
                group = group_index,
                ngroup = n_groups,
                control.group = list(
                    model = 'ar1',
                    hyper = alphaprior)
                )

model_output <- inlabru::bru(formula,
                        data = measurement_data,
                        family = 'gaussian',
                        E = NULL,
                        control.family = NULL,
                        options = list(
                            verbose = FALSE
                        )
                    )
gareth-j commented 8 months ago

Done with #208