Displaying 20 results from an estimated 200 matches similar to: "poly(*,*) in lm() (PR#8972)"
2010 Dec 08
1
I want to get smoothed splines by using the class gam
Hi all,
I try to interpolate a data set in the form:
time Erg
0.000000 48.650000
1.500000 56.080000
3.000000 38.330000
4.500000 49.650000
6.000000 61.390000
7.500000 51.250000
9.000000 50.450000
10.500000 55.110000
12.000000 61.120000
18.000000 61.260000
24.000000 62.670000
36.000000 63.670000
48.000000 74.880000
I want to get smoothed splines by using the class gam
The first way I tried , was
2004 Jul 20
0
Interpretation of poly(x, y, degree=2) coefficients
Does anyone know of a function that turns the coefficients of
lm( y~ poly(x1 , x2, degree=2))
into something that can be interpreted easily. I was think along the
lines of the matrix representation of quadratic forms:
(x-mu)'A(x-mu) +k ,
and finding the eigenvectors/values of A, and the vector mu, but anything
that allows me to visualise a contour plot would be great.
Thanks
Simon Bond
2007 Feb 12
1
How to get the polynomials out of poly()
Hi Folks!
Im using the function poly to generate orthogonal polynomials, but Id like
to see the actual polynomials so that I could convert it to a polynomial
in my original variable. Is that possible and if so how do I do it?
/E
2011 Sep 07
0
Poly-phase Filters in R
Hello List,
I am trying to do the following:
1. Use a BandPassFilter h[n] on a series x[n]
2. Then Decimate the series by a factor D such that y[k]=x[k*D]
The decimation factor is considerable (10,000) so that filtering before the
decimation, using convolve(), seems foolish.
Can you think of an R implementation for a polyphase filter, that uses the
fact that most samples will be thrown away...?
2016 Jul 07
2
Poly Perf 11 broken?
Hi Tobi,
http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly
Looks like one of your boxes are bad and the other is good, but since
they're both on the same bot, it looks to use as if it's unstable,
spamming people every other build. :)
Can you have a look, please?
cheers,
--renato
2002 Nov 25
1
Contr.poly for n > 100 (PR#2326)
Full_Name: David Clifford
Version: Version 1.5.1 (2002-06-17)
OS: Red Hat 7.3
Submission from: (NULL) (128.135.149.55)
For n values above 100 there appears to be a bug in contr.poly(n).
The contrast matrix should have rank n-1.
Running the code below gives output (ie errors) at n=98, 100
and every value greater than 102.
for(n in 2:150)
{
K <- contr.poly(n)
rnk <-
2008 Apr 23
0
poly() can exceed degree k - 1 for k distinct points (PR#11251)
The poly() function can create more variables than can be fitted when
there are replicated values. In the example below, 'x' has only 5
distinct values, but I can apparently fit a 12th-degree polynomial with
no error messages or even nonzero coefficients:
R> x = rep(1:5,3)
R> y = rnorm(15)
R> lm(y ~ poly(x, 12))
Call:
lm(formula = y ~ poly(x, 12))
Coefficients:
2010 Aug 03
0
Issue with prediction from lm object with poly
DDear developeRs,
about a year ago, Alex Stolpovsky posted an issue with predict.lm on a
fit generated using poly with the raw=TRUE option and too few new data
(slightly modified reproducible example below). Alex did not get any
reply. I have just stumbled on the same problem, and I think that this
is a bug of function poly, which arises from the check whether the
polynomial degree is
2002 Apr 03
1
arima0 with unusual poly
Dear R People:
Suppose I want to estimate the parameters of the
following AR model:
(1 - phi_1 B - phi_2 B^2 - phi_9 B^9) x_t = a_t
and I want to use the arima0 command from the
ts library.
How would I use the order subcommand, please?
R Version 1.4.1 for Windows.
Thanks!
Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston -
2002 Jul 03
0
poly.transform in R
Dear all,
I am trying to transform polynomial coefficients from orthogonal form to
the standard power basis. There's poly.transform in S-plus. Does anybody
know how to do that in R ? I've found question about that in the
archives of R-help but no real answer.
Example : I'm doing polynomial regression of percentage of one insect in
a community on altitude, precipitations,
2008 Jul 01
1
Orthogonal polynomials and poly
Dear All,
I have found in the poly help this sentence:
The orthogonal polynomial is summarized by the coefficients, which can 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.
My question: which type of orthogonal polynomials are used by this function?
Hrmite, legendre..
TIA
Giovanni
[[alternative HTML
2009 Jun 04
0
Dropping terms from regression w/ poly()
Hello r-help,
I'm fitting a model with lm() and using the orthogonal polynomials
from poly() as my basis:
dat <- read.csv("ConsolidatedData.csv", header=TRUE)
attach(dat)
nrows <- 1925
Rad <- poly(Radius, 2)
ntheta <- 14
Theta <- poly(T.Angle..deg., ntheta)
nbeta <- 4
Beta <- poly(B.Beta..deg., nbeta)
model.1 <- lm( Measurement ~ Block + Rad + Theta + Beta
2009 Jun 10
1
gpc.poly datatype
I have a list of polygons generated by the contourLines() command (each
object of the list is a list in itself with two objects: a vector of x
values, and a vector of y values for each vertex). I wish to convert that
list into a gpc.poly object of multiple contours. How do I do this? gpclib
apparently has no method of coercing lists into the gpc.poly object type.
As well, when I have a
2009 Jul 13
0
problem predict/poly
Dear R experts,
I am observing undesired behavior of predict(fit, newdata), in case when fit object is produced by lm() involving a poly(). Here is how to reproduce:
x <- c(1:10)
y <- sin(c(1:10))
fit <- lm(formula=y~poly(x, 5, raw=TRUE))
predict(fit, newdata=data.frame(x=c(1:10))) ## this works
predict(fit, newdata=data.frame(x=c(1:1))) ## this is broken, error below
Error in poly(x,
2009 Jul 17
1
poly objects as data frame columns
Dear UseRs,
I just learnt that the number of columns of a data frame is not always what
I thought it to be, and I wonder where I should have learnt about this.
Consider the following example:
dat <- data.frame(X1=1:10, X2=LETTERS[1:10])
ncol(dat) ## evaluates to 2 (of course)
dat$X1poly <- poly(dat$X1,3)
dat ## five columns displayed
ncol(dat) ##
2009 Nov 28
1
R function that duplicates Octave's poly function?
By any chance is anyone aware of an R function that duplicates Octave's poly function?
Here is a description of Octave's poly function:
Function File: poly (A)
If A is a square N-by-N matrix, `poly (A)' is the row vector of
the coefficients of `det (z * eye (N) - a)', the characteristic
polynomial of A. As an example we can use this to find the
eigenvalues
2012 Mar 14
0
using predict() with poly(x, raw=TRUE)
Dear r-devel list members,
I've recently encountered the following problem using predict() with a model
that has raw-polynomial terms. (Actually, I encountered the problem using
model.frame(), but the source of the error is the same.) The problem is
technical and concerns the design of poly(), which is why I'm sending this
message to r-devel rather than r-help.
To illustrate:
2010 Jan 08
1
[LLVMdev] integrate LLVM Poly into existing LLVM infrastructure
hi all,
On 2010-1-7 0:11, John Mosby wrote:
> In LLVM we could add support for generalized CFG regions and
> RegionPasses. A region is a part of the CFG. The only information we
> have is, that it has one entry and one exit, this it can be optimized
> separately.
> I think this is the best way to add region analysis. I must admit
> this approach
> helps me on another,
2009 Dec 17
1
poly() with unnormalized values
How can I get the result of, e.g., poly(1:3. degree=2) to give me the
unnormalized integer coefficients
usually used to explain orthogonal polynomial contrasts, e.g,
-1 1
0 -2
1 1
As I understand things, the columns of x^{1:degree} are first centered
and then
are normalized by 1/sqrt(col sum of squares), but I can't
see how to relate this to what is returned by poly().
>
2001 Jul 09
1
polynomial regression and poly
When doing polynomial regression I believe it is a good idea to use the poly
function to generate orthogonal polynomials. When doing this in Splus there
is a handy function (transform.poly I think) to convert the coefficients
produced by regression with the poly function back to the original scale.
Has somebody written something similar for R ?
Robert