[R] ls() pattern
Richard.Cotton at hsl.gov.uk
Richard.Cotton at hsl.gov.uk
Thu Dec 13 18:10:07 CET 2007
> cbcname1 <- rnorm(100,0,1)
> cbcname2 <- rnorm(100,0.5,1)
> y <- rnorm(100,0.6,1)
> lm1 <- lm(y~cbcname1+cbcname2)
>
> I have finished the linear regression until here. Now I would
> like to predict for new data. This is the question part.
>
> data <- data.frame(cbcname1=0.1, cbcname2=0.2)
> predict(lm1,data)
This works fine for me.
Regards,
Richie.
Mathematical Sciences Unit
HSL
------------------------------------------------------------------------
ATTENTION:
This message contains privileged and confidential inform...{{dropped:20}}
More information about the R-help
mailing list