Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Achim Zeileis
On Tue, 30 Oct 2007, Michael Ash wrote: > On 10/30/07, Christian Ritz <[EMAIL PROTECTED]> wrote: > > in the MLE setting the score function (no expectation taken) is the > > estimating function. So for the OLS situation the basic estimating > > function is: (in the terminology of Zeileis' paper) >

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Michael Ash
On 10/30/07, Christian Ritz <[EMAIL PROTECTED]> wrote: > in the MLE setting the score function (no expectation taken) is the > estimating function. So for the OLS situation the basic estimating > function is: (in the terminology of Zeileis' paper) > > psi(x,y,beta) = (y - x^t beta) x^t Thanks! Th

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Christian Ritz
Hi again, in the MLE setting the score function (no expectation taken) is the estimating function. So for the OLS situation the basic estimating function is: (in the terminology of Zeileis' paper) psi(x,y,beta) = (y - x^t beta) x^t Christian __ R

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Michael Ash
On 10/30/07, Christian Ritz <[EMAIL PROTECTED]> wrote: > Use 'model.matrix' to construct a design matrix: > > x <- runif(10,0,10) > model.matrix(~x) Thanks! That's super helpful. > The following article by A. Zeileis provides more details on the > package 'sandwich': > http://www.jstatsoft.org/

Re: [R] Some matrix and sandwich questions

2007-10-30 Thread Christian Ritz
Dear Michael, as to questions 1) and 2): The following article by A. Zeileis provides more details on the package 'sandwich': http://www.jstatsoft.org/v16/i09/ (see also the references). Use 'model.matrix' to construct a design matrix: x <- runif(10,0,10) model.matrix(~x) Christian

[R] Some matrix and sandwich questions

2007-10-30 Thread Michael Ash
Dear R-help, I have a four-part question about regression, matrices, and sandwich package. 1) In the sandwich package, I would like to better understand the meat() function. >From the bread() documentation, for a simple OLS regression, bread() returns (1/n * X'X)^(-1) That is, for a simple reg

[R] Some matrix and sandwich questions

2007-10-30 Thread Michael Ash
Dear R-help, I have a four-part question about regression, matrices, and sandwich package. 1) In the sandwich package, I would like to better understand the meat() function. >From the bread() documentation, for a simple OLS regression, bread() returns (1/n * X'X)^(-1) That is, for a simple reg