[R] Rare behaviour for nlme::reStruct example and question about ?lmeObject
Martin Maechler
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Thu Nov 17 10:02:18 CET 2022
>>>>> Martin Maechler
>>>>> on Thu, 17 Nov 2022 09:16:04 +0100 writes:
>>>>> Andrew Simmons
>>>>> on Tue, 15 Nov 2022 18:01:55 -0500 writes:
>> This seems to be a bug. I tried creating this function in the global
>> environment:
>> str.pdMat <- function (object, ...)
>> {
>> if (nlme::isInitialized(object)) {
>> NextMethod()
>> }
>> else {
>> cat(" Uninitialized positive definite matrix structure of class ",
>> class(object)[1], ".\n", sep = "")
>> }
>> }
> Thank you, Iago, for the question and Andrew for your proposal.
> Yes, I agree that something like the above -- which is derived from the
> print.pdMat method -- should be added to nlme and will do this
> myself.
My current working proposal gives this:
> (rs <- reStruct(list(Dog = ~day, Side = ~1), data = Pixel))
Uninitialized random effects structure
> str(rs)
List of 2
$ Side:Uninitialized 'pdLogChol', 'pdSymm', 'pdMat': ~1
$ Dog :Uninitialized 'pdLogChol', 'pdSymm', 'pdMat': ~day
- attr(*, "settings")= int [1:5] 0 1 0 4 4
- attr(*, "class")= chr "reStruct"
>
Martin
More information about the R-help
mailing list