Are you running this from master? Last time I made some change of sample_ppc_w which should make working with theano.shared observed a bit easier. But currently sample_ppc_w is still not as flexible as sample_ppc: for example it doesnt work with multiple observed variables.