timix: Mixed model for the synchronized time sereis with given...

Description Usage Arguments Examples

View source: R/timix.R

Description

timix function is a mix model function to solve synchronized time sereis. The effects of synchronization and serial correlation are treated as the random effects. The variance-covariance matrix of random effects are prescribed by the parameters rho and omega.

Usage

1
timix(rho, omega, dat, y, f, r, grp, ftest = F)

Arguments

rho

parameter for serial correlation

omega

parameter for synchronization

dat

data for the analysis

y

column number of the dependent variable

f

column number of the fixed effects

r

column number of the random effects

grp

column number of the group

Examples

1
2
3
4
5
6
7
8
9
n_time <- 50
n_grp <- 5
y <- simuOneCol(n_time, n_grp, rho = 0.5, omega = 0.5, mean = 0)
x0 <- rep(1, n_time * n_grp) # Intercept
x1 <- simuOneCol(n_time, n_grp, rho = 0.5, omega = 1, mean = 0)
x2 <- simuOneCol(n_time, n_grp, rho = 0.5, omega = 0, mean = 0)
area <- makeGrp(n_time, n_grp)
dat <- data.frame(y, x0, x1, x2, area)
timix(rho = 0.5, omega = 0.5, dat, y = 1, f = 2:4, r = 2:4, grp = 5)

ShojiTaniguchi/timsync documentation built on Oct. 10, 2020, 3:33 p.m.