%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create fake Poisson data, first w/o random effects
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rand('state',37); % set arbitrary seed for uniform draws
randn('state',37); % set arbitrary seed for normal draws
% this appears to also hold Poisson draws constant across runs
n=1000;
X=[ones(n,1) -1.4+randn(n,1) 0.5+0.6*randn(n,1)];
bet=[1.2 0.4 0.8]';
lam=exp(X*bet);
y=poissrnd(lam);
save c:\klaus\AAEC6564\mlab\worksp\Poisson_data X y bet;