similar to: Using predict.lm()

Displaying 20 results from an estimated 3000 matches similar to: "Using predict.lm()"

2019 Sep 30
3
Adding support for vscale
On Tuesday, October 1, 2019, Jacob Lifshay <programmerjake at gmail.com> wrote: > On Mon, Sep 30, 2019 at 2:30 AM Sander De Smalen via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > > > I've posted two patches on Phabricator to add support for VScale in LLVM. Excellent! > > > > A brief recap on `vscale`: > > The scalable vector type in
2019 Sep 30
2
Adding support for vscale
I've posted two patches on Phabricator to add support for VScale in LLVM. A brief recap on `vscale`: The scalable vector type in LLVM IR is defined as `<vscale x n x m>`, to create types such as `<vscale x 16 x i8>` for a scalable vector with at least 16 bytes. In the definition of the scalable type, `vscale` is specified as a positive constant of type integer that will only be
2012 Aug 28
4
predict.lm(...,type="terms") question
Hello all, How do I actually use the output of predict.lm(..., type="terms") to predict new term values from new response values? I'm a chromatographer trying to use R (2.15.1) for one of the most common calculations in that business: - Given several chromatographic peak areas measured for control samples containing a molecule at known (increasing) concentrations, first
2005 Apr 19
3
Help with predict.lm
Hi I have measured the UV absorbance (abs) of 10 solutions of a substance at known concentrations (conc) and have used a linear model to plot a calibration graph with confidence limits. I now want to predict the concentration of solutions with UV absorbance results given in the new.abs data.frame, however predict.lm only appears to work for new "conc" variables not new "abs"
2002 Dec 19
0
Ongoing unhappiness with NA and factor behavior of distributed lm/predict.lm
Hi all, I''m still not quite happy with the NA and factor handling of lm and predict.lm in R1.6.1 (forcing me to use my not very skillfully crafted patches). Here is the problem 1: >
2009 Oct 08
0
predict.lm() out-of-sample predictions - problem with data classes
Hello! I'm still working on my problem, which also occurs with the predict.lm() function. - Providing newdata, which is a data.frame with all variables being "numeric", as str() shows, R tells me the following: ar1.xpred.test.pred <- predict(ar1.xpred.fitted, regdata.test, se.fit = FALSE) Fehler: variable 'lag(ret1)' was fitted with type "numeric" but type
2010 Oct 22
1
cv.lm() broken; cross validation vs. predict(interval="prediction")
<< repost because previous attempt was not plain text, sorry! >> Hi Folks, I have a pretty simple problem: after building a multivariate linear model, I need to report my 95% confidence interval for predictions based on future observations. I know that one option is to use predict(interval="prediction") but I'm curious about less parametric ways to get an estimate. I
2005 Jul 20
1
predict.lm - standard error of predicted means?
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 0.2708064 0.7254615
2012 Feb 17
1
Standard errors from predict.gam versus predict.lm
I've got a small problem. I have some observational data (environmental samples: abiotic explanatory variable and biological response) to which I've fitted both a multiple linear regression model and also a gam (mgcv) using smooths for each term. The gam clearly fits far better than the lm model based on AIC (difference in AIC ~ 8), in addition the adjusted R squared for the gam is
2003 Aug 07
0
predict(lm(etc.), some_data) -> "numeric envir arg not of length one " ???
I've got a data frame with two numeric variables, df$flow and df$flow1. > tl <- lm(flow~flow1,df,na.action=na.exclude) > tlo <- loess(flow~flow1,df,na.action=na.exclude) Both loess and a simple linear model fit the data well. summary(tl) and summary(tlo) seem reasonable. As do plots such as: plot(predict(tl),df$flow) plot(predict(tlo),df$flow) I want to replace missing values
2003 Sep 10
1
what is set.fit in function predict.lm
Hi, what es the parameter set.fit in function predict.lm, is set.fit True then i need the standard error How i cant calculate it?. It is the different what? i see the code of predict.lm How i cant see the matemathics formula for the calculation of standard error.
2010 Dec 16
1
predict.lm with new regressor names
Hi all, Suppose: y<-rnorm(100) x1<-rnorm(100) lm.yx<-lm(y~x1) To predict from a new data source, one can use: # works as expected dum<-data.frame(x1=rnorm(200)) predict(lm.yx, newdata=dum) Suppose lm.yx has been run and we have the lm object. And we have a dataframe that has columns that don't correspond by name to the original regressors. I very! naively assumed that doing
2010 Apr 05
1
predict.lm
Hello I am trying to use predict.lm, but I am having trouble getting out of sample predictions. I am getting the same output if I use the following three commands: predict(ModeloLineal,predictors[721:768,]) predict(ModeloLineal,predictors[1:768,]) predict(ModeloLineal) where ModeloLineal is the output from ModeloLineal<-lm(dataTS[,6] ~ predictors[1:720,]), so the first 720 observations of
2000 Aug 07
1
predict.lm is broken in 1.1.0-patched (2000-August-7) (PR#627)
On 7 Aug 2000, Peter Dalgaard BSA wrote: > ripley@stats.ox.ac.uk writes: > > > predict.lm has been broken by recent changes to the patched branch. > > > > It fails for all singular fits. An example: <snip> > Sometimes the fix for one bug uncovers another. We have > > > coef.aov > function (object, ...) > { > z <- object$coef >
2000 Aug 07
0
predict.lm is broken in 1.1.0-patched (2000-August-7) (PR#628)
On 7 Aug 2000, Peter Dalgaard BSA wrote: > thomas@biostat.washington.edu writes: > > > > > coef.aov > > > function (object, ...) > > > { > > > z <- object$coef > > > z[!is.na(z)] > > > } > > > > coef.lm > > > function (object, ...) > > > object$coefficients > > > > Ok, this
2020 Mar 17
0
strange bahaviour of predict.lm
Hello, I'm glad that it worked. Two things: 1. Please, click reply all to keep this threaded. 2. The question should have belonged to r-help at r-project.org, not to r-devel at r-project.org. Rui Barradas ?s 07:10 de 17/03/20, Moshe Olshansky escreveu: > It works, thank you! > > On Tuesday, 17 March 2020, 5:47:05 pm AEDT, Rui Barradas > <ruipbarradas at sapo.pt> wrote:
2003 Aug 09
1
lm(), na.exclude and predict()
I'm trying to get predict.lm() to return an NA for each NA row in it's input vector, so the output is the same length as the input. I thought that using na.action=na.exclude with lm() would do that. But apparently not ?? df <- data.frame(x=c(NA,1,2,3,NA),y=c(0,2,3,4,0)) tl <- lm(y~x,df,na.action=na.exclude) predict.lm(tl,data.frame(x=c(2.5,NA,3,4,5))) 1 3 4 5 3.5 4.0 5.0
2004 Jan 06
1
Constructing a lm for predict() by hand
Hello, this probably seems like an odd question, but... If I have the formula and the coefficients for a linear model that I would like to apply to some data using predict() -- is there a way I construct an object of type lm such that predict() will work with it? Or another way besides predict()? Alexander Wise Senior Software Engineer http://laser.cs.umass.edu
2006 Nov 09
1
predict.lm "variables found" question
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, newdata) and get the warning: 'newdata' had 15 rows but variable(s) found have 56 rows
2008 Jan 04
1
predict.lm removes rownames for a single row. Why?
predict.lm keeps row names when working from several rows in newdata, but always removes rowname from a single row. The rownames are removed by the line in predict.lm predictor <- drop(X[, piv, drop = FALSE] %*% beta[piv]) What is the reason for that decision? I usually want to retain the row names. tmp <- data.frame(x=1:4, y=c(1,3,2,5)) tmp.lm <- lm(y ~ x, data=tmp) tmp.new <-