Displaying 20 results from an estimated 10000 matches similar to: "Solving A System of Equations"
2011 Aug 14
1
Solving a equation
Hi there, I have following equations to be solved for a and b:
a/(a+b) = x1
ab/((a+b)^2 (a+b+1)) = x2
Is there any direct function available to solve them without
disentangling them manually? Thanks for your help.
2007 Jul 24
1
Passing equations as arguments
Friends,
I'm trying to pass an equation as an argument to a function. The idea is as follows. Let us say i write an independent function
Ideal Situation:
ifunc <- function(x)
{
return((x*x)-2)
}
mainfunc <- function(a,b)
{
evala <- ifunc(a)
evalb <- ifunc(b)
if (evala>evalb){return(evala)}
else
return(evalb)
}
Now I want to try and write this entire program in a single
2008 Sep 09
1
Addendum to wishlist bug report #10931 (factanal) (PR#12754)
--=-hiYzUeWcRJ/+kx41aPIZ
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Hi,
on March 10 I filed a wishlist bug report asking for the inclusion of
some changes to factanal() and the associated print method. The changes
were originally proposed by John Fox in 2005; they make print.factanal()
display factor correlations if factanal() is called with rotation =
2007 May 23
1
I made some progress on my previous "systemfit" question but still not quite there
Surprisingly, I played around with some test code and below actually
creates equations that look correct.
tempmat<-matrix(10,nrow=6,ncol=6)
restrictmat<-diag(6)
colnames(tempmat)<-c("AUD.l1","CHF.l1","CAD.l1","GBP.l1","EUR.l1","JPY.l
1")
2008 Aug 25
1
Displaying Equations in Documentation
I'm currently working on writing up some documentation for some of my
code, but am having the darndest time coding in equations. For
example, the equation in the following:
\details{ Calculated the R Squared for observed endogenous variables
in a structural equation model, as well as several other useful
summary statistics about the error in thoe variables.
R Squared values are
2002 Mar 04
1
Solving quadratic functions
I'm examining the use of the 'lm' function to solve quadratic functions.
With S+ 2000, the 'lm' function can be used to solve eqns such as x1 + x2 +
x1^2 + x2^2 + x1*x2.
But, when trying this same eqn with R, the software does not produce any
coefficients for x1^2 or x2^2.
Is this a common problem?
I'm using ver. 1.3.1 under Win. 2000.
Thanks, Peter
2011 Feb 02
2
Using MathJax in R's help system
Hi,
I am doing a small experiment to test if I can use
MathJax ( official site: http://www.mathjax.org )
in R's html help pages (i.e. options(help_type='html'))
and it seems working with some minor modifications.
The screenshot (rendered by Firefox 4.0 beta and with STIX fonts) of
the help page in html format with MathJax enabled is at the following
url:
2003 Oct 17
2
nlm, hessian, and derivatives in obj function?
I've been working on a new package and I have a few questions regarding the
behaviour of the nlm function. I've been (for better or worse) using the nlm
function to fit a linear model without suppling the hessian or gradient
attributes in the objective function. I'm curious as to why the nlm requires
31 iterations (for the linear model), and then it doesn't work when I try to
add
2003 Oct 12
1
Rd problems --- followup
I should'nt have sent the last mail so fast.
Same problem with
\eqn{u_j = a_j + b x + c x^2, \quad j=1, \ldots, r-1}
{u[j] = a[j] + b*x + c*x^2 j = 1,\dots,r-1}
I thought the problem in the first case could have to do with
the use use of \mbox{} (with the braces) within the arguments
of \eqn, but here there are none braces in the arguments of \eqn{}{}.
Another case giving the
2005 Nov 17
4
problem with \eqn (PR#8322)
Full_Name: Ross Boylan
Version: 2.2.0
OS: Linux
Submission from: (NULL) (65.175.48.58)
\eqn{{\bf\beta}_j}{b(j)} in my .Rd file produces this error
--------------------------------------------
! Missing $ inserted.
<inserted text>
$
l.7 \eqn{{\bf\beta}_j}{\bf\beta}_
jnormal-bracket5bracket-normal{b(j)}
--
! Missing $ inserted.
<inserted
2006 Oct 02
1
Trig.Rd typo (PR#9269)
Full_Name: Robin Hankin
Version: 2.4.0 RC
OS: MacOSX 10.4.7
Submission from: (NULL) (139.166.242.29)
The first cut line described in Trig.Rd for asin() is incorrect in the ascii
version of the manpage.
The Rd file reads:
For \code{asin()} and \code{acos()}, there are two cuts, both along
the real axis: \eqn{\left(-\infty, -1\right]}{\(-Inf, 1\]} and
Note the inconsistency between the
2008 Dec 19
1
Misuse of $<matn expressions>$ in Rd files
'Writing R Extensions' tells you that $ needs to be escaped in Rd files
outside \code and similar. So I was surprised to find that ca 80 CRAN
packages have constructions like (from ISwR)
\item{\code{folate}}{
a numeric vector, folate concentration ($\mu$g/l).
}
This does not render sensibly in non-latex conversions, and it is what we
have \eqn{} for.
That $ needs to be
2015 Sep 07
2
Build rpm package for R-MKL
I want to create a clean .rpm package for R built with MKL and ICC. I
follow Fedora instrcutions[0] to create the package. As a base, I use
the R-3.2.2.src.rpm.
I am left with this error:
------------------------------------------
installing R info pages ...
updating '/usr/share/info/dir' ...
make[1]: Leaving directory '/home/poisonivy/rpmbuild/BUILD/R-3.2.2/doc/manual'
+ mv
2009 Oct 18
1
function to convert lm model to LaTeX equation
Dear list,
I've tried several times to wrap my head around the Design library,
without much success. It does some really nice things, but I'm often
uncomfortable because I don't understand exactly what it's doing.
Anyway, one thing I really like is the latex.ols() function, which
converts an R linear model formula to a LaTeX equation.
So, I started writing a latex.lm() function
2004 Jan 20
2
Error: unknown identifier {|} in tabular format {|l|c|c|c|}
I've got a package I would like to send out for testing and have noticed a
"problem" with the \tabular portion of the help "compiler"
the code for inserting vertical lines, in the tabular environment, causes
the build to choke, but not the check command.
C:\>rcmd build --binary -docs=all nlsystemfit
\tabular{|l|c|c|c|}{
\hline
Method \tab Instruments \tab
2006 Feb 24
1
help with optimize statement
Can some help me spot what I'm doing wrong here.
I have two equations, one a michalis-menton eqn and one a straight line.
I need to work out where they cross.
I created the function:
solveEqn<-function(x,vals){
Vmax<-vals[1]
Ks<-vals[2]
m<-vals[3]
c<-vals[4]
diff<-0
mmVal<-exp(Vmax+x/(Ks+x))
slVal<-x*m+c
diff<-mmVal-slVal
return(diff)
}
>
2012 Sep 20
3
Problem with Newton_Raphson
Hello,
I have being trying to estimate the parameters of the?generalized?exponential distribution. The random number generation for the GE distribution is?x<-(-log(1-U^(1/p1))/b), where U stands for uniform dist. The data i have generated to estimate the parameters is right censored and the code is given below; The problem is that, the newton-Raphson approach isnt working and i do not know what
2003 Oct 12
6
Rd problems
Hola!
I have the following in a .Rd file:
\eqn{\mbox{coef} = c(\mbox{coef}[1],\ldots, \mbox{coef}[n]) }
{coef = c(coef[1], coef[2], \dots, coef[n])}
However, both arguments come out in the latex file!
Whats happening?
Kjetil Halvorsen
2010 Apr 26
2
Using optim function for logistic model simulation
Hello!
I'm a college undergrad desperately trying to finish up my thesis. I
have a dataset on the distribution of a grassland bird from the
Breeding Bird Survey. I have a very straightforward and simple version
of the logistic growth model to describe changes in this bird's
abundance over time. The variables are the natural birth rate,
mortality, and carrying capacity. The equation itself
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard