similar to: plotting the predict values of time series

Displaying 20 results from an estimated 30000 matches similar to: "plotting the predict values of time series"

2009 Mar 12
3
help with predict and plotting confidence intervals
Dear R help, This seems to be a commonly asked question and I am able to run examples that have been proposed, but I can't seems to get this to work with my own data. Reproducible code is below. Thank you in advance for any help you can provide. The main problem is that I can not get the confidence lines to plot correctly. The secondary problem is that predict is not able to find my object
2012 Sep 11
1
plotting smoother function on raw data
Hi, I have used the mgcv library to generate a simple additive model. I want to know how to plot the function on the raw data with confidence intervals whan I have TWO variables in the model. I get it to work with one variable but not with two. I am on the limit for what I understand in R, so be gentle. I have read the help file on predict.gam, but did not get any help out of it. #My model:
2006 Oct 29
1
Unexpected behavior of predict and interval="confidence"
Based on some recent r-help discussions, I have been trying out plotting confidence intervals using predict and matplot. Matplot appeared to not be plotting the linear regression when using the default column names generated by read.table (V1, V2, etc). On further inspection, the error seemed to be with predict and vector names (V1, V2) rather than with matplot. I was using some textbook
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 =
2017 Aug 10
0
Plotting log transformed predicted values from lme
Dear Alina If I understand you correctly you cannot just have a single predicted curve but one for each level of your factor. On 09/08/2017 16:24, Alina Vodonos Zilberg wrote: > Hi, > > I am performing meta-regression using linear mixed-effect model with the > lme() function that has two fixed effect variables;one as a log > transformed variable (x) and one as factor (y)
2012 Feb 13
1
survey package svystat objects from predict()
Hello, I'm running R 2.14.1 on OS X (x86_64-apple-darwin9.8.0/x86_64 (64-bit)), with version 3.28 of Thomas Lumley's survey package. I was using predict() from svyglm(). E.g.: data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) out <- svyglm(sch.wide~ell+mobility, design=dstrat, family=quasibinomial()) pred.df <-
2005 Mar 16
2
How to concatenate time series?
Hello, I have just completed first experiments in using R, especially creating and using ARIMA models, e.g. # create a model as in example(arima) fit <- arima(USAccDeaths, order = c(1,1,1),seasonal = list(order=c(1,1,1))) # use the model to generate a prediction dp<-predict(fit, n.ahead = 24) plot(dp$pred) # view the prediction Now I created a combined chart of the original and
2011 Sep 21
1
Problem with predict and lines in plotting binomial glm
Problems with predict and lines in plotting binomial glm Dear R-helpers I have found quite a lot of tips on how to work with glm through this mailing list, but still have a problem that I can't solve. I have got a data set of which the x-variable is count data and the y-variable is proportional data, and I want to know what the relationship between the variables are. The data was
2017 Aug 09
3
Plotting log transformed predicted values from lme
Hi, I am performing meta-regression using linear mixed-effect model with the lme() function that has two fixed effect variables;one as a log transformed variable (x) and one as factor (y) variable, and two nested random intercept terms. I want to save the predicted values from that model and show the log curve in a plot ; predicted~log(x) mod<-lme(B~log(x)+as.factor(y),
2017 Oct 16
1
survival analysis - predict function
Hi I'm trying to predict the values for a survreg object called loglogistic_na. Here is the definition of loglogistic_na and following that the syntax used for the predict function. But upon execution I don't get any output. Not sure what I'm doing wrong: loglogistic_na <- survreg(Surv(time_na,event_na) ~ t_na, dist="loglogistic") summary(loglogistic_na)
2017 Aug 10
1
Plotting log transformed predicted values from lme
Thank you Michael, Curves for each level of the factor sounds very interesting, Do you have a suggestion how to plot them? Thank you! Alina *Alina Vodonos Zilberg* On Thu, Aug 10, 2017 at 7:39 AM, Michael Dewey <lists at dewey.myzen.co.uk> wrote: > Dear Alina > > If I understand you correctly you cannot just have a single predicted > curve but one for each level of your
2017 Dec 26
1
Time Series with Neural Networks
Hi, I am would like to ask few questions. I am trying to forecast hourly electricity prices by 24 hours ahead. I have hourly data starting from 2015*12*18 to 2017-10-24 and I have defined the data as time series as written in the code below. Then I am trying do neural network with 23 non-seasonal dummies and 1 seasonal dummy. But I don?t know whether training set is enough.( Guess it is 50
2009 Dec 04
0
Problems while plotting with ROCR
Hello all, I have two problems with the ROCR package. First Problem: the add=TRUE option does not work for plotting performance objects The following code is taken from the reference manual (example for ROCR.hiv, page2) data(ROCR.hiv) attach(ROCR.hiv) pred.svm <- prediction(hiv.svm$predictions, hiv.svm$labels) perf.svm <- performance(pred.svm, 'tpr', 'fpr') pred.nn <-
2008 Oct 13
0
Re : using predict() or fitted() from a model with offset; unsolved, included reproducible code
Thanks for your reply Mark, but no, using predict on the new data.frame does not help here. ? I had first thought that the probelm was due?the?explanatory variable (age)?and?the offset one (date) being?very similar (highly?correlated, I am trying to tease their effect apart, and hoped offset would help in this since I know the relationship with age already). But this appears not to be the case.
2005 Oct 04
2
Need help on ARIMA (time series analysis)
Hi, I am so novice in using R. I have some problems in my R script below which fits time series data and predict it one-step ahead. Here is a brief explanation on what I try to achieve Th16k is time series data (500 data points). The size of window for fitting and predicting is 50 (data points). As you can easily discover from my code, (fixed) window is moving/sliding to get next one-step
2017 Oct 16
0
survival analysis - predict function
> Hi > > I'm trying to predict the values for a survreg object called loglogistic_na. Here is the definition of loglogistic_na and following that the syntax used for the predict function. But upon execution I don't get any output. Not sure what I'm doing wrong: > > loglogistic_na <- survreg(Surv(time_na,event_na) ~ t_na, dist="loglogistic") >
2003 Jun 07
0
problem with predict() for gam() models
I run the following code in R 1.6.2 on Windows: xxx <- rnorm(100) yyy <- .5 * rnorm(100) + sqrt(1-.5^2) * rnorm(100) ord <- order(xxx) xxx <- xxx[ord] # for yyy <- yyy[ord] # convenience in reading printout rm(ord) reg.gam <- gam(yyy ~ s(xxx, k=8)) f <- function(x, reg.gam, target.y) { cat("inside f() called by optimize():\n") cat("arg x=", x,
2011 Aug 06
1
help with predict for cr model using rms package
Dear list, I'm currently trying to use the rms package to get predicted ordinal responses from a conditional ratio model. As you will see below, my model seems to fit well to the data, however, I'm having trouble getting predicted mean (or fitted) ordinal response values using the predict function. I have a feeling I'm missing something simple, however I haven't been able to
2011 May 19
3
A better way to do this
Hello gurus, I have a dataframe containing two groups viz., 'control' and 'case', each of these groups contains longitudinal data for 100 subjects. I have to plot all these subjects on a single chart and then put a regression line for each of the group for all the subjects. I have written a function to do the chart grpcharts<-function (dat, group,group2,molecule,cutoff){
2007 Dec 17
0
Memory problem using predict function
I am trying to make a predicted vegetation map using the predict ( ) function and am running into an issue with memory size Specifically I am building a random forest classification (dataframe = " vegmap.rf") using the randomForest library and then am trying to apply results from that to construct a predicted map (dataframe ="testvegmap.pred "): testvegmap.pred