Description Usage Arguments Examples
timixCovRho function is a mixed model function to solve synchronized time sereis when omega = 0. The effects of serial correlation is treated as the random effects. The variance-covariance matrix of random effects are prescribed by the parameter rho. timixCovRho function estimate the parameter through oprimization.
1 | timixCovRho(dat, y, f, r, grp, grid = T, trace = F)
|
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 |
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)
res <- timixCovRho(dat, y = 1, f = 2:4, r = 2:4, grp = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.