I have initially posted this question on
stats.stackexchange.com
, but it was closed due to being focused on programming. Hopefully, I can get any help here.
I will not put many theoretical details here to make it simple, but my final goal is to implement a Hidden Markov Model using R
.
Although I am fine with the theoretical model construction, when I tried to implement it, I realized that I do not know basic things about computational statistics. My question goes into this direction.
Let and
be random variables such that
and
, with
and
. If
denotes distribution, how can I compute
using R
?
I mean, what is the exact meaning of these distributions (one discrete and one continuous) multiplication? How can I do this using R
? The answer is obviously a function of , but how is it represented in my code?
Is there any change if is also discrete? For instance,
, with
. How it would affect the implemented code?
I know my questions are not very specific, but I am very lost on how to start. My goal with this question is understanding how I can "translate" what I have written in paper to the computer.