I am running an (Markov Chain Monte Carlo) MCMC in Julia where one of the steps requires that I simulate from a Truncated Multivariate Normal Distribution(TMvN).
Right now, I call the package TruncatedNormal from R using RCall.
The Distributions package in Julia offers the Truncated options but only seems to work for ivariate distributions.
Is there a native Julia package I can use to directly simulate from a TMvN?
Related
I am new to Julia and i estimated some multilevel regressions using Mixed Models. Everything worked perfectly fine but i would like to estimate the marginal means or marginal effects. In R there are two packages that i am aware of for that regard: emmeans and ggeffects. Are there similar packages in Julia?
In Julia, there is now Effects.jl, which uses the same technique as the effects package in R (which is what ggeffects uses for its computation).
Since your question is tagged mixed-models, you might also consider JellyMe4 which adds support for lme4/MixedModels to RCall.
Don't believe there is a good package for this at the moment, though you could use RCall.jl and process your data there. Or, if you don't mind doing it manually - you could possibly calculate it from the predict() method from GLM.jl
I'd like to simulate a\ periodic ARMA(1,1) using R. I found the R package perARMA but I don't understand how to use it.
There is the function makeparma that permit to simulated the parma(1,1). But I don't understand the input parameters and the model used to simulate the periodic stuff.
This is the source code provided by the package trying to simulate a parma(2,1):
T=12
nlen=480
p=1
a=matrix(0,T,p)
q=1
b=matrix(0,T,q)
a[1,1]=.8
a[2,1]=.3
phia<-ab2phth(a)
phi0=phia$phi
phi0=as.matrix(phi0)
b[1,1]=-.7
b[2,1]=-.6
thetab<-ab2phth(b)
theta0=thetab$phi
theta0=as.matrix(theta0)
del0=matrix(1,T,1)
PARMA21<-makeparma(nlen,phi0,theta0,del0)
parma<-PARMA21$y
I don't understand why we should specify two beta value. And why del0 is a matrix.
I solved using the R package sarima and for the simulation I used the function prepareSimSarima
I am working in R, and using the nnet package to train a neural network model. I have been experimenting with the nnetpredint package to compute prediction intervals around the model output. How can I modify the nnetpredint package so that it can handle a linear transfer function at the output node, i.e., when I use the linout=T parameter in the nnet() function?
According to the STAN homepage, STAN is capable of penalized maximum likelihood (BFGS) optimization. I am using R package rstan but I haven't found any way how to use this method. I tried to look at the ?stan help for the stan() function, but the only available options algorithms are "NUTS" and "HMC".
I am using rstan version 2.5.0.
You want to look at help(optimizing, package = "rstan"), i.e. the optimizing() function in the RStan package.
Has anyone tried using package dlmodeler which seems to provide an equivalent of PROC UCM (SAS). Using structTS function is equal to running univariate PROC UCM. Can anyone tell me how to do a multivariate analysis using the same.
Built a package which runs unobserved components model in R which depends on the KFAS package.
The package is available on github.