Package 'bayeslongitudinal'

Title: Adjust Longitudinal Regression Models Using Bayesian Methodology
Description: Adjusts longitudinal regression models using Bayesian methodology for covariance structures of composite symmetry (SC), autoregressive ones of order 1 AR (1) and autoregressive moving average of order (1,1) ARMA (1,1).
Authors: Edwin Javier Castillo Carreño, Edilberto Cepeda Cuervo
Maintainer: Edwin Javier Castillo Carreño <[email protected]>
License: GPL (>= 2)
Version: 0.1.0
Built: 2024-11-29 08:49:16 UTC
Source: CRAN

Help Index


bloques ar 1

Description

Build a block diagonal matrix with structure AR(1)

Usage

bloques(s, r, t, n)

Arguments

s

Numerical value indicating global standard deviation of the matrix

r

Numerical value indicating correlation of individuals

t

Numerical value indicating number of times when observations are repeated

n

Numerical value indicating number of individuals

Value

A diagonal block matrix with structure AR(1)

References

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

bloques(2,.5,10,2)

bloques arma (1,1)

Description

Build a block diagonal matrix with structure ARMA(1,1)

Usage

bloques2(s, r, g, t, n)

Arguments

s

Numerical value indicating global standard deviation of the matrix

r

Numerical value indicating the first parameter rho correlation of individuals

g

Numerical value indicating the second parameter phi correlation of individuals

t

Numerical value indicating number of times when observations are repeated

n

Numerical value indicating number of individuals

Value

A diagonal block matrix with structure ARMA(1,1)

References

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

bloques2(2,.5,.8,10,2)

bloques3 compound symmetry

Description

Build a block diagonal matrix with compound symmetry structure

Usage

bloques3(s, r, t, n)

Arguments

s

Numerical value indicating global standard deviation of the matrix

r

Numerical value indicating correlation of individuals

t

Numerical value indicating number of times when observations are repeated

n

Numerical value indicating number of individuals

Value

A diagonal block matrix with compound symmetry structure

References

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

bloques3(2,.5,10,2)

Dental distance

Description

It reports the distance in millimeters from the center of the pituitary to the pteromaxillary fissure. The subjects were 16 children and 11 girls. Data were taken every two years from 8 years and ended at age 14.

Usage

Dental

Format

A data Frame with 98 rows and 5 variables:

gencode

1 for girls, 0 for boy

id

Number of the individual

distance

Distance from the center of the pituitary gland to the pterygomaxillary fissure

age

Child's age at which measurement was taken

gender

Gender of the child

Source

https://faculty.biostat.ucla.edu/robweiss/filedepot_download/87/524


mhar1

Description

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

Usage

mhar1(Data, Matriz, individuos, tiempos, betai, rhoi, beta1i, beta2i,
  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

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

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))
mhar1(Y,X,27,4,c(1,1),0.5,1,1,500,50)

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)

mhsc

Description

Run Bayesian estimation of a balanced longitudinal model with compound symmetry structure

Usage

mhsc(Data, Matriz, individuos, tiempos, betai, rhoi, beta1i, beta2i,
  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

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

iteraciones

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))
mhsc(Y,X,27,4,c(1,1),0.5,1,1,500,50)