similar to: R question about prediction from a fitted model

Displaying 20 results from an estimated 40000 matches similar to: "R question about prediction from a fitted model"

2008 Apr 29
2
Help on extract paramters from fitted models
Hi, I have a question about how to extract paramters from a fitted model. I can extract coefficients and std, but from some other statistics, I dont know how to extract. Can anyone help? Here it is an example: > coxout<-coxph(Surv(t,t.censor)~x) > coxout Call: coxph(formula = Surv(t, t.censor) ~ x) coef exp(coef) se(coef) z p x 0.349 1.42 0.257 1.36 0.17 Likelihood
2008 Apr 28
1
question on prediction in coxph
Hi, thank you all for those who helped me on prediction of newdata for linear model, it is my new question on the prediction of coxph for newdata, for example, i have the model: coxout<-coxph( Surv(time, status) ~ x predict(coxout) will give the fitted values I have tried predict(coxout, newdata), it still gave me the fitted values only. Can anyone hlep me on how to do prediction for
2013 Nov 28
2
Find the prediction or the fitted values for an lm model
Hi, I would like to fit my data with a 4th order polynomial. Now I have only 5 data point, I should have a polynomial that exactly pass the five point Then I would like to compute the "fitted" or "predict" value with a relatively large x dataset. How can I do it? BTW, I thought the model "prodfn" should pass by (0,0), but I just wonder why the const is
2009 Sep 03
3
goodness of "prediction" using a model (lm, glm, gam, brt, regression tree .... )
Dear R-friends, How do you test the goodness of prediction of a model, when you predict on a set of data DIFFERENT from the training set? I explain myself: you train your model M (e.g. glm,gam,regression tree, brt) on a set of data A with a response variable Y. You then predict the value of that same response variable Y on a different set of data B (e.g. predict.glm, predict.gam and so on).
2010 Jul 21
3
Help me with prediction in linear model
Hi R-community, I have the code as follows,i Fitted model as follows lbeer<-log(beer_monthly) t<-seq(1956,1995.2,length=length(beer_monthly)) #beer_monthly contains 400+ entries t2=t^2 beer_fit_parabola=lm(lbeer~t+t2) Below is not working for me. Please help me in preparing the new data set for the below prediction
2011 Feb 10
1
Newb Prediction Question using stepAIC and predict(), is R wrong?
I'm using stepAIC to fit a model. Then I'm trying to use that model to predict future happenings. My first few variables are labeled as their column. (Is this a problem?) The dataframe that I use to build the model is the same as the data I'm using to predict with. Here is a portion of what is happening.. This is the value it is predicting = > [1] 9.482975 Summary of the
2012 Nov 15
1
depmixS4 prediction
I am getting started with using the depmixS4 package. First, I would like to see I am very impressed with its speed and flexibility. The question I have is regarding predicting on new data. I want to fit the model on some sequences with observed responses, and then make predictions on the right end of the sequences where the responses are not observed. I see no prediction functionality anywhere,
2010 Jul 21
2
Variance of the prediction in the linear regression model (Theory and programming)
Hi, folks, Here are the codes: ############## y=1:10 x=c(1:9,1) lin=lm(log(y)~x) ### log(y) is following Normal distribution x=5:14 prediction=predict(lin,newdata=x) ##prediction=predict(lin) ############### 1. The codes do not work, and give the error message: Error in eval(predvars, data, env) : numeric 'envir' arg not of length one. But if I use the code after the pound sign, it
2010 Feb 07
2
predicting with stl() decomposition
Hi mailinglist members, I’m actually working on a time series prediction and my current approach is to decompose the series first into a trend, a seasonal component and a remainder. Therefore I’m using the stl() function. But I’m wondering how to get the single components in order to predict the particular fitted series’. This code snippet illustrates my problem: series <-
2006 May 19
1
How to use lm.predict to obtain fitted values?
I am writing a function to assess the out of sample predictive capabilities of a time series regression model. However lm.predict isn't behaving as I expect it to. What I am trying to do is give it a set of explanatory variables and have it give me a single predicted value using the lm fitted model. > model = lm(y~x) > newdata=matrix(1,1,6) > pred =
2012 May 16
2
confidence intervals for nls or nls2 model
Hi all I have fitted a model usinf nls function to these data: > x [1] 1 0 0 4 3 5 12 10 12 100 100 100 > y [1] 1.281055090 1.563609934 0.001570796 2.291579783 0.841891853 [6] 6.553951324 14.243274230 14.519899320 15.066473610 21.728809880 [11] 18.553054450 23.722637370 The model fitted is: modellogis<-nls(y~SSlogis(x,a,b,c)) It runs OK. Then I calculate
2012 Oct 12
2
party for prediction [REPOST]
Apologies for re-posting, my original message seems to have been overlooked by the moderators. ---------- Forwarded message ---------- From: Ed <icelus2k5 at gmail.com> Date: 11 October 2012 19:03 Subject: party for prediction To: R-help at r-project.org Hi there I'm experiencing some problems using the party package (specifically mob) for prediction. I have a real scalar y I want to
2003 Oct 22
1
: Prediction interval for a Gaussian family log-link model
Hi there fellow R-users, Can anyone tell me how to build a prediction interval for a gaussian log-link model for the reponse variable?? I can find the standard error of the predictions but I cant seem to find the prediction interval. Is there a way I can calculate the prediction interval from the standard errors?? Here's the example: logX<-rnorm(100)
2009 Mar 31
1
Can not get a prediction interval from Predict
I am trying to get a prediction interval from a glm regression. With newdat being my set of values to be fitted, and glmreg the name of my regression, I am using the following code. predict(glmreg, newdat, se.fit = TRUE, interval = "confidence", level = 0.90) The problem is that I am only getting the standard error and the fitted value, not a prediction interval. Any help would be
2010 Sep 20
5
predict.lrm ( Design package)
Dear List, I am familier with binary models, however i am now trying to get predictions from a ordinal model and have a question. I have a data set made up of 12 categorical predictors, the response variable is classed as 1,2,3,4,5,6, this relates to threat level of the species ( on the IUCN rating). Previously i have combined levels 1 and 2 to form = non threatened and then combined 3-6 to
2008 Apr 13
2
prediction intervals from a mixed-effects models?
How can I get prediction intervals from a mixed-effects model? Consider the following example: library(nlme) fm3 <- lme(distance ~ age*Sex, data = Orthodont, random = ~ 1) df3.1 <- with(Orthodont, data.frame(age=seq(5, 20, 5), Subject=rep(Subject[1], 4), Sex=rep(Sex[1], 4))) predict(fm3, df3.1, interval='prediction') # M01 M01
2008 Apr 15
1
Predicting ordinal outcomes using lrm{Design}
Dear List, I have two questions about how to do predictions using lrm, specifically how to predict the ordinal response for each observation *individually*. I'm very new to cumulative odds models, so my apologies if my questions are too basic. I have a dataset with 4000 observations. Each observation consists of an ordinal outcome y (i.e., rating of a stimulus with four possible
2009 Apr 24
2
prediction intervals (alpha and beta) for model average estimates from binomial glm and model.avg (library=dRedging)
Hi all, I was wondering if there is a function out there, or someone has written code for making confidence intervals around model averaged predictions (y~á+âx). The model average estimates are from the dRedging library? It seems a common thing but I can't seem to find one via the search engines Examples of the models are: fit1 <- glm(y~ dbh, family = binomial, data = data) fit2 <-
2011 Feb 02
2
SVM Prediction and Plot
Hi I'm trying to predict using a model I fitted with SVM. I constructed the model (called Svm) using a training set, and now I want to use a test set (called BankTest) for prediction. The response variable is in the first column of BankTest. > SvmPred = predict(Svm, BankTest[,-1], probability=TRUE) > SvmPredRes = table(Pred = SvmPred, True = BankTest[,1]) I get this error: Error in
2011 Apr 18
2
Predicting with a principal component regression model: "non-conformable arguments" error
Hello all, I have generated a principal components regression model using the pcr() function from the PLS package (R version 2.12.0). I am getting a "non-conformable arguments" error when I try to use the predict() function on new data, but only when I try to read in the new data from a separate file. More specifically, when my data looks like this #########training data