similar to: Reversing the Equation to find value of variable

Displaying 20 results from an estimated 2000 matches similar to: "Reversing the Equation to find value of variable"

2011 Mar 25
1
Appending data to a data.frame and writing a csv
Dear R helpers exposure <- data.frame(id = c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20), ead = c(9483.686,50000,6843.4968,10509.37125,21297.8905,50000,706152.8354, 62670.5625, 687.801995,50641.4875,59227.125,43818.5778,52887.72534,601788.7937, 56813.14859,4012356.056,1419501.179,210853.4743,749961,6599.0862), pd =
2012 Jul 18
4
The best solver for non-smooth functions?
# Hi all, # consider the following code (please, run it: # it's fully working and requires just few minutes # to finish): require(CreditMetrics) require(clusterGeneration) install.packages("Rdonlp2", repos= c("http://R-Forge.R-project.org", getOption("repos"))) install.packages("Rsolnp2", repos= c("http://R-Forge.R-project.org",
2020 Oct 06
0
Solving a simple linear equation using uniroot give error object 'x' not found
On 06/10/2020 11:00 a.m., Sorkin, John wrote: > Colleagues, > I am trying to learn to use uniroot to solve a simple linear equation. I define the function, prove the function and a call to the function works. When I try to use uniroot to solve the equation I get an error message, > Error in yfu n(x,10,20) : object 'x' not found. > > I hope someone can tell we how I can fix
2007 Mar 29
1
ansari.test.default: bug in call to uniroot?
A recent message on ansari.test() prompted me to play with the examples. This doesn't work for me in R version 2.4.1 R> ansari.test(rnorm(100), rnorm(100, 0, 2), conf.int = TRUE) Error in uniroot(ab, srange, tol = 1e-04, zq = qnorm(alpha/2, lower = FALSE)) : object "ab" not found It looks like there's a small typo in ccia() inside ansari.test.default() in which
2020 Oct 06
4
Solving a simple linear equation using uniroot give error object 'x' not found
Colleagues, I am trying to learn to use uniroot to solve a simple linear equation. I define the function, prove the function and a call to the function works. When I try to use uniroot to solve the equation I get an error message, Error in yfu n(x,10,20) : object 'x' not found. I hope someone can tell we how I can fix the problem
2007 Dec 27
0
build problems, part II
This is a follow-up from a recent email where I described problems in the rakefile system. I got the library to build, but it has problems with unresolved symbols. Here is the list of symbols that are unresolved from wx: undefined symbol: _ZN12wxStringBase8InitWithEPKcjj (/home/rwa/linux-packages/ruby-1.8.6 /lib/ruby/site_ruby/1.8/i686-linux/wxruby2.so) undefined symbol: _ZNK8wxString3CmpEPKc
2012 Mar 24
1
Solving the equation using uniroot
Hello all, I was going to solve (n-m)! * (n-k)! = 0.5 *n! * (n-m-k)! for m when values of n and k are provided n1<-c(10,13,18,30,60,100,500)         # values of n kx<-seq(1,7,1);                               # values of k slv2<-lapply(n1,function(n){    slv1<-lapply(kx,function(k){              lhs<-function(m)              {                
2009 Jun 09
1
Problem : solving a equation with R , fail with uniroot function
Hi , I would like to know if a R function have the same behaviour than the matlab solve function. I tried something with uniroot but I have some problems: The equation I need to solve is : exp(c0-r0)*(bb0+x)*(bb1-x)=(bb0+x+1)(bb1-x-1) So I tried this: STEP 1: my function test test <- function(x,bb0=-3,bb1=5,c0=2,r0=0) { + ((exp(c0-r0)*(bb0+x)*(bb1-x))/((bb0+x+1)(bb1-x-1))-1)} STEP 2: >
2007 Dec 28
0
[ wxruby-Bugs-16672 ] Compile error on Linux with URLDataObject.cpp
Bugs item #16672, was opened at 2007-12-28 15:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=16672&group_id=35 Category: Compile/build Group: None Status: Open Resolution: None Priority: 3 Submitted By: Alex Fenton (brokentoy) Assigned to: Alex Fenton (brokentoy) Summary: Compile error on Linux with URLDataObject.cpp Initial Comment: % gcc
2010 May 01
1
Solving equation
Hello, I want to solve: x*(3^x)*log(4)-x*log(4/3)-(3^x)+1=0 for x. I used the following code, uniroot(function(x) x*(3^x)*log(4)-x*log(4/3)-(3^x)+1, lower = -2, upper = 2, tol = 0.001 ) While using this I am getting the following error. Can anyone please help me out. Error in uniroot(function(x) x * (3^x) * log(4) - x * log(4/3) - (3^x) + : f() values at end points not of opposite sign.
2007 Mar 19
1
Row wise solving an equation
Hello R-list, How can I row wise solve a function for which the input variables are written in a matrix or a vector and have the calculated output added to the matrix or written in a vector? To specify my case in particular I continue: I would like R to calculate for me a value for ‘t’ which is function of input parameters A and B, which are comprised in a matrix called ‘ddt’ and some other
2012 Oct 17
1
how R implement qnorm()
how R implement qnorm() I wonder anyone knows the mathematical process that R calculated the quantile? The reason I asked is soly by curiosity. I know the probability of a normal distribution is calculated through integrate the Gaussian function, which can be implemented easily (see code), while the calculation of quantile (or Zα) in R is a bit confusing as it requires inverse error function (X
2012 Apr 07
1
Uniroot error
Dear All I am trying to find a uniroot of a function within another function (see example) but I am getting an error message (f()values at end points not of opposite sign). I was wondering if you would be able to advise how redefine my function so that I can find the solution. In short my first function calculates the intergrale which is function of "t" , I need to find the uniroot of
2011 Sep 03
3
question with uniroot function
Dear all, I have the following problem with the uniroot function. I want to find roots for the fucntion "Fp2" which is defined as below. Fz <- function(z){0.8*pnorm(z)+p1*pnorm(z-u1)+(0.2-p1)*pnorm(z-u2)} Fp <- function(t){(1-Fz(abs(qnorm(1-(t/2)))))+(Fz(-abs(qnorm(1-(t/2)))))} Fp2 <- function(t) {Fp(t)-0.8*t/alpha} th <- uniroot(Fp2, lower =0, upper =1,
2010 Aug 27
1
Band-wise Sum
Hi I have a large credit portfolio (exceeding 50000 borrowers). For particular process I need to add up the exposures based on the bands. I am giving a small test data below. rating <- c("A", "AAA", "A", "BBB","AA","A","BB", "BBB", "AA", "AA", "AA", "A", "A",
2010 Aug 30
2
Band-wise Conditional Sum - Actual problem
Dear R helpers, Thanks a lot for your earlier guidance esp. Mr Davind Winsemius Sir. However, there seems to be mis-communication from my end corresponding to my requirement. As I had mentioned in my earlier mail, I am dealing with a very large database of borrowers and I had given a part of it in my earlier mail as given below. For a given rating say "A", I needed to have the bad-wise
2012 Oct 14
1
Finding root of quadratic equation
Dear R Helpers, I need to find the root of following equationy=x^2+3*x-1 by substitution a random number from less to more in the certain segment.I had tried using this codef <- function (x) x^2+x-12str(xmin <- uniroot(f, c(2, 4), tol = 0.0001)) but $ f.root : num -7.85e-07not 0, and so I'm not shure it's right code and satisfactory answer. Please guide. sveta -- View this
2011 Dec 07
1
removing specified length of text after a period in dataframe of char's
Dear all, I'm trying to remove some text after the period (a decimal point) in the data frame 'hi', below. This is one step in formatting a table. So I would like e.g. "2.0" to become "2" and "5.3" to be "5.3", where the variable digordered contains the number of digits after the decimal that I would like to display, in the same order in which
2007 Apr 25
4
How to solve difficult equations?
This below is not solvable with uniroot to find "a": fn=function(a){ b=(0.7/a)-a (1/(a+b+1))-0.0025 } uniroot(fn,c(-500,500)) gives "Error in uniroot(fn, c(-500, 500)) : f() values at end points not of opposite sign" I read R-help posts and someone wrote a function: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/92407.html but it is not very precise. Is there any
2011 Aug 15
2
A small nag
Hi, I am not sure how to fix the following error. LGD <- c(11.6, 12.3, 15.8, 33.1, 43.5, 51.3, 67.3, 84.9) cor (x=(file [1:47231,3:10]), y= rep (LGD, 47231), method = "pearson") Error in cor(x = (file[1:47231, 3:10]), y = rep(LGD, 47231), method = "pearson") : incompatible dimensions > sessionInfo() R version 2.13.0 (2011-04-13)