Displaying 2 results from an estimated 2 matches for "diagband".
2010 Sep 22
1
Newey West and Singular Matrix
...lass(lmobject.withxtrue), "objects \n" )
x.na.omitted <- lmobject.withxtrue$x
assert( class(x.na.omitted)=="matrix", "[se.white] internal
error---have no X matrix. did you invoke with 'x=TRUE'?\n")
r.na.omitted <- residuals( lmobject.withxtrue )
diagband.matrix <- function( m, ar.terms ) {
nomit <- m-ar.terms-1
mm <- matrix( TRUE, nrow=m, ncol=m )
mm[1:nomit,(ncol(mm)-nomit+1):ncol(mm)] <- (lower.tri(
matrix(TRUE, nrow=nomit, ncol=nomit) ))
mm[(ncol(mm)-nomit+1):ncol(mm),1:nomit] <- (upper.tri(
matrix(TRUE, nrow=nomit...
2010 Sep 23
1
Newey West and Singular Matrix + library(sandwich)
...)
>> ?x.na.omitted <- lmobject.withxtrue$x
>> ?assert( class(x.na.omitted)=="matrix", "[se.white] internal
>> error---have no X matrix. ?did you invoke with 'x=TRUE'?\n")
>> ?r.na.omitted <- residuals( lmobject.withxtrue )
>>
>> ?diagband.matrix <- function( m, ar.terms ) {
>> ? nomit <- m-ar.terms-1
>> ? mm <- matrix( TRUE, nrow=m, ncol=m )
>> ? mm[1:nomit,(ncol(mm)-nomit+1):ncol(mm)] <- (lower.tri(
>> matrix(TRUE, nrow=nomit, ncol=nomit) ))
>> ? mm[(ncol(mm)-nomit+1):ncol(mm),1:nomit] <...