No BSD License
-
gpdisc(call)
This is the machine-generated representation of a MATLAB object
-
Mb=b_probg(data,m);
B_PROBIT Produces a simulated sample from a probit regression model
-
[Mb,accept]=breg_bay(data,m,l...
B_LOGIT Produces a simulated sample from a logistic regression model
-
[Mbeta,Ms2,stds,sample]=logit...
fit of random effects model for conduct example of Chapter 3
-
[Zij,Z,S,Cats,B,Sr,accept]=sa...
sampleReg returns a sample from the posterior on the
-
[av,gv,th_m,th_s,ath,aag]=l_i...
item_r - fits a 2-parameter logistic item response model of the form
-
[av,gv,th_m,th_s,av_m,av_s2]=...
item_r_h - fits a 2-parameter probit item response model of the form
-
[av,gv,th_m,th_s]=item_r(y,s_...
item_r - fits a 2-parameter probit item response model of the form
-
[beta,s]=bay_reg(y,X,num)
% BAY_REG Simulated sample from the posterior for a normal regression model.
-
[beta,var,fp,dev_df,pr,dr,adr...
MLE Finds maximum likelihood estimates for a binary regression model
-
[beta,var,lint]=cmp(data,mKx)
CMP Computation of posterior mode and log integral using Laplace method.
-
[bf,post1,post2]=mod_crit(mod...
% MOD_CRIT Model criticism for discrete models.
-
[bv,th_m,th_s]=item_r1(y,s_b,...
item_r - fits a 1-parameter probit item response model of the form
-
[lint2,mom,x,y1,f]=ad_quad2(l...
AD_QUAD2 Summarizes a two-parameter posterior by adaptive quadrature.
-
[log_scores,sz]=llatent(Mb,da...
LLATENT logistic scores plot for latent residuals in logistic
-
[m_sim,s_sim]=m_cont(data,num)
% M_CONT Simulated sample from the posterior for normal data, vague prior.
-
[mode,var,log_int]=laplace(lo...
LAPLACE summarizes a posterior density by the Laplace method
-
[p,mids]=irtobs(data,th_m,bin...
% irtobs - computes observed proportion of correct
-
[p1,p2,prior]=pp_prior(dat,ty...
% PP_PRIOR Construction of prior for two proportions using discrete models.
-
[p1,p2]=pp_exch(t,data,num)
% PP_EXCH Posterior distribution for two proportions using an exchangeable prior.
-
[post,diff_dist]=pp_disc(p1,p...
% PP_DISC Posterior distribution for two proportions using discrete models.
-
[pr,lo,hi]=irtpost(av,gv,th)
% irtpost - computes 5th, 50th, 95th percentiles of
-
[set,eprob]=disc_int(dist,pro...
% DISC_INT Computes a highest probability interval for a discrete distribution.
-
[spost,mom,x,f]=ad_quad1(logp...
AD_QUAD1 Summarizes a one-parameter posterior by adaptive quadrature.
-
[summ_fitted,summ_resid]=lfit...
LFITTED Summarizes posterior distribution for fitted probabilities
-
[v_th,arate]=metrop(logpost,t...
METROP - simulates from a 1-parameter posterior using Metropolis algorithm
-
bf=c_table(y,a)
% C_TABLE Bayes factor for testing independence in a contingency table.
-
d1=plotfit(g,b,cov)
-
fitted=lfitted2(Mb,cov,link)
LFITTED2 Posterior distribution for fitted probabilities for logistic model.
-
norm_plot(data)
Computes the standard normal quantile function of the vector x, 0
-
ordinalMLE(data,K,link)
ordinalMLE computes the MLE for ordinal regression of N on X.
-
par=beta_sel(r,rplus)
% BETA_SEL Selecting a beta prior using predictive statements.
-
par=normal_s(perc1,perc2)
% NORMAL_S Finds normal distribution which matches two percentiles.
-
plotfitted(covariate,fitmatri...
PLOTFITTED - produces errorbar plot of many distributions
-
post=bayes(prior,like,data)
% BAYES Bayes' rule for a independent sequence of outcomes.
-
post=m_disc(m,prior,data)
% M_DISC Posterior distribution for a normal mean with discrete models.
-
post=mod_cont(model,llike_fcn...
% MOD_CONT Posterior distribution for continuous models.
-
post=mod_disc(model,prior,lli...
% MOD_DISC Posterior distribution for discrete models.
-
post=p_disc(p,prior,data)
% P_DISC Posterior distribution for a proportion with discrete models.
-
post=p_hist_p(mids,probs,data...
% P_HIST_P Posterior distribution for a proportion using a histogram prior.
-
pred=p_beta_p(ab,n,s)
% P_BETA_P Predictive distribution of number of successes in future binomial
-
pred=p_disc_p(p,probs,n,s)
% P_DISC_P Predictive distribution of number of successes in future binomial
-
quan=o_post_pred(data,k,sampl...
Phi computes the standard normal distribution function value at x
-
roc(N,D,TmT,sampSize,alpha,la...
roc returns a sample from the posterior on the
-
sample=post_pred(Mb,data)
POSTPRED Posterior predictive distribution of standard deviation(y*)
-
sampleMulti(N,sampSize,alpha,...
sampleOrdProb returns a sample from the posterior on the
-
sampleOrdInform(N,X,mle,sampS...
sampleOrdInform, patterned after sampleOrdProb,
-
sampleOrdProb(data,K,mle,samp...
sampleOrdProb returns a sample from the posterior on the
-
summaries=plotpost(Mb,plotsum...
PLOTPOSTS Summarizes posterior distribution for multivariate simulated sample
-
v_th=gibbs(logpost,th_0,m,sca...
GIBBS- simulates from a posterior using Gibbs sampling
-
val=logpost1(T,data)
-
val=logpost2(xy,data)
-
val=logpost2(xy,data)
-
val=logpost3(xy,data)
-
val=phi(x)
-
val=rbeta(alpha,beta,n)
rbeta(alpha,beta,n) generates a vector of n Beta(alpha,beta) variates
-
values=m_norm_t(m0,prob,t,dat...
% M_NORM_T Performs a test that a normal mean is equal to a specific value.
-
values=p_beta_t(p0,prob,ab,da...
% P_BETA_T Performs a test that a proportion is equal to a specific value.
-
values=pp_bet_t(prob,parH,par...
% PP_BET_T Test of the equality of two proportions using beta priors.
-
y=ir_curve(theta,a,g)
-
Contents.m
-
contents.m
-
contents.m
-
contents.m
-
contents.m
-
data_analysis.m
-
example.m
-
example1.m
-
example1.m
-
example1.m
-
example1.m
-
example1.m
-
example1.m
-
example1.m
-
example1.m
-
example1.m
-
example1.m
-
example1.m
-
example2.m
-
example2.m
-
example2.m
-
example2.m
-
example2.m
-
example2.m
-
example2.m
-
example2.m
-
example2.m
-
example2.m
-
example2.m
-
example3.m
-
example3.m
-
example3.m
-
example3.m
-
example3.m
-
example4.m
-
example4.m
-
example4.m
-
example4.m
-
example5.m
-
example5.m
-
example6.m
-
example7.m
-
View all files
|
|
| example4.m |
% EXAMPLE4.M
% --------------------------------------------------------
% Learning about discrete models
% Model criticism - comparing priors [Albert (1996), p. 166]
% --------------------------------------------------------
%
% Suppose that a new baseball player is evaluated. Let p
% denote his true batting average. The manager believes that
% p = .2, .22, ..., .34 and assigns probabilities to these values.
% A scout places a different prior distribution on these same set
% of values. The player gets 10 hits and 20 outs in his first 30
% at-bats. Wish to update the probabilities for both the manager
% and the scout and assess which prior is more consistent with the data.
p=.2:.02:.34; % grid of proportion values
prior1=[.05 .05 .10 .25 .25 .15 .10 .05]; % prior probs of manager
prior2=[.20 .20 .20 .15 .10 .05 .05 .05]; % post probs of manager
data=[10 20]; % observed # of successes and failures
[bf,post1,post2]=mod_crit(p,prior1,prior2,'binom',data);
% post1 is vector of posterior probs for first prior
% post2 is vector of posterior probs for second prior
% bf is Bayes factor in support of first prior
|
|
Contact us at files@mathworks.com