Regarding the “pars” argument in the “sampling” function in rstan, the manual states “a vector of character strings specifying parameters of interest”. My question is as follows.
Suppose I have a model with two parameters (mu and theta). mu is a vector of length equal to a million and theta is a scalar. I am only interested in the posterior samples of theta. I believe specifying pars=c(“theta”) with include=TRUE will give me the posterior samples of theta only. However, what I am not sure about is that did Stan store the samples of mu while sampling but only returned the samples of theta (and hence, required a lot of memory while sampling since mu has a million parameters) or did it never store the samples of mu (and hence, did not require a lot of memory).