资源预览内容
第1页 / 共9页
第2页 / 共9页
第3页 / 共9页
第4页 / 共9页
第5页 / 共9页
第6页 / 共9页
第7页 / 共9页
第8页 / 共9页
第9页 / 共9页
亲,该文档总共9页全部预览完了,如果喜欢就下载吧!
资源描述
Appendix I DistributionsContents topDiscrete Univariate BernoulliBinomialCategoricalNegative BinomialPoissonNon-central HypergeometricContinuous Univariate BetaChi-squaredDouble ExponentialExponentialFlatGammaGeneralized Extreme ValueGeneralized FGeneralized GammaGeneralized ParetoGeneric LogLikelihood DistributionLog-normalLogisticNormalParetoStudent-tUniformWeibullDiscrete Multivariate MultinomialContinuous Multivariate DirichletMultivariate NormalMultivariate Student-t WishartDiscrete Univariatetoptop appendix iBernoullir dbern(p) Binomialr dbin(p, n) Categoricalr dcat(p) Negative Binomialx dnegbin(p, r) Poissonr dpois(lambda) Non-central Hypergeometricx dhyper(n, m, N, psi)Continuous Univariatetoptop appendix iBetap dbeta(a, b) Chi-squaredx dchisqr(k) Double Exponentialx ddexp(mu, tau) Exponentialx dexp(lambda) Flatx dflat()constant value for all x; not a proper distributionGammax dgamma(r, mu) Generalized Extreme Value x dgev(mu,sigma,eta) Generalized Fx df(n,m,mu,tau)Reduces to the standard F for mu=0, tau=1.Generalized Gammax dggamma(r, mu, beta) Generalized Paretox dgpar(mu,sigma,eta) GenericLogLikelihood distributionx dloglik(lambda) exp(lambda); NB does not depend on x. See Generic sampling distributions.Log-normalx dlnorm(mu, tau) Logisticx dlogis(mu, tau) Normalx dnorm(mu, tau) Paretox dpar(alpha, c) Student-tx dt(mu, tau, k) Uniformx dunif(a, b) Weibullx dweib(v, lambda) Discrete Multivariatetoptop appendix iMultinomialx dmulti(p, N) Continuous Multivariatetoptop appendix iDirichletp ddirich(alpha) May also be speltddirchas in WinBUGS.Multivariate Normalx dmnorm(mu, T,) Multivariate Student-tx dmt(mu, T, k) Wishartx, dwish(R, k) Appendix II Functions and FunctionalsFunction arguments represented by e can be expressions, those by s must be scalar-valued nodes in the graph and those represented by v must be vector-valued nodes in a graph. Some function arguments must be stochastic nodes. Functionals are described using a similar notation to functions, the special notation F(x) is used to describe the function on which the functional acts. See example Functionals for details. Systems of ordinary differential equations and their solution can be described in the BUGS language by using the special D(x1:n, t) notation. See example ode for details. Scalar functions topabs(e) absolute value of e, |e|arccos(e) inverse cosine of earccosh(e) inverse hyperbolic cosine of earcsin(e) inverse sine of earcsinh(e) inverse hyperbolic sine of earctan(e) inverse tangent of earctanh(e) inverse hyperbolic tangent of ecloglog(e) complementary log log of e, ln(-ln(1 - e)cos(e) cosine of ecosh(e) hyperbolic cosine of ecumulative(s1, s2) tail area of distribution of s1 up to the value of s2, s1 must be stochastic, s1 and s2 can be the same ?cut(e) cuts edges in the graph - see Use of the cut functiondensity(s1, s2) density of distribution of s1 at value of s2, s1 must bea stochastic node supplied as data, s1 and s2 can be the same.deviance(s1, s2) deviance of distribution of s1 at value of s2, s1 must bea stochastic node supplied as data, s1 and s2 can be the same.equals(e1, e2) 1 if value of e1 equals value of e2; 0 otherwiseexp(e) exp(e)gammap(s1, s2) partial (incomplete) gamma function, value of standardgamma density with parameter s1 integrated up to s2ilogit(e) exp(e)/ (1 + exp(e)icloglog(e) 1 - exp( - exp(e)integral(F(s), s1, s2, s3)definite integral of function F(s) between s = s1 and s = s2to accuracy s3log(e) natural logarithm of elogfact(e) ln(e!)loggam(e) logarithm of gamma function of elogit(e) ln(e/ (1 - e)max(e1, e2) e1 if e1 e2; e2 otherwisemin(e1, e2) e1 if e1 = 0; 0 otherwisetan(e) tangent of etanh(e) hyperbolic tangent of etrunc(e) greatest integer less than or equal to eVector functions topinprod(v1, v2)inner product of v1 and v2,iv1iv2iinterp.lin(e, v1, v2)v2p + (v2p+1 - v2p) * (e - v1p) / (v1p+1 - v1p)where the elements of v1 are in ascending orderand p is such that v1p e v1p+1.Given function values in the vector v2 evaluated at the points in v1, this estimates the function value at a new point e by simplelinear interpolation using the closest bounding pair of points.For example, given the population in 1991,2001 and 2011, wemight want to estimate the population in 2004.inverse(v) inverse of symmetric positive-definite matrix vlogdet(v) log of determinant of v for symmetric positive-definite vmean(v) ivi / nn = dim(v)eigen.vals(v) eigenvalues of matrix vode(v1, v2, D(v3, s1), s2, s3)solution of system of ordinary differential equations at gridof points v2 given initial values v1 at time s2 solvedto accuracy s3. v3 is a vector of components of the systemof ode and s1 is the time variable. See the PDF files in the Diff/Docudirectory of the OpenBUGS installation forfurther details.prod(v) ivip.valueM(v)v must be a multivariate stochastic n
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号