James-Thorson/2018_FSH556

HW 4: probability of data conditional on random effects

Closed this issue · 5 comments

I am stuck trying to figure out how to code the von Bert growth curve function with the 1D random process log⁡(l_∞ (s))~MVN(β_0+β_s s,Σ) in the probability of data conditional on random effects.
I have the jnll_comp(0) = jnll_comp(0) -= dnorm( log(L_i(i)), log(L_star_i(i)), sigma2_l, true ), where my Lstar_i = VB function.

Could you be more specific? I don't understand if your problem is specifically coding the Lstar_j from the VB function?

I'm trying to figure out how to include the log⁡(l_∞ (s))~MVN(β_0+β_s s,Σ) in the model.
Are there two jnll statements in the probability of data conditional on random effects? 1) jnll_comp(0) -= dnorm( log(L_i(i)), log(L_star_i(i)), sigma2_l, true ) and 2) jnll_comp(0) -= dnorm(log(Linf_i(i)), β_0+β_s*y_i(i), Σ, true).

There are two components in the JNLL, the first is the probability of data L_i given random effects and fixed effects, and the other is the probability of random effects Linf for each location from a 1D spatial process. So yes there are two components, but I wouldn't describe them exactly as you do above because the probability of Linf is the random eglffect distribution, not the probability of the data. Does this make sense, or still useful to discuss?

I am still a little confused on how include the probability Linf as a random effect distribution.

Could you email Jie directly for some detailed help?