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]

Re: st: RE: constraint in regression and forval


From   Bruno Schoumaker <[email protected]>
To   [email protected]
Subject   Re: st: RE: constraint in regression and forval
Date   Tue, 23 Mar 2010 08:38:13 +0100

Thank you so much ! It works :-)
Bruno

Le 22/03/2010 19:03, Nick Cox a écrit :
Try

constraint 1 dumy97 = `= xalea[`i']'

Nick
[email protected]

SCHOUMAKER Bruno

I want to run a series of 100 constrained regressions with different
constraints randomly selected from a normal distribution

I tried use the following program, but it looks like the constriant is
ignored. When I define the constraint to be equal to a number (eg.
constraint 1 dumy97=0.03), it works... but I want the constraint to
change automatically.

Has anyone an idea on how I could do this (use randomly selected
constraints for a large number of models) ?

Thank you in advance

Bruno

*****

generate xalea = rnormal()*0.0645+0.028

forvalues i = 1(1) 100 {
constraint 1 dumy97 = xalea[`i']
xi: poisson _d i.ageg rcsp1-rcsp4 v1-v4 dumy97, exposure(exposy)
const(1)
}


*
*   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/


--
Bruno Schoumaker
Institut de démographie
Universite catholique de Louvain
1/17 Place Montesquieu
1348 Louvain-la-Neuve (Belgium)
Tel. 32 10 474136
bureau a191

[email protected]

*
*   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