Displaying 20 results from an estimated 8000 matches similar to: "can R solve these paired equations"
2007 Dec 19
2
can optimize solve paired euqations?
I used the command below, but R gives me the error message--syntax error.
can anyone see the mistakes I made?
optimize(function(x,y)
+ ((327.727-(1-0.114^10)*y*(1-x)/x/(1-x^y))+(9517.336-327.727 *(1+(1-x)*(1+y)/x-327.727)))^2
+ interval=c(0,1))
At the same time, I use nlm() but R gives me the code
$code
[1] 3
function(vals) {
x <- vals[1]
y <- vals[2]
2010 Feb 02
1
how to use optim() or nlm() to solve three nonlinear equations
Dear all,
I just know how to solve an eaquation by using optim() or nlm(). But, now, I have three nonlinear equations,
how could we use optim() or nlm() to solve a system of nonlinear equations in R? Thank you so much.
Sincerely,
Joe
___________________________________________________
您的生活即時通 - 溝通、娛樂、生活、工作一次搞定!
[[alternative HTML version deleted]]
2008 Mar 26
5
S4 slot with NA default
Hi
How do I specify an S4 class with a slot that is potentially numeric,
but NA
by default? I want the slot to be NA until I calculate its value
(an expensive operation, not needed for all applications). When
its value is
known, I will create a new object with the correct value inserted in
the slot.
I want "NA" to signify "not known".
My attempt fails because
2008 Jul 19
2
How to solve systems of nonlinear equations in R?
Hey,
I was wondering if there existed a R function similar to 'fsolve' or
'fzero' Matlab functions?
Thanks!
Francois Aucoin
[[alternative HTML version deleted]]
2013 May 30
1
wilcox_test function in coin package
Dear All,
I have two simple data samples (no groups or factors, etc.) and would just
like to compute the two-sample Wilcoxon Rank Sum test using the wilcox_test
function contained in the coin package, which is reportedly better than the
regular wilcox.test function because it performs some adjustment for ties.
Would anyone know how to craft a script to perform this task? Much
appreciated.
Janh
2008 Feb 16
3
how to specify the location of tick mark on x axies
Dear:
I want to plot barplot and let bar be in the middle of each x axis category.
Do you have this experience?
Many Thanks!
Xin
[[alternative HTML version deleted]]
2007 Dec 19
3
array addition
Hi
suppose I have two arrays x1,x2 of dimensions a1,b1,c1 and
a2,b2,c2 respectively.
I want x = x1 "+" x2 with dimensions c(max(a1,a2), max(b1,b2),max
(c1,c2))
with
x[a,b,c] = x1[a1,b1,c1] + x2[a2,b2,c2] if a <=min(a1,a2) , b<=min
(b1,b2), c<=min(c1,c2)
and the other bits either x1 or x2 or zero according to whether the
coordinates
are "in range" for
2008 Apr 25
5
Non-linear system of equations
Hello R users,
I am trying to estimate the parameters of a bimodal normal distribution using moments matching, so I have to solve a non-linear system of equations. How can I solve the following simple example?
x^2 - y^2 = 6
x ? y = 3
I heard about nlsystemfit, but I don?t know how to run it exactly. I have tried the following code, but it doesn?t really work:
f1 <-y~ x[1]^2-x[2]^2-6
f2
2009 Jan 14
2
how to read data from the different worksheets in the same Excel file
Dear All:
I am trying to read the data from the different sheet but in the same Excel
file. Does R provide this kind of command to do it?
Anyone has experience on this?
Thanks!
Xin
[[alternative HTML version deleted]]
2005 Sep 07
1
solving a system of nonlinear equations
What is the "classic" R function for solving a (possibly over
determined) system of non-linear equations?
Thank you!
Moshe Olshansky
e-mail: moshe.olshansky@brevanhoward.com
The information transmitted is intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or
2011 Nov 15
1
Estimating model parameters for system of equations
Hi all,
I'm trying to estimate model parameters in R for a pretty simple system of
equations, but I'm having trouble. Here is the system of equations (all
derivatives):
eqAlgae <- (u_Amax * C_A) * (1 - (Q_Amin / Q_A))
eqQuota <- (p_max * R_V) / (K_p + R_V) - ((Q_A-Q_Amin)*u_Amax)
eqResource <- -C_A * (p_max * R_V) / (K_p + R_V)
eqSystem <- list(C_A = eqAlgae, Q_A = eqQuota,
2003 Sep 04
3
function is too long to keep source
Dear R users,
I am trying to minimise a function using "nlm".
I am getting the following error message: "Error: function is too long to
keep source"
The function is really very long (about 100 A4 pages).
Is there anything I could do to solve this problem?
At the moment I am using "nlmin" in S-Plus with no problems but I'd prefer
to use R.
Thank you very
2008 Feb 04
2
a != a*1 != a+0 != +a
hits=1.0 tests=MANY_EXCLAMATIONS
X-USF-Spam-Flag: NO
Hi
I am writing a package for multivariate polynomials ('multipols')
using S3 methods.
The package includes a Ops.multipol() function for the
arithmetic methods; I would like
to define some sort of user-specified Boolean option which, if
set, would force results to be simplified as they are produced.
Call this option
2008 May 07
1
optional setValidity()
Hi
Suppose I have an S4 class "foo" and a validity checking
function ".checkfoo()":
setClass("foo", representation=representation("numeric"))
setValidity("foo" , .checkfoo)
is fine; in my application, .checkfoo() verifies that a bunch
of necessary conditions are met.
But .checkfoo() is very time consuming and I want
to give users the option
2008 Apr 10
2
how to read data from table based a condition
Dear All:
I imported a table into R. But I want to read a variable (y) from this table conditional on another variable (x=1) in the table.
y<-data[,7]
x<-data[,3]
I want to know the mean of y if corresponding x=1.
I tried
if (x==1) y3<-y
It does not work.
Anyone can give a help?
Thanks!
Xin
[[alternative HTML version deleted]]
2008 Apr 14
3
how to add different type of lines (short dash, long dash) into current plot)
Dear
I try to add three different lines (solid, short dash, long dash) in to current barplot. I saw there are types of lines ("p","b", ect). However, they are not what I request. Has nayone have this experience?
Many Thanks!
Xin
[[alternative HTML version deleted]]
2008 Jan 14
2
as.function()
Hi
[this after some considerable thought as to R-help vs R-devel]
I want to write a (S3) method for as.function();
toy example follows.
Given a matrix "a", I need to evaluate trace(ax) as a function of
(matrix) "x".
Here's a trace function:
tr <- function (a) {
i <- seq_len(nrow(a))
return(sum(a[cbind(i, i)]))
}
How do I accomplish the following:
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
2006 May 16
1
r-help@stat.math.ethz.ch
Dear All:
I tried to fit negative binomial distribution to data in terms of mean and mean is also a quadratic function of another variable. The likelihood function is:
function (parameters, y1,x11)
{
p<-parameters[1]
alpha1<-parameters[1]
beta1<-parameters[2]
delta1<-parameters[3]
mu<-alpha1+beta1*(x11)+delta1*(x11^2)
ifelse(y1>=0|x11>=0,
L<-
2006 Nov 15
1
OPTIM--non finite finite different [13]
Dear All:
I used optim() to minimise the loglikelihood function for fitting data to negative binomial distribution. But there initial value of log-likelihood and iteration 10 value are reasonable. for example:
initial value 1451657.994524
iter 10 value 47297.534905
iter 20 value -623478636.8236478
Then the iter 20 vlaue suddelnly changes to a negative value and in the end the error mesage is