Re: [R] spatial logit help

2011-07-12 Thread David Winsemius
On Jul 12, 2011, at 7:26 PM, Salifu Wahab wrote: Please I am new to R. I got the following code from a friend: gmat <- cbind(gmat,p*(1-p)*wxb) for (j in seq(1:ncol(gmat))) { gmat[,j] <- fitted(lm(gmat[,j]~zmat)) } It is for spatial logit. After defining all the matrices in it such as P, wx

[R] spatial logit help

2011-07-12 Thread Salifu Wahab
Please I am new to R. I got the following code from a friend:   gmat <- cbind(gmat,p*(1-p)*wxb) for (j in seq(1:ncol(gmat))) {   gmat[,j] <- fitted(lm(gmat[,j]~zmat)) }   It is for spatial logit.   After defining all the matrices in it such as P, wxb, gmat, and zmat, I tried to run it in R and go