similar to: solving cubic/quartic equations non-iteratively -- comparisons

Displaying 20 results from an estimated 500 matches similar to: "solving cubic/quartic equations non-iteratively -- comparisons"

2010 Jan 05
4
solving cubic/quartic equations non-iteratively
To R-helpers, R offers the polyroot function for solving mentioned equations iteratively. However, Dr Math and Mathworld (and other places) show in detail how to solve mentioned equations non-iteratively. Do implementations for R that are non-iterative and that solve mentioned equations exists? Regards, Mads Jeppe
2009 Mar 03
0
SAS Macros for R Users Only
I think SAS Macros has capability to call R, and execute it without it being in the picture anywhere. So you can use SAS Macros in a file called R.sas In this you can create a macro called %Describe that can call R , load Hmisc ,run the describe function Note you will need repeated use of %put in this %describe for the mapping to take place Use %INCLUDE to include that file in all SAS
2001 Mar 19
2
A limitation for polyroot ? (PR#880)
Dear R Development Team, I have encountered the following difficulty in using the function polyroot under either NT4.0 (R version 1.2.1) or linux (R version 0.90.1). In the provided example, the non-zero root of c(0,0,0,1) depends on the results of the previous call of polyroot. R : Copyright 2001, The R Development Core Team Version 1.2.1 (2001-01-15) R is free software and comes with
2001 Jul 16
1
polyroot() (PR#751)
In a bug report from Nov.28 2000, Li Dongfeng writes: ----- I have found that the polyroot() function in R-1.1.1(both solaris and Win32 version) gives totally incorrect result. Here is the offending code: # Polyroot bug report: # from R-1.1.1 > sort(abs(polyroot(c(1,-2,1,0,0,0,0,0,0,0,0,0,-2,5,-2,0,0,0,0,0,0,0,0,0,1,-2)))) [1] 0.8758259 0.9486499 0.9731015 1.5419189 1.7466214 1.7535362
2001 Jan 17
2
PR#751
I'd just like to report a possible R bug--or rather, confirm an existing one (bug #751). I have had some difficulty using the polyroot() function. For example, in Win 98, R 1.1.1, > polyroot(c(2,1,1)) correctly (per the help index) gives the roots of 1 + (1*x) + (2*x^2) as [1] -0.5+1.322876i -0.5-1.322876i However, > polyroot(c(-100,0,1)) gives the roots of [1] 10+0i -10+0i
2007 Dec 26
1
Cubic splines in package "mgcv"
R-users E-mail: r-help@r-project.org My understanding is that package "mgcv" is based on "Generalized Additive Models: An Introduction with R (by Simon N. Wood)". On the page 126 of this book, eq(3.4) looks a quartic equation with respect to "x", not a cubic equation. I am wondering if all routines which uses cubic splines in mgcv are based on this quartic
2000 Nov 28
2
BUG: polyroot() (PR#751)
I have found that the polyroot() function in R-1.1.1(both solaris and Win32 version) gives totally incorrect result. Here is the offending code: # Polyroot bug report: # from R-1.1.1 > sort(abs(polyroot(c(1, -2,1,0,0,0,0,0,0,0,0,0,-2,5,-2,0,0,0,0,0,0,0,0,0,1,-2,1)))) [1] 0.8758259 0.9486499 0.9731015 1.5419189 1.7466214 1.7535362 1.7589484 [8] 2.0216317 2.4421509 2.5098488 2.6615572
2005 Aug 19
1
Using lm coefficients in polyroot()
Dear useRs, I need to compute zero of polynomial function fitted by lm. For example if I fit cubic equation by fit=lm(y~x+I(x^2)+i(x^3)) I can do it simply by polyroot(fit$coefficients). But, if I fit polynomial of higher order and optimize it by stepAIC, I get of course some coefficients removed. Then, if i have model y ~ I(x^2) + I(x^4) i cannot call polyroot in such way, because there is
2007 Nov 23
1
complex conjugates roots from polyroot?
Hi, All: Is there a simple way to detect complex conjugates in the roots returned by 'polyroot'? The obvious comparison of each root with the complex conjugate of the next sometimes produces roundoff error, and I don't know how to bound its magnitude: (tst <- polyroot(c(1, -.6, .4))) tst[-1]-Conj(tst[-2]) [1] 3.108624e-15+2.22045e-16i
2011 Aug 16
0
Cubic splines in package "mgcv"
re: Cubic splines in package "mgcv" I don't have access to Gu (2002) but clearly the function R(x,z) defined on p126 of Simon Wood's book is piecewise quartic, not piecewise cubic. Like Kunio Takezawa (below) I was puzzled by the word "cubic" on p126. As Simon Wood writes, this basis is not actually used by mgcv when specifying bs="cr". Maybe the point is
2008 Jul 11
1
Comparing complex numbers
Is there an easy way to compare complex numbers? Here is a small example: > (z1=polyroot(c(1,-.4,-.45))) [1] 1.111111-0i -2.000000+0i > (z2=polyroot(c(1,1,.25))) [1] -2+0i -2+0i > x=0 > if(any(identical(z1,z2))) x=99 > x [1] 0 # real and imaginary parts: > Re(z1); Im(z1) [1] 1.111111 -2.000000 [1] -8.4968e-21 8.4968e-21 > Re(z2); Im(z2) [1] -2
2011 Oct 31
3
How to use IML with R and SAS
Hello, I have a for loop that generates data in R. With the IML program, I would like to analyze data in SAS from each iteration of the for loop in R. It would be helpful if someone could explain to me how to analyze data this way. Thanks [[alternative HTML version deleted]]
2007 Feb 10
1
SAS, SPSS Product Comparison Table
Hi All, My paper "R for SAS and SPSS Users" received a bit more of a reaction than I expected. I posted the link (http://oit.utk.edu/scc/RforSAS&SPSSusers.pdf) about 12 days ago on R-help and the equivalent SAS and SPSS lists. Since then people have downloaded it 5,503 times and I've gotten lots of questions along the lines of, "Surely R can't do for free what [fill in
2009 Feb 17
0
What's the predict procedure of ARIMA in R?
Hello,guys: Recently, I am working on a seasonal ARIMA model. And I met some problem in the forecasting. Now I just want to know that How does R perform the predict procedure(the predict formula, the initial setting of errors,etc.)? I run the following commands and get the original code of the "predict" command, but I can't read it. Can anybody explain it to me? Thanks! saji from
2010 Nov 29
2
R equivalent of Beaton's Sweep algorithm
I'm looking for an R equivalent of Beaton's (1964) Sweep algorithim for partial inversion of a matrix by pivoting. It implemented in SAS/IML as sweep(matrix, indices), described here http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default/langref_sect266.htm and here for python http://adorio-research.org/wordpress/?p=262 -- Michael Friendly Email: friendly AT yorku
2015 Oct 16
2
potencia fracional de un número negativo
El problema del módulo es que pierde el signo. En tu caso sale igual porque has invertido el signo del coeficiente en el polinomio (en realidad se me pasó a a mí advertir que el término independiente debe ir con signo negativo): .> polyroot(z=c(0.5,0,0,0,0,1)) [1] 0.7042902+0.5116968i -0.2690149+0.8279428i -0.2690149-0.8279428i [4] 0.7042902-0.5116968i -0.8705506+0.0000000i .> .>
1999 Nov 12
1
SAS to R translator for particular procedures (fwd)
----------------------------Original message---------------------------- Date: Fri, 12 Nov 99 11:09:05 EST From: Bill Paterson <BAD305 at ukcc.uky.edu> Subject: SAS to R translator for particular procedures To: R-Help <r-help at stat.math.ethz.ch> X-Mailer: MailBook 98.01.000 Message-Id: <991112.111316.EST.BAD305 at ukcc.uky.edu> MIME-Version:
2012 Jan 24
1
problems with rollapply {zoo}
Here is a relatively simple script (with comments as to the logic interspersed): # Some of these libraries are probably not needed here, but leaving them in place harms nothing: library(tseries) library(xts) library(quantmod) library(fGarch) library(fTrading) library(ggplot2) # Set the working directory, where the data file is located, and read the raw data
2013 Mar 22
0
predict.Arima error "'xreg' and 'newxreg' have different numbers of columns"
Hello all, I use arima to fit the model with fit <- arima(y, order = c(1,0,1), xreg = list.indep, include.mean = TRUE) and would like to use predict() to forecast: chn.forecast <- rep(0,times=num.record) chn.forecast[1] <- y[1] for (j in 2:num.record){ indep <- c(aa=chn.forecast[j-1], list.indep[j,2:num.indep]) # this is the newxreg in the
2010 Apr 05
20
SAS and R on multiple operating systems
Hi, This is not meant to be critical of R, but is intended as a possible source for improvements to R. SAS needs the competition. I am reasonably knowledgeable about R SAS-(all products including IML) SAS and R run on Windows(all flavors) UNIX(all flavors) Apple OSs Does R run on natively (no emulation)? We have quite a few users on these systems VAX-VMS Z-OS (mainframe) MVS VM/CMS(IBM)