[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-mcsim] R?p. : MCSim and mixture models
From: |
Bill Harris |
Subject: |
Re: [Help-mcsim] R?p. : MCSim and mixture models |
Date: |
Wed, 23 Apr 2014 20:37:51 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
"Frederic BOIS" <address@hidden> writes:
> Hi Bill,
>
> I assume that by mixture you mean "model A" with probability P(A),
> "model B" with probability P(B) etc., and in an MCMC context.
That's correct, Frederic. See section 13 of
http://mc-stan.org/manual.html for examples. Stan has a simplex type,
so you can define a vector of length k ≥ 2 and know it will sample it in
ways that ensure that the sum of its components is always 1.
> I have never done that. I would setup an indicator variable, condition
> the code on its value...
In your work, I might imagine setting up a mixture model to model
outliers and good data or perhaps even a diseased and a healthy state,
but that may never come up.
In my case, I'm modeling electrical power flow into a building as
measured, say, once per hour. I'll draw a picture of possible data with
words.
In state 1, the power is lognormally distributed around a low level.
This represents base level lighting, electronics, and the like.
In state 2, the power jumps up to a very high level and then decays
exponentially to a medium high level. This may represent an air
conditioning system turning on and drawing a lot of current at the
start and then less as the building cools to a more normal
temperature.
At some time, the air conditioning turns back off, and power declines
rather quickly to state 1 conditions. (In my case, I might often have
more than 2 states.)
I'd like to have a model that
- Captures the switching between the states.
- Accommodates the autocorrelation in the data.
- Tracks the exponential decay.
I could model the thermostat or control system that runs the air
conditioning, but it may be controlled by a clock, and I'd like to be
able to detect the timing rather than enter it by hand.
I'll try what you showed soon, I hope.
Thanks,
Bill
--
Bill Harris
Facilitated Systems
http://makingsense.facilitatedsystems.com/