Re: [R] naive "collinear" weighted linear regression

2009-11-15 Thread Mauricio O Calvao
David Winsemius comcast.net> writes: > > It's really not that difficult to get the variance covariance matrix. > What is not so clear is why you think differential weighting of a set > that has a perfect fit should give meaningfully different results than > a fit that has no weights. Aga

Re: [R] naive "collinear" weighted linear regression

2009-11-15 Thread Mauricio O Calvao
Peter Dalgaard biostat.ku.dk> writes: > > The point is that R (as well as almost all other mainstream statistical > software) assumes that a "weight" means that the variance of the > corresponding observation is the general variance divided by the weight > factor. The general variance is still

Re: [R] naive "collinear" weighted linear regression

2009-11-14 Thread Peter Dalgaard
Mauricio O Calvao wrote: Unfortunately you eschewed answering objectively any of my questions; I insist they do make sense. Don't mention the data are perfect; this does not help to make any progress in understanding the choice of convenient summary info the lm method provides, as compared to wh

Re: [R] naive "collinear" weighted linear regression

2009-11-14 Thread David Winsemius
On Nov 14, 2009, at 1:50 PM, Mauricio O Calvao wrote: David Winsemius comcast.net> writes: Which means those x, y, and "error" figures did not come from an experiment, but rather from theory??? The fact is I am trying to compare the results of: (1) lm under R and (2) the Java applet at

Re: [R] naive "collinear" weighted linear regression

2009-11-14 Thread Mauricio O Calvao
David Winsemius comcast.net> writes: > > Which means those x, y, and "error" figures did not come from an > experiment, but rather from theory??? > The fact is I am trying to compare the results of: (1) lm under R and (2) the Java applet at http://omnis.if.ufrj.br/~carlos/applets/reta/reta

Re: [R] naive "collinear" weighted linear regression

2009-11-13 Thread tlumley
On Wed, 11 Nov 2009, David Winsemius wrote: On Nov 11, 2009, at 7:45 PM, Mauricio Calvao wrote: When I try: fit_mod <- lm(y~x,weights=1/error^2) I get Warning message: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : extra arguments weigths are just disregarded. (Ac

Re: [R] naive "collinear" weighted linear regression

2009-11-11 Thread David Winsemius
On Nov 11, 2009, at 7:45 PM, Mauricio Calvao wrote: Hi there Sorry for what may be a naive or dumb question. I have the following data: > x <- c(1,2,3,4) # predictor vector > y <- c(2,4,6,8) # response vector. Notice that it is an exact, perfect straight line through the origin and slope

[R] naive "collinear" weighted linear regression

2009-11-11 Thread Mauricio Calvao
Hi there Sorry for what may be a naive or dumb question. I have the following data: > x <- c(1,2,3,4) # predictor vector > y <- c(2,4,6,8) # response vector. Notice that it is an exact, perfect straight line through the origin and slope equal to 2 > error <- c(0.3,0.3,0.3,0.3) # I have (equ