Re: [R] Optimization

From: Robert A LaBudde <ral_at_lcfltd.com>
Date: Mon, 18 Jun 2007 12:38:16 -0400

You don't need optimization for the solution to your problem. You just need an understanding of the meaning of qnorm() and some simple algebra.

Try: x<- (0.01-0.0032)/qnorm(0.7,0,1)

At 12:01 PM 6/18/2007, you wrote:

>Hi, I would like to minimize the value of x1-x2, x2 is a fixed value of 0.01,
>x1 is the quantile of normal distribution (0.0032,x) with probability of
>0.7, and the changing value should be x. Initial value for x is 0.0207. I am
>using the following codes, but it does not work.
>
>fr <- function(x) {
> x1<-qnorm(0.7,0.0032,x)
> x2=0.01
> x1-x2
>}
>xsd <- optim(0.0207, fr, NULL,method="BFGS")
>
>It is the first time I am trying to use optimization. Could anyone give me
>some advice?

>--
>View this message in context:
>http://www.nabble.com/Optimization-tf3941212.html#a11178663
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>R-help_at_stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral_at_lcfltd.com
Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
824 Timberlake Drive                     Tel: 757-467-0954
Virginia Beach, VA 23464-3239            Fax: 757-467-2947

"Vere scire est per causas scire"



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 18 Jun 2007 - 16:47:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Jun 2007 - 17:32:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.