Re: [R] Fitted values from AR model

2022-08-13 Thread bogus christofer
Thanks Eric. Is it possible to know what R uses as the initial values? Are these configurable? On Fri, 12 Aug 2022 at 13:44, Eric Berger wrote: > The model that you are fitting to the data is an AR(2) model, which means > > y(t) = a0 + a1 * y(t-1) + a2 * y(t-2) + eps(t) (1) > >

Re: [R] Fitted values from AR model

2022-08-12 Thread Eric Berger
The model that you are fitting to the data is an AR(2) model, which means y(t) = a0 + a1 * y(t-1) + a2 * y(t-2) + eps(t) (1) The fitting procedure estimates the coefficients a0, a1, a2 (and the variance of eps). After the coefficients have been estimated, the fitted values can be

[R] Fitted values from AR model

2022-08-11 Thread bogus christofer
Hi, I have below AR model and fitted values from the forecast package library(forecast) dta = c(5.0, 11, 16, 23, 36, 58, 29, 20, 10, 8, 3, 0, 0, 2, 11, 27, 47, 63, 60, 39) fit <- arima(dta, order=c(2,0,0)) fitted(fit) This gives fitted values as Time Series: Start = 1 End = 20 Frequency = 1 [1

[R] Fitted values problem

2015-07-19 Thread B Jessop
Dear list, I have run two ancova models with the same data, one where the covariate Length was centered by Site (group mean centered), the other with Length not centered. The package "car" was used. The models are: ancova1a <- lm(log10(Weight) ~ LenCtd2 + Site, data = Data2); Length centered

Re: [R] fitted

2013-08-26 Thread Peter Lomas
I don't fully understand what you are looking for, but you may want to check out ?predict, ?predict.lm On Sat, Aug 24, 2013 at 7:43 AM, alR wrote: > I have fitted a multiple regression model to the row of a matrix using lm: > > ft<-lm(datos[i, ]-r1 + r2+ r3 + r4,keep.data = TRUE,model=TRUE) > >

Re: [R] fitted

2013-08-25 Thread David Winsemius
If by fitted values corresponding to each predictor you mean the regression coefficients , then use coef(ft) -- David. Sent from my iPhone On Aug 24, 2013, at 6:43 AM, alR wrote: > I have fitted a multiple regression model to the row of a matrix using lm: > > ft<-lm(datos[i, ]-r1 + r2+ r3

[R] fitted

2013-08-24 Thread alR
I have fitted a multiple regression model to the row of a matrix using lm: ft<-lm(datos[i, ]-r1 + r2+ r3 + r4,keep.data = TRUE,model=TRUE) If I use fitted(ft) I get the list of fitted values (which I think is the mean of the fitted values corresponding to each of the explanatory variables (r1, r2

Re: [R] fitted values with locfit

2012-03-28 Thread Liaw, Andy
a Pilar > Sent: Monday, March 19, 2012 5:13 AM > To: r-help@r-project.org > Subject: [R] fitted values with locfit > > Dear memberships, > > > > I'm trying to estimate the following multivariate local > regression model using the "locfit" package: &

Re: [R] fitted values with locfit

2012-03-19 Thread Peter Ehlers
On 2012-03-19 02:12, Soberon Velez, Alexandra Pilar wrote: Dear memberships, I'm trying to estimate the following multivariate local regression model using the "locfit" package: BMI=m1(RCC)+m2(WCC) where (m1) and (m2) are unknown smooth functions. My problem is that once I get the regress

[R] fitted values with locfit

2012-03-19 Thread Soberon Velez, Alexandra Pilar
Dear memberships, I'm trying to estimate the following multivariate local regression model using the "locfit" package: BMI=m1(RCC)+m2(WCC) where (m1) and (m2) are unknown smooth functions. My problem is that once I get the regression done I cannot get the fitted values of each of this smoo

Re: [R] fitted from plm

2010-10-21 Thread Max Brown
Wow, thanks for the very detailed reply! Max __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, r

[R] R: fitted from plm

2010-10-21 Thread Millo Giovanni
Hi Max. You're welcome. Re your question below, the input order is not always preserved: observations are always reordered by (individual, time) internally, so that the output you get is ordered accordingly. Most of the time, this is also the order you'd input them, but this is not necessarily s

Re: [R] fitted from plm

2010-10-21 Thread max . e . brown
Thanks Giovanni and Achim. Just to confirm - the order of observations in residuals(mymodel) is exactly the same as in the dataframe that I pass to plm, so that I can extract the fitted values for an individual by calculating yhat = y - residuals(mymodel) as you describe, and then pick out indi

Re: [R] fitted from plm

2010-10-20 Thread Millo Giovanni
16 To: max.e.br...@gmail.com Cc: r-h...@stat.math.ethz.ch; yves.croiss...@univ-reunion.fr; Millo Giovanni Subject: Re: [R] fitted from plm On Wed, 20 Oct 2010, max.e.br...@gmail.com wrote: > Hi, > > I am estimating a (fixed-effects) model with plm, for which I would like > to get the fitted value

Re: [R] fitted from plm

2010-10-20 Thread Achim Zeileis
On Wed, 20 Oct 2010, max.e.br...@gmail.com wrote: Hi, I am estimating a (fixed-effects) model with plm, for which I would like to get the fitted values. If I call fitted() on my estimated model, it returns NULL. How do I get the fitted values out of the plm object? I think there is currently

[R] fitted from plm

2010-10-20 Thread max . e . brown
Hi, I am estimating a (fixed-effects) model with plm, for which I would like to get the fitted values. If I call fitted() on my estimated model, it returns NULL. How do I get the fitted values out of the plm object? Thanks. Max __ R-help@r-project.or

[R] Fitted values and MSE of individual fits in lmList

2009-04-14 Thread Marc
Dear useRs, I am working on a series of field experiments (159 in total) carried out in different years in several locations. The cultivars in each experiment are not always the same, in fact they change over time. I would like to get the fitted values and MSE of the individual fits from the f

Re: [R] Fitted values and residuals from glmmPQL (MASS package)

2009-01-30 Thread Prof Brian Ripley
glmmPQL is a wrapper for lme, so look at its documentation (and the especially the Pinheiro-Bates book). On Fri, 30 Jan 2009, Roberto Patuelli wrote: Dear All, I would like to analyse the residuals from a generalized linear mixed model (GLMM) that I estimated, with random effects, by means o

[R] Fitted values and residuals from glmmPQL (MASS package)

2009-01-30 Thread Roberto Patuelli
Dear All, I would like to analyse the residuals from a generalized linear mixed model (GLMM) that I estimated, with random effects, by means of the command glmmPQL, from the MASS package. It is not very clear to me what the actual residuals to analyse are (Y - Yhat): I obtain two columns of re

Re: [R] Fitted probabilities in conditional logit regression

2008-09-05 Thread Gavin Simpson
On Sun, 2008-08-31 at 09:49 -0400, Min Chen wrote: > Dear R-help, > > I'm doing conditional logit regression for a discrete choice model. > I want to know whether there's a way to get the fitted probabilities. In > Stata, "predict" works for clogit, but it seems that in R "predict" does >

[R] Fitted probabilities in conditional logit regression

2008-08-31 Thread Min Chen
Dear R-help, I'm doing conditional logit regression for a discrete choice model. I want to know whether there's a way to get the fitted probabilities. In Stata, "predict" works for clogit, but it seems that in R "predict" does not. Thank you very much! Best wishes. Sin

Re: [R] fitted values are different from manually calculating

2008-02-19 Thread Mark Difford
Hi Yianni, This just proves that you should be using R as your calculator, and not the other one! Regards, Mark. gatemaze wrote: > > Hello, > > on a simple linear model the values produced from the fitted(model) > function > are difference from manually calculating on calc. Will anyone have

Re: [R] fitted values are different from manually calculating

2008-02-19 Thread gatemaze
Thank you all for your help. Apologies for not giving an example. model.matrix was useful as comparing that table with the one from the spreadsheet showed the "mispell". On 19/02/2008, Douglas Bates <[EMAIL PROTECTED]> wrote: > > On Feb 19, 2008 8:41 AM, <[EMAIL PROTECTED]> wrote > > > on a simpl

Re: [R] fitted values are different from manually calculating

2008-02-19 Thread Douglas Bates
On Feb 19, 2008 8:41 AM, <[EMAIL PROTECTED]> wrote > on a simple linear model the values produced from the fitted(model) function > are difference from manually calculating on calc. Will anyone have a clue... > or any insights on how fitted function calculates the values? Thank you. ___

Re: [R] fitted values are different from manually calculating

2008-02-19 Thread Dimitris Rizopoulos
stat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 19, 2008 3:41 PM Subject: [R] fitted values are different from manually calculating > Hello, > > on a simple linear model

Re: [R] fitted values are different from manually calculating

2008-02-19 Thread john seers (IFR)
alculated values do not match? Or have I misunderstood your question? Regards JS --- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 19 February 2008 14:41 To: [EMAIL PROTECTED] Subject: [R] fitted values are different from

[R] fitted values are different from manually calculating

2008-02-19 Thread gatemaze
Hello, on a simple linear model the values produced from the fitted(model) function are difference from manually calculating on calc. Will anyone have a clue... or any insights on how fitted function calculates the values? Thank you. -- -- Yianni [[alternative HTML version deleted]] __

Re: [R] fitted values in LMER for the fixed-effects only

2007-10-02 Thread Douglas Bates
On 9/29/07, Dieter Menne <[EMAIL PROTECTED]> wrote: > On 9/28/07, Anouk Simard bio.ulaval.ca> wrote: > > > > I would like to extract the fitted values from a model using LMER but > > > only for the fix portion of the model and not for the fix and random > > > portion (e.g it is the procedure outpm

Re: [R] fitted values in LMER for the fixed-effects only

2007-09-29 Thread Dieter Menne
On 9/28/07, Anouk Simard bio.ulaval.ca> wrote: > > I would like to extract the fitted values from a model using LMER but > > only for the fix portion of the model and not for the fix and random > > portion (e.g it is the procedure outpm or outp in SAS). .. Quoting Douglas Bates stat.wisc.edu> >

Re: [R] fitted values in LMER for the fixed-effects only

2007-09-28 Thread Douglas Bates
On 9/28/07, Anouk Simard <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to extract the fitted values from a model using LMER but > only for the fix portion of the model and not for the fix and random > portion (e.g it is the procedure outpm or outp in SAS). I am aware of > the procedure fitted()

[R] fitted values in LMER for the fixed-effects only

2007-09-28 Thread Anouk Simard
Hi, I would like to extract the fitted values from a model using LMER but only for the fix portion of the model and not for the fix and random portion (e.g it is the procedure outpm or outp in SAS). I am aware of the procedure fitted() but I not sure it give the fitted values both for the fixe