> On Jul 18, 2015, at 2:58 PM, UD1989 <
upasa...@gmail.com> wrote:
>
> Hi All
>
> I'm modeling a housing sales dataset with 3 grouped predictors and 3 individual predictors. One of the indivdual predictors is the 'last sales average value of this group' to capture the time trend in the series (there could be more than one transactions on a given date hence the average) The data is sparse as far as the time series is concerned- i.e. sales may occur months or even years apart. I'm using the fixed parameter mode and generated quantities module to generate esimations for new data, but can't figure out how to predict ahead in time since the periods aren't fixed for every group. For example, group A might have had the last transactions in January 15; predicting one period ahead by taking the last period sales would generate an estimate for February, not one period ahead of current date i.e. August. Can anyone suggest how to handle this ?
You can just keep predicting ahead from wherever your last observation
is. Presumably the latent parameters in the time series are something
like baseline prices or something.
Or you could generalize and use something like a Gaussian process, where
you don't necessarily need exact spacing.
> On a separate note, I am trying to use the estimates to be exposed via a Shiny App. The Stan code (in fixed param mode and without a model) takes about 30 seconds to generate the estimates which is quite fast but not fast for a user-facing application. I suppose the latency is due to the connection between R and STAN as discussed in some threads i read in this forum, but is there any way I could improve the performance?
It would help to see how you're running it. If you precompile the
model first and it still takes 30 seconds and you're just using RNGs,
you're probably generating too many samples. How high an n_eff do you need?
There's no latency in the connection between R and Stan per se,
just that it can take a long time to load big list data structures
into R no matter where they come from.
It always helps to send us more rather than less as it's hard to guess
what people might be doing.
- Bob