统计建模和计算|MATH3821 Statistical Modelling and Computing

联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981

Introduction to flexible and modern approaches to statistical modelling and statistical computing. Theory, applications and computation for linear models, generalised linear models, the Bayesian linear model, nonparametric regression using kernel smoothers and smoothing splines, nonparametric density estimation and bandwidth selection. Applications of simulation in statistical inference including Monte Carlo simulation, bootstrap methods, and Markov chain Monte Carlo. Statistical packages include R or Splus.

这是一份unsw新南威尔士大学MATH3821 的成功案例

统计建模和计算|MATH3821 Statistical Modelling and Computing
问题 1.

where rho rho is an unknown correlation parameter, y, ey, e and uu are column vectors of length nn and XX is of dimension n times pn times p with rows left[x_{i 1}, x_{i 2}, ldots, x_{i p} right] left[x_{i 1}, x_{i 2}, ldots, x_{i p} right], with x_{i 1}=1x_{i 1}=1. Here, uu denotes spatially unstructured errors, which are typically taken as homoscedastic u_{i} sim N left(0, sigma^{2} right)u_{i} sim N left(0, sigma^{2} right). Defining Q=I- rho WQ=I- rho W, the precision matrix Sigma^{-1} Sigma^{-1} of ee in (9.1) is Sigma^{-1}= tau Q^{ prime} Q, Sigma^{-1}= tau Q^{ prime} Q, where tau=1 / sigma^{2} tau=1 / sigma^{2} (Richardson et al., 1992). If interactions c_{i j}c_{i j} are scaled within rows then the maximum possible value for rho rho is 1 (Anselin, 2001; Bailey and Gattrell, 1995, Chapter 7), and the minimum is the smallest eigenvalue of WW, which is greater than -1-1 but less than 0 . Since spatial correlation is typically positive, a prior on rho rho constrained to [0,1][0,1] is feasible in many applications.

证明 .

One may also have a SIM, with spatial lags in the outcomes themselves (e.g. Anselin, 2001; Ord, 1975), y= rho W y+X beta+u, y= rho W y+X beta+u, where uu is white noise. Spatial dependence in both response and regression errors may occur in the same model (e.g. Anselin, 1988a), for example begin{aligned} &y= rho_{1} W y+X beta+e &e= rho_{2} W e+u end{aligned} begin{aligned} &y= rho_{1} W y+X beta+e &e= rho_{2} W e+u end{aligned} It may be noted that the spatial error model (9.1) may be expressed as y- rho W y=X beta- rho W X beta+u, y- rho W y=X beta- rho W X beta+u, namely as a regression with unstructured errors of the spatially filtered response $y^{}=y- rho W^{2} on filtered predictors on filtered predictors X^{}=X- rho W X$.

Lesage (1997, 2000) discusses Markov Chain Monte Carlo (MCMC) estimation of spatial models autoregressive in ee or in yy, as in (9.1) and (9.2), respectively. For example, assuming a flat prior p left( rho, beta, sigma^{2} right) propto 1 / sigmap left( rho, beta, sigma^{2} right) propto 1 / sigma, the joint posterior for the SIM has the form p left( rho, beta, sigma^{2} mid y right) propto|Q| sigma^{-(n+1)} exp left[- frac{1}{2 sigma^{2}} left(e^{ prime} e right) right] p left( rho, beta, sigma^{2} mid y right) propto|Q| sigma^{-(n+1)} exp left[- frac{1}{2 sigma^{2}} left(e^{ prime} e right) right] where e=y- rho W y-X beta=Q y-X betae=y- rho W y-X beta=Q y-X beta. For the spatial errors model the joint posterior is p left( rho, beta, sigma^{2} mid y right) propto|Q| sigma^{-(n+1)} exp left[- frac{1}{2 sigma^{2}} left(u^{ prime} u right) right] p left( rho, beta, sigma^{2} mid y right) propto|Q| sigma^{-(n+1)} exp left[- frac{1}{2 sigma^{2}} left(u^{ prime} u right) right] where u=Q(y-X beta)u=Q(y-X beta). Either model implies a non-standard conditional for rho rho, namely begin{array}{ll} p left( rho mid beta, sigma^{2}, y right) propto|Q| exp left[- frac{1}{2 sigma^{2}} left(e^{ prime} e right) right] & ( mathrm{SIM}) p left( rho mid beta, sigma^{2}, y right) propto|Q| exp left[- frac{1}{2 sigma^{2}} left(u^{ prime} u right) right] & ( text { SAR) } end{array} begin{array}{ll} p left( rho mid beta, sigma^{2}, y right) propto|Q| exp left[- frac{1}{2 sigma^{2}} left(e^{ prime} e right) right] & ( mathrm{SIM}) p left( rho mid beta, sigma^{2}, y right) propto|Q| exp left[- frac{1}{2 sigma^{2}} left(u^{ prime} u right) right] & ( text { SAR) } end{array} whereas, for rho rho given, the full conditionals for sigma^{2} sigma^{2} and beta beta are as in the normal linear regression model. The full conditional for beta beta has mean beta_{ mu}= left(X^{ prime} X right)^{-1} left(X^{ prime} Q y right) beta_{ mu}= left(X^{ prime} X right)^{-1} left(X^{ prime} Q y right) in the SIM and beta_{ mu}= left(X^{ prime} Q^{ prime} Q X right)^{-1} left(X Q^{ prime} Q y right) beta_{ mu}= left(X^{ prime} Q^{ prime} Q X right)^{-1} left(X Q^{ prime} Q y right) in the spatial errors model, and covariance matrices sigma^{2} left(X^{ prime} X right)^{-1} sigma^{2} left(X^{ prime} X right)^{-1} and sigma^{2} left(X^{ prime} Q^{ prime} Q X right)^{-1} sigma^{2} left(X^{ prime} Q^{ prime} Q X right)^{-1} in-the NN ill mathrm{O} mathrm{O} WS SIM and SAR models, respectively.

问题 2.

y_{i} sim operatorname{Po} left(E_{i} mu_{i} right) text {, } y_{i} sim operatorname{Po} left(E_{i} mu_{i} right) text {, } where mu_{i} mu_{i} is the relative risk of mortality in area ii. For relatively rare events Poisson sampling may be justified by considering binomial sampling of deaths by age jj in relation to populations by age P_{i j}P_{i j} with death rates pi_{i j} pi_{i j}, and by assuming that relative risks and age rates are proportional, namely pi_{i j}= mu_{i} pi_{j} pi_{i j}= mu_{i} pi_{j} (Wakefield et al., 2000). Then the spatial convolution model of

证明 .

Besag et al. (1991)(1991) has the form log left( mu_{i} right)= beta_{1}+ beta_{2} x_{i 2}+ cdots+ beta_{p} x_{i p}+s_{i}+u_{i}, log left( mu_{i} right)= beta_{1}+ beta_{2} x_{i 2}+ cdots+ beta_{p} x_{i p}+s_{i}+u_{i}, where s_{i}s_{i} are spatially structured effects and u_{i}u_{i} are spatially unstructured with possible prior, u_{i} sim N(0, lambda)u_{i} sim N(0, lambda), where lambda lambda is itself assigned an inverse gamma prior. Other options for uu might be a discrete mixture of normal densities or a single normal but with non-constant variances lambda_{i} lambda_{i} (Lesage, 1999).

One possible joint density for the spatial effects s= left(s_{1}, ldots, s_{n} right)s= left(s_{1}, ldots, s_{n} right) is in terms of pairwise differences in errors (Banerjee et al., 2004, p. 80 ) and a variance term kappa kappa P left(s_{1}, ldots, s_{n} right) propto exp left[-0.5 kappa^{-1} sum_{i sim j} c_{i j} left(s_{i}-s_{j} right)^{2} right] P left(s_{1}, ldots, s_{n} right) propto exp left[-0.5 kappa^{-1} sum_{i sim j} c_{i j} left(s_{i}-s_{j} right)^{2} right] or equivalently (Gelfand and Vounatsou, 2003, p. 15) P left(s_{1}, ldots, s_{n} right) propto exp left[-0.5 kappa^{-1} s^{ prime}(D-C) s right], P left(s_{1}, ldots, s_{n} right) propto exp left[-0.5 kappa^{-1} s^{ prime}(D-C) s right], where C= left[c_{i j} right]C= left[c_{i j} right] is a spatial interaction matrix and DD is diagonal with (i, i)(i, i) th element c_{i+}= sum_{j} c_{i j}c_{i+}= sum_{j} c_{i j} This joint density implies a normal conditional prior for s_{i}s_{i} conditioning on the effects s_{j}s_{j} in remaining areas j neq ij neq i. Letting such effects be denoted by s_{[i]}s_{[i]}, one has P left(s_{i} mid s_{[i]}, kappa right) sim N left( omega_{i}, tau_{i}^{-1} right), P left(s_{i} mid s_{[i]}, kappa right) sim N left( omega_{i}, tau_{i}^{-1} right), where omega_{i} omega_{i} is the weighted average omega_{i}= frac{ sum_{j} c_{i j} s_{j}}{ sum_{j} c_{i j}}= sum_{j} w_{i j} s_{j} omega_{i}= frac{ sum_{j} c_{i j} s_{j}}{ sum_{j} c_{i j}}= sum_{j} w_{i j} s_{j} and tau_{i}^{-1}= frac{ kappa}{ sum_{j} c_{i j}} tau_{i}^{-1}= frac{ kappa}{ sum_{j} c_{i j}} are conditional variances. This is known as the intrinsic CAR (ICAR) prior and in contrast to (9.5) has a mean omega_{i} omega_{i} involving row-standardised weights.

Other pairwise difference priors are possible. Besag et al. (1991) mention a double exponential (Laplace) prior P left(s_{1}, ldots, s_{n} right) propto psi exp left[-0.5 psi sum_{i

发表回复