Re: [R] Orthogonal polynomials used by R / another perspective

2019-11-28 Thread Bert Gunter
sted in the > >>> regression coefficients, why not just use a "raw" polynomial: > >>>> > >>>> ------- snip --- > >>>> > >>>>> (m1 <- lm(y ~ poly(x, 4, raw=TRUE))) > >>>> > >>>> Call:

Re: [R] Orthogonal polynomials used by R / another perspective

2019-11-28 Thread J C Nash
raw = TRUE)3 >>>> 1 1 1 1 >>> 1 >>>> 2 1 2 4 >>> 8 >>>> 3 1 3 9 >

Re: [R] Orthogonal polynomials used by R

2019-11-28 Thread Fox, John
;>> poly(x, 4, raw = TRUE)4 0.870.96 >> 0.99 >>>poly(x, 4, raw = TRUE)4 >>> poly(x, 4, raw = TRUE)10.87 >>> poly(x, 4, raw = TRUE)20.96 >

Re: [R] Orthogonal polynomials used by R

2019-11-28 Thread Michael Dewey
ret/39051154#39051154 Cheers Petr -Original Message- From: R-help On Behalf Of Ashim Kapoor Sent: Wednesday, November 27, 2019 12:55 PM To: R Help Subject: [R] Orthogonal polynomials used by R Dear All, I have created a time trend by doing x<-1:93 because I have a time serie

Re: [R] Orthogonal polynomials used by R

2019-11-28 Thread Ashim Kapoor
Hamilton, Ontario, Canada > > Web: http::/socserv.mcmaster.ca/jfox > > > > > On Nov 27, 2019, at 10:17 AM, Ashim Kapoor > wrote: > > > > > > Dear Petr, > > > > > > Many thanks for the quick response. > > > > > >

Re: [R] Orthogonal polynomials used by R

2019-11-28 Thread Fox, John
be used to evaluate it via the three-term recursion given in > > Kennedy & Gentle (1980, pp. 343-4), and used in the ‘predict’ part > > of the code. > > > > I don't have access to the mentioned book. > > > > Out of curiosity, what is the name of the

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread Ashim Kapoor
e one is usually not interested in the individual coefficients of >> a >> > polynomial there usually isn't a reason to prefer one parametrization to >> > the other on the grounds of interpretability, so why do you need to >> > interpret the regression equation? >> > >>

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread Bert Gunter
ikipedia.org/wiki/Discrete_orthogonal_polynomials > > > > > > Also I read in ?poly:- > > > The orthogonal polynomial is summarized by the coefficients, which > > > can be used to evaluate it via the three-term recursion given in > > >

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread Ashim Kapoor
tioned book. > > > > Out of curiosity, what is the name of the discrete orthogonal polynomial > > used by R ? > > What discrete measure is it orthogonal with respect to ? > > > > Many thanks, > > Ashim > > > > > > > > > > On Wed, No

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread Fox, John
> <https://stackoverflow.com/questions/39031172/how-poly-generates-orthogonal-polynomials-how-to-understand-the-coefs-ret/39051154#39051154> >> >> Cheers >> Petr >> >>> -Original Message- >>> From: R-help On Behalf Of Ashim Kapoor >>&g

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread PIKAL Petr
: Re: [R] Orthogonal polynomials used by R Dear Petr, Many thanks for the quick response. I also read this:- https://en.wikipedia.org/wiki/Discrete_orthogonal_polynomials Also I read in ?poly:- The orthogonal polynomial is summarized by the coefficients, which can be used to evaluate

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread Ashim Kapoor
low.com/questions/39031172/how-poly-generates-orthogonal-polynomials-how-to-understand-the-coefs-ret/39051154#39051154> > > Cheers > Petr > > > -Original Message- > > From: R-help On Behalf Of Ashim Kapoor > > Sent: Wednesday, November 27, 2019 12:55 PM &g

Re: [R] Orthogonal polynomials used by R

2019-11-27 Thread PIKAL Petr
November 27, 2019 12:55 PM > To: R Help > Subject: [R] Orthogonal polynomials used by R > > Dear All, > > I have created a time trend by doing x<-1:93 because I have a time series > with 93 data points. Next I did :- > > y = lm(series ~ poly(x,4))$residuals >

[R] Orthogonal polynomials used by R

2019-11-27 Thread Ashim Kapoor
Dear All, I have created a time trend by doing x<-1:93 because I have a time series with 93 data points. Next I did :- y = lm(series ~ poly(x,4))$residuals to detrend series. I choose this 4 as the order of my polynomial using cross validation/ checking the absence of trend in the residuals so