Re: [R] explanation of lm's coefficients

2003-08-24 Thread Deepayan Sarkar
lm() implicitly assumes the presence of the intercept term in the model, i.e., lm(data ~ ftr) is actually fitting lm(data ~ 1 + ftr) You can override this by doing lm(data ~ ftr - 1) You can always check the actual model being fitted by extracting the model matrix: model.matrix(data

[R] regression constraints (again)

2003-08-24 Thread Brett Robinson
Im trying to do regressions with constraints that the weights are all =0 and sum(weights) = 1. I've read the archive and have set the problem up with solve.QP and just the non-negativity constraints along the lines of: y as the data vector X as the design matrix D - t(X) %*% X d - t(t(y)

[R] regression constraints (again)

2003-08-24 Thread Brett Robinson
Im trying to do regressions with constraints that the weights are all =0 and sum(weights) = 1. I've read the archive and have set the problem up with solve.QP and just the non-negativity constraints along the lines of: y as the data vector X as the design matrix D - t(X) %*% X d - t(t(y)

Re: [R] regression constraints (again)

2003-08-24 Thread Prof Brian Ripley
It's easier to use crossprod, and you appear to have transposed A. Here's a small example library(quadprog) # which you never mentioned! X - matrix(rnorm(100),, 4) Y - 0.25* X %*% rep(1, 4) + 0.1*rnorm(25) D - crossprod(X) d - crossprod(X, Y) A - cbind(1, diag(ncol(X))) b - c(1, rep(0,ncol(X)))

[R] WARNING! Blocked mail [Re: Details]

2003-08-24 Thread help
Your EMail with subject 'Re: Details', sent to the recipient(s) [EMAIL PROTECTED] contains a file attachment of type '[pif]'. Our organization does not accept files of this type by email. The message has NOT been delivered to the recipients. If you have further questions, please contact the IT

[R] Encapsulated postscript and the family argument

2003-08-24 Thread Patrick Connolly
version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major1 minor7.1 year 2003 month06 day 16

[R] detecting EOF on connection?

2003-08-24 Thread Andy Jacobson
Hello, Is there an easy way of determining whether one has reached the end-of-file when reading a connection? I am reading a binary file and I would like to know when the read fails. Thanks, Andy -- Andy Jacobson [EMAIL PROTECTED] Program in

Re: [R] detecting EOF on connection?

2003-08-24 Thread Prof Brian Ripley
When the readBin gives a 0-length result. See the help file. On Sun, 24 Aug 2003, Andy Jacobson wrote: Is there an easy way of determining whether one has reached the end-of-file when reading a connection? I am reading a binary file and I would like to know when the

Re: [R] detecting EOF on connection?

2003-08-24 Thread Andy Jacobson
BDR == Prof Brian Ripley [EMAIL PROTECTED] writes: Andy Is there an easy way of determining whether one has reached the Andy end-of-file when reading a connection? I am reading a binary Andy file and I would like to know when the read fails. BDR When the readBin gives a