No BSD License
Highlights from
mcmc
-
betalpr(p1,p2,alpha,beta)
BETALPR - Beta Distribution - Log Probability Ratio
-
gamlpr(g1, g2, alph, gam)
GAMLPR = Gamma Distribution - Log Probability Density Ratio
-
invwishirnd(S,d)
INVWISHIRND - Inverse Wishart Random Matrix
-
invwishlpr(IW1, IW2, S, d)
INVWISHLPR = Inverse Wishart Distribution - Log Probability Density Ratio
-
invwishpdf(IW,S,d)
INVWISHPDF = Inverse Wishart Distribution - Probability Density Function
-
invwishrnd(S,d)
INVWISHRND - Inverse Wishart Distribution - Random Matrix Value
-
ltindex(index, dim) ;
LTINDEX - Lower Triangular Index
-
ltvec(m)
LTVEC - Change a Lower-Triangular Matrix into a Vector
-
ltvec(v)
VECLT - change a vector into a lower-triangular matrix
-
mcmcgr(A,ng) ;
MCMCGR - Gelman-Rubin R statistic for convergence
-
mcmclt(A)
MCMLT - makes matrix of MCMC runs lower triangular
-
mcmcsumm(A)
MCMCSUMM - Summary Statistics
-
mcmctrace(A)
MCMCTRACE - trace plots
-
metrop ( logq, newval, oldval...
METROP - perform a Metropolis-Hastings step
-
mvnormlpr (x1, x2, mu, sigma)
MVNORMLPR - Multivariate Normal Distribution - Log Density Ratio
-
mvnormrnd (mu,sigma,n)
MVNORMRND - Multivariate Normal - Random Number Generation
-
wishirnd(Sc,n)
WISHIRND - Wishart Distribution - Random Matrix
-
wishrnd(Sc,nu)
WISHRND - Random Matrix from Wishart Distribution
-
Contents.m
-
mcmcacf.m
-
mcmcdemo.m
-
randrand.m
-
About_MCMC.html
-
index.html
-
View all files
from
mcmc
by David Shera
MCMC -- Markov Chain Monte Carlo Tools
|
| ltvec(v) |
% VECLT - change a vector into a lower-triangular matrix
% Copyright (c) 1998, Harvard University. Full copyright in the file Copyright
%
% [M] = ltvec(V)
%
% V = vector argument
%
% M = square, symmetric matrix
%
% If M is a p x p matrix, then V consists of
% [ M(:,1) ; M(2:p,2) ; M(3:p,3) ; etc. ]
%
% See also: LTVEC, LTINDEX, MCMCLT
function [m] = ltvec(v)
[ll,oo] = size(v) ;
p = floor(sqrt(2*ll)) ;
ix = 0 ;
il = p ;
m = NaN * zeros(p) ;
for ic = 1:p,
m ( (ic:p) , ic ) = v ( (ix+1:ix+il) ) ;
m ( ic, ((ic+1):p)) = m(((ic+1):p),ic)' ;
ix = ix + il ;
il = il - 1 ;
end
|
|
Contact us at files@mathworks.com