I am using minbound to find the solution to an equation the involves log (equivalent to solver in Excel). Results are not produced.when a log function is included. There is not any problem with the exp function. I show an example below ( I have a more complicated equation, so it is not possiible to use algebra to eliminate the logs). This should be easy (in Excel this is produced easily, but I need to solve this for thousands of observations). Do you know a solution?
program drop find_x
program find_x, rclass
version 1
args x f
return scalar fx = (-14139276- (`f' - ln(1-`x')) )^2
end
minbound find_x , arg( 0.33407511) range(0,1)
disp r(x)
program drop find_x
program find_x, rclass
version 1
args x f
return scalar fx = (-2- (`f' - exp(1-`x')) )^2
end
minbound find_x , arg( 0.33407511) range(0,1)
disp r(x)
Related Posts with Does minbound run with logs?
Problem with xtpdynI am trying to estimate a probit model with xtpdyn. However, when I run Code: xtpdyn hnpl gdp lir …
XTABOND2 and unit root test and measure of structural breakDear Professors, I am using xtabond2 for my research (System GMM) My questions are the following; 1.…
Why Use Stata?I've found this brief article interesting (https://www.theanalysisfactor.com/why-use-stata/). …
Is it possible to "export delimited" with variable labels instead of variable names?Dear Statalisters, I'm quite new to Stata and I've run into what seems like a very "basic" problem.…
Event Study - Loop for calculating CARsHello everyone. I am trying to do a loop to calculate CARs (Cumulative Abnormal returns) for an Eve…
Subscribe to:
Post Comments (Atom)
0 Response to Does minbound run with logs?
Post a Comment