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?
Penalized spline regression, -pspline- or otherDear Statalisters: I am looking at estimating some penalized spline models. I noticed that there wa…
How to store and export results from a MCA estimationHello dear stata users, I am currently performing a Multiple Correspondance Analysis estimation on s…
How to generate growth rates in a 5 year framework on unbalanced panel data?Hello Stata Community, I am trying to compute the growth rates of gdp per capita per country as sho…
Potential bug in ivreg2?In ivreg2 the option "savesfirst" is supposed to "save the first-stage and reduced form estimations …
Identifying specific observations for which an assert statement is falseHi, I used the code below to check if all the observations for a particular variable (var1) within …
Subscribe to:
Post Comments (Atom)
0 Response to Does minbound run with logs?
Post a Comment