Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: how to search the optimal parameter


From   econqian222 <[email protected]>
To   [email protected]
Subject   st: how to search the optimal parameter
Date   Wed, 2 May 2012 12:42:11 -0700 (PDT)

Hi,everyone
    I'm searching for an optimal value of "a" belong to the scale [1.05,
131.5] at interval that is 0.05, “b" belong to the scale of [0, (a-1)/a] at
interval that is (a-1)/30a
    To minimize the sum of "u^2" by each value of code(1,2,3,4,...), where
u=y-ax1-bx2, we need to search the optimal value of "a" and "b" within their
respective scale and interval for each value of code(1,2,3,4,...).
    How should I write the program for this task?

the format of data goes as following:
code	   y	           x1	          x2
1	4.65605	.7904362	-1.918414
1	8.55465	.388749	-1.823626
1	.5072982	6.095053	-1.758411
2	.0668553	.0946494	-.0795475
2	4.346485	.0366412	.3990744
2	.453282	.6764894	.5537513
2	2.514498	4.424465	-3.335462
3	5.027869	6.576887	5.750454
3	1.121937	5.153405	2.404536
3	.3745422	.2155463	-.2841324
3	1.061227	.0074581	-.0889647
4	3.328544	12.11974	-6.351465
4	.1192554	.3238932	-.196535
4	71.84912	.3888368	5.285602
.	.	             .   	.
.	.	             .   	.

Many thanks in advance,
Qian


--
View this message in context: http://statalist.1588530.n2.nabble.com/how-to-search-the-optimal-parameter-tp7521410.html
Sent from the Statalist mailing list archive at Nabble.com.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index