Displaying 20 results from an estimated 4000 matches similar to: "Solve f(x) = 0"
2005 Aug 12
1
Concerning reading of SAS-files
Hi!
I'm trying to start a credibility estimation study with a coule of data
sets that are created for SAS. The data sets are saved as ".sas7bndx" and
".sas7bdat".
I've tried reading them to R with the function 'read.xport' but this
returns the error message 'Error in lookup.xport(file) : unable to open
file'.
Are there any other functions that one
2005 Jun 24
3
Counterpart for Matlab's 'feval'?
Hi!
I've just begun writing a program that searches for the minimum of a
function with golden section search. In order to do this in a nice way I
need a function that takes a function name and an argument and returns the
function value for that argument, i .e just like Matlab's 'feval'. Is
there any?
Thanks before hand!
Best regards,
Fredrik Thuring, Codan Insurance A/S
2005 Aug 19
3
Handling of tables in R
Hi!
I have a few questions concerning reading of tables from R to
other programs. My main question is if it’s even possible to read a table
created in R (with the functions data.frame and save) to Excel (or
maybe SAS) and if so how does one do this? If I just mark the table in R
and copy-paste to Excel the whole table ends up in one single cell, (of
course). My goal is to
2006 Oct 13
1
NA-handling in glm.fit?
Dear Sir or Madam,
I'm wondering if there is any routine or argument in the function 'glm.fit'
that makes it handle NA's. The function 'glm' can handle NA's but I can't
make make it work (or find anything written on this in the help files) with
'glm.fit'.
Is it even possible in'glm.fit'? How?
Thanks before hand,
Fredrik Thuring, Business Researcher
2006 Apr 10
0
Handling of NA ´s in the matrix multiplication function
Hi!
Is there a way of handling NA?s in the matrix multiplication function
'%*%'? I cant find anything concerning this in the help files. I?m thinking
of some sort of setting such as na.rm=T.
Thanks before hand to anyone how can help me!
Fredrik Thuring, Junior Business Researcher
__________________________________
Codan Forsikring, Gammel Kongevej 60, DK-1790 Copenhagen V
tel: +45 33 55
2009 Jan 11
4
How to get solution of following polynomial?
Hi, I want find all roots for the following polynomial :
a <- c(-0.07, 0.17); b <- c(1, -4); cc <- matrix(c(0.24, 0.00, -0.08,
-0.31), 2); d <- matrix(c(0, 0, -0.13, -0.37), 2); e <- matrix(c(0.2, 0,
-0.06, -0.34), 2)
A1 <- diag(2) + a %*% t(b) + cc; A2 <- -cc + d; A3 <- -d + e; A4 <- -e
fn <- function(z)
{
y <- diag(2) - A1*z - A2*z^2 - A3*z^3 - A4*z^4
2012 Apr 25
3
Intercept between two lines
Dear List,
I know this is not the first post on this topic, but I need basic help I
guess. Assuming the simple case of two lines with one intercept, how can I
make R calculate this intercept, NOT using locator().
par (xaxs="i", yaxs="i")
plot( 1, bty="n" ,xlim=c(0,300) , ylim=c(0,300) , xlab="X", ylab="Y")
curve(100-0.5*x, -50,250, add=T,
2012 Jul 23
2
Solving equations in R
Hi there,
I would like to solve the following equation in R to estimate 'a'. I have
the amp, d, x and y.
amp*y^2 = 2*a*(1-a)*(-a*d+(1-a)*x)^2
test data:
amp = 0.2370 y=
0.0233 d=
0.002 x=
0.091
Can anyone suggest how I can set this up?
Thanks,
Diviya
[[alternative HTML version deleted]]
2007 Jan 31
2
what is the purpose of an error message in uniroot?
Hi all,
This is probably a blindingly obvious question: Why does it matter in
the uniroot function whether the f() values at the end points that you
supply are of the same sign?
For example:
f <- function(x,y) {y-x^2+1}
#this gives a warning
uniroot(f,interval=c(-5,5),y=0)
Error in uniroot(f, interval=c(-5, 5), y = 0) : f() values at end
points not of opposite sign
#this doesn't give a
2008 Apr 12
1
R and Excel disagreement - Goal Seek versus uniroot
Dear friends - occurring in Windows R2.6.2
I am modeling physical chemistry in collaboration with a friend who has
preferred working in Excel. I used uniroot, and find a solution to a two
buffer problem in acid-base chemistry which I believe is physiologically
sensible. Using "goal seek" in Excel my friend found another plausible
root, quite close to zero, and a plot of the function
2002 Mar 19
3
multiroot() anyone?
Dear list, Did anybody have something like multiroot(),
similar to uniroot() only for several varibles/function?
I know the difficulty several varibles bring. But for
nice functions, it can be useful.
We are thinking of writing one....I thought to ask first.
Mai Zhou
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2004 Jul 09
3
analytic solution for equation
Hello,
I have search on R website but do not find any solution.
I would like to know if R has some functionalities to produce analytical results
of equation. or more generally if it contains some functions to simplify equation.
For example:
I would like to obtain x1 from:
x1+x2=8 (x1=8-x2)
x1^2+x2=8 (x1=sqrt(8-x2))
Is is possible in R ? if not, do you know a (free) software that could do the
2005 Jun 08
2
Converting code from MATLAB to R
Hi,
I'm having trouble converting code from MATLAB to R; I want to find the
equivalence to MATLAB's function 'fsolve'. I've tried 'nlm', on the
squared argument, in R but i did not get the same results.
Thankful if helped.
Best regards,
Martin Englund
------------------------------------------------------------------------------
This e-mail and any attachment may
2010 Nov 28
3
non-linear fourth-order differential equations
I need to solve a system of non-linear fourth-order differential
equations. Is there a command which solves this system?
Thanks in advance.
2007 Sep 24
1
Root finding problem
Hello,
I have a problem finding a root of a function, which I define like this:
tuki <- function(u, x, a, lambda){
if((lambda%%1>0) & u<0) {u<-(u+0i)}
f <- Re(x-(a*(u)^lambda-(1-(u))^lambda)/lambda)
f
}
What I want to do is to find the root, but without specifying the
interval within which to search for it. I can do it easily in MATLAB
with fsolve() or fzero() functions.
I
2023 Nov 06
1
non-linear regression and root finding
? Mon, 6 Nov 2023 17:53:49 +0100
Troels Ring <tring at gvdnet.dk> ?????:
> Hence I wonder if I could somehow have non linear regression to find
> the 3 pK values. Below is HEPESFUNC which delivers charge in the
> fluid for known pKs, HEPTOT and SID. Is it possible to have
> root-finding in the formula with nls?
Sure. Just reformulate the problem in terms of a function that
2013 May 30
2
RFC: a "safe" uniroot() function for future R
With main R releases only happening yearly in spring, now is
good time to consider *and* discuss new features for what we
often call "R-devel" and more officially is
R Under development (unstable) (.....) -- "Unsuffered Consequences"
Here is one such example I hereby expose to public scrutiny:
A few minutes ago, I've committed the following to R-devel
(the
2005 Oct 11
2
Sometimes having problems finding a minimum using optim(), optimize(), and nlm() (while searching for noncentral F parameters)
Hi everyone.
I have a problem that I have been unable to determine either the best
way to proceed and why the methods I'm trying to use sometimes fail. I'm
using the pf() function in an optimization function to find a
noncentrality parameter that leads to a specific value at a specified
quantile. My goal is to have a general function that returns the
noncentrality parameter that
2023 Nov 06
2
non-linear regression and root finding
Dear friends - I have a function for the charge in a fluid (water)
buffered with HEPES and otherwise only containing Na and Cl so that [Na]
- [Cl] = SID (strong ion difference) goes from -1 mM to 1 mM. With known
SID and total HEPES concentration I can calculate accurately the pH if I
know 3 pK values for HEPES by finding the single root with uniroot
Now, the problem is that there is some
2006 Aug 07
2
finding x values to meet a y
Hi,
I'd like to find which values of x will give me a y.
In other words, in the example of a gaussian curve, I want to find the values of
x that will give me a density, let's say, of 0.02.
curve(((1/(sqrt(2*pi)*10))*exp(-((x-50)^2)/(2*10^2))),xlim=c(0,100))
Thanks for any help,
Antonio Olinto
-------------------------------------------------
WebMail Bignet - O seu provedor do