hello,
I am trying to use predict.lm to make point forecasts based on a model with
continuous and categorical independent variables
I have no problems fitting the model using lm, but when I try to use predict
to make point predictions. it reverts back to the original dataframe and
gives me the
On Wed, 2007-02-14 at 13:54 -0700, sj wrote:
hello,
I am trying to use predict.lm to make point forecasts based on a model with
continuous and categorical independent variables
I have no problems fitting the model using lm, but when I try to use predict
to make point predictions. it reverts
hello,
I'm trying to predict some values based on a linear regression model.
I've created the model using one dataframe, and have the prediction
values in a second data frame (call it newdata). There are 56 rows in
the dataframe used to create the model and 15 in newdata.
I ran predict(model1,
Larry White [EMAIL PROTECTED] writes:
hello,
I'm trying to predict some values based on a linear regression model.
I've created the model using one dataframe, and have the prediction
values in a second data frame (call it newdata). There are 56 rows in
the dataframe used to create the
Hi
I'm trying to wrap predict.lm within a function, but I'm having problems
passing arguments into it in this way.
Basically I want to create a lm object, then pass it into the predict.lm
function and be able to tell predict.lm which variable I want to predict
for, by passing the variable name
I have a model with a few correlated explanatory variables.
i.e.
m1=lm(y~x1+x2+x3+x4,protdata)
and I have used predict as follows:
x=data.frame(x=1:36)
yp=predict(m1,x,se.fit=T)
tprot=sum(yp$fit) # add up the predictions
tprot
tprot is the sum of the 36 predicted values and I would
this.
-Christos
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Szkotnicki
Sent: Tuesday, May 02, 2006 2:59 PM
To: 'R-Help help'
Subject: [R] predict.lm
I have a model with a few correlated explanatory variables.
i.e.
m1=lm(y~x1+x2+x3+x4,protdata
: Tuesday, May 02, 2006 2:59 PM
To: 'R-Help help'
Subject: [R] predict.lm
I have a model with a few correlated explanatory variables.
i.e.
m1=lm(y~x1+x2+x3+x4,protdata)
and I have used predict as follows:
x=data.frame(x=1:36)
yp=predict(m1,x,se.fit=T)
How can this work? You fitted
way?
Bill
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 02, 2006 2:54 PM
To: Christos Hatzis
Cc: 'Bill Szkotnicki'; 'R-Help help'
Subject: Re: [R] predict.lm
On Tue, 2 May 2006, Christos Hatzis wrote:
I think you got it right.
The mean
Simple question.
For a simple linear regression, I obtained the standard error of
predicted means, for both a confidence and prediction interval:
x-1:15
y-x + rnorm(n=15)
model-lm(y~x)
predict.lm(model,newdata=data.frame(x=c(10,20)),se.fit=T,interval=confidence)$se.fit
1 2
[EMAIL PROTECTED] writes:
Simple question.
For a simple linear regression, I obtained the standard error of
predicted means, for both a confidence and prediction interval:
x-1:15
y-x + rnorm(n=15)
model-lm(y~x)
Can someone please refer me to a function or method that resolves this
structuring issue:
I have two matrices with identical colnames (89), but varying number
of observations:
matrix Amatrix B
217 x 89 16063 x 89
I want to creat one
mark salsburg [EMAIL PROTECTED] writes:
Can someone please refer me to a function or method that resolves this
structuring issue:
I have two matrices with identical colnames (89), but varying number
of observations:
matrix Amatrix B
217 x 89
On Wed, 20 Jul 2005, Peter Dalgaard wrote:
mark salsburg [EMAIL PROTECTED] writes:
Can someone please refer me to a function or method that resolves this
structuring issue:
I have two matrices with identical colnames (89), but varying number
of observations:
matrix A
I was surprised by the following (R 1.8.0):
R lm.fit = lm(y~x, data.frame(x=1:10, y=1:10))
R predict(lm.fit, data.frame(x = rep(NA, 10)))
1 2 3 4 5
-1.060998e-314 -1.060998e-314 -1.060998e-314 -1.060998e-314 -1.060998e-314
On Mon, 10 Nov 2003, Edzer J. Pebesma wrote:
I was surprised by the following (R 1.8.0):
R lm.fit = lm(y~x, data.frame(x=1:10, y=1:10))
R predict(lm.fit, data.frame(x = rep(NA, 10)))
1 2 3 4 5
-1.060998e-314 -1.060998e-314
16 matches
Mail list logo