From: Reid Landes <rdlandes_at_gmail.com>

Date: Fri, 8 Feb 2008 09:39:42 -0600

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 08 Feb 2008 - 15:45:50 GMT

Date: Fri, 8 Feb 2008 09:39:42 -0600

Dear All:

I am trying to fit a special case of a 2-banded Toeplitz correlation structure. A 2-banded Toeplitz has ones on the diagonal, a correlation, RHO1, on the first off-diagonal, and a correlation, RHO2, on the second off-diagonal, with zeros on all subsequent off-diagonals. After reading relevant sections in Mixed-Effects Models in S and S-PLUS (Pinheiro & Bates, 2000) and searching on the R-help archives, I've figured out how to get the 2-banded Toeplitz, but not the desired special case.

In the example below, the initial value RHO1 = 0 and RHO2= -0.3. The output matrix below is an example of the special case I'd like to fit -- a 2-banded Toeplitz constraining RHO1=0.

Fitting the 2-banded Toeplitz structure to the ``Orthodont'' example dataset provided in R-Help, we estimate RHO1 also (since the example matrix below contains INITIAL values).

---------------------Start R-code & output -------------------------------

#This intilizes a 2-banded Toeplitz structure cs1ARMA <- corARMA(value = c(0,-.3), form = ~ 1 | Subject, p = 2, q = 0) cs1ARMA <- Initialize(cs1ARMA, data = Orthodont) corMatrix(cs1ARMA)$M01

[,1] [,2] [,3] [,4]

[1,] 1.0 0.0 -0.3 0.0 [2,] 0.0 1.0 0.0 -0.3 [3,] -0.3 0.0 1.0 0.0 [4,] 0.0 -0.3 0.0 1.0

> TOEP2 <- gls(distance ~ Sex * I(age - 11), Orthodont,

+ correlation = corARMA(value = c(0,-.3), form = ~ 1 | Subject, p = 2, q = 0), + weights = varIdent(form = ~ 1 | age))

#-- Selected output follows-----

Correlation Structure: ARMA(2,0)

Formula: ~1 | Subject

Parameter estimate(s):

Phi1 Phi2

0.3269544 0.4897645

- End R-code & output --------------------------------

I cannot figure out how to restrict RHO1 = 0, while allowing estimation of RHO2.

Maybe an answer lies in specifying a different ``position vector'' other than the default: corARMA(..., form = ~ 1 | Subject ...). (See p226 of Pinheiro & Bates, 2000 for explanation of a position vector.) But I'm not totally sure if I understand the position vector and I know I don't know how it works in R.

Then again, there is likely a completely different way to solve this problem.

Any help will be appreciated!

Reid

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 08 Feb 2008 - 15:45:50 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Fri 08 Feb 2008 - 16:30:13 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*