mharma11 {bayeslongitudinal}R Documentation

mharma11

Description

Run Bayesian estimation of a balanced longitudinal model with ARMA(1) structure

Usage

mharma11(Data, Matriz, individuos, tiempos, betai, rhoi, gammai, beta1i, beta2i,
  beta1j, beta2j, iteraciones, burn)

Arguments

Data

A vector with the observations of the response variable

Matriz

The model design matrix

individuos

A numerical value indicating the number of individuals in the study

tiempos

A numerical value indicating the number of times observations were repeated

betai

A vector with the initial values of the vector of regressors

rhoi

A numerical value with the initial value of the correlation for rho

gammai

A numerical value with the initial value of the correlation for phi

beta1i

A numerical value with the shape parameter of a beta apriori distribution of rho

beta2i

A numerical value with the scaling parameter of a beta apriori distribution of rho

beta1j

A numerical value with the shape parameter of a beta apriori distribution of phi

beta2j

A numerical value with the scaling parameter of a beta apriori distribution of phi

iteraciones

A numerical value with the number of iterations that will be applied the algorithm MCMC

burn

Number of iterations that are discarded from the chain

Value

A dataframe with the mean, median and standard deviation of each parameter, A graph with the histograms and chains for the parameters that make up the variance matrix, as well as the selection criteria AIC, BIC and DIC

References

Gamerman, D. 1997. Sampling from the posterior distribution in generalized linear mixed models. Statistics and Computing, 7, 57-68

Cepeda, C and Gamerman, D. 2004. Bayesian modeling of joint regressions for the mean and covariance matrix. Biometrical journal, 46, 430-440.

Cepeda, C and Nuñez, A. 2007. Bayesian joint modelling of the mean and covariance structures for normal longitudinal data. SORT. 31, 181-200.

Nuñez A. and Zimmerman D. 2001. Modelación de datos longitudinales con estructuras de covarianza no estacionarias: Modelo de coeficientes aleatorios frente a modelos alternativos. Questio. 2001. 25.

Examples

attach(Dental)
Y=as.vector(distance)
X=as.matrix(cbind(1,age))
mharma11(Y,X,27,4,c(1,1),0.5,0.5,1,1,1,1,500,50)

[Package bayeslongitudinal version 0.1.0 Index]