Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: regression with coefficients at a set value


From   Maarten buis <[email protected]>
To   [email protected]
Subject   RE: st: regression with coefficients at a set value
Date   Sun, 13 May 2007 22:10:17 +0100 (BST)

The version of -regress- that allows constraints is called -cnsreg-,
see: -help cnsreg-. To get F-value after test type -return list-, that
will show that the F-value is stored as r(F). 

Hope this helps,
Maarten

--- Silcocks Paul <[email protected]> wrote:

> Many thanks - What I wanted to do was set up significance limits for
> a
> parameter (as opposed to confidence limits), for which I'd need to
> force
> the regression coeffcient to be whatever it should be under H0
> (typically 0).  I'd looked at help constraint but didn't find it that
> helpful; the example I tried was with regress (which doesn't support
> constraints) so I'll try again with glm.  Using the test option might
> work if I can extract the F value (though I'd need the se|H0 as well)
> 
> 
> 
> Paul Silcocks BM BCh, MSc, FRCPath, FFPH, CStat Clinical Senior
> Lecturer
> 
> Nottingham Clinical Trials Support Unit
> Room B39 
> School of Community Health Sciences 
> University of Nottingham Medical School 
> Nottingham
> NG7 2UH
> 
> tel +44 115  9515151 x 30514
> Direct line: +44 115 8230505. 
> General office: +44 115 8230500
> fax +44 115 8230515
> 
> e-mail [email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Richard
> Williams
> Sent: 11 May 2007 21:39
> To: [email protected]
> Subject: Re: st: regression with coefficients at a set value
> 
> At 07:07 AM 5/11/2007, Silcocks Paul wrote:
> >What is the best way to perform a multiple regression-type analysis 
> >(Cox, Poisson, glm etc) with some or all of the regression
> coefficients
> 
> >constrained to a fixed value (not necessarily all the same)?
> 
> I'm not clear on the question.  Do you mean, how do you impose
> constraints?  If so, see
> 
> help constraint
> 
> and also check the help for whatever command you are using.  Not all
> commands support a constraints option, but sometimes there is a
> similar
> command that will.  For example, ologit does not support the
> constraints
> option but the user-written -oglm- does (rather slowly, mind you, but
> it
> does support them). Also, Jeroen Weesie's -linest- command can be
> quite
> handy for commands that do not otherwise support constraints.
> 
> Also, depending on your purposes, some commands support an offset
> and/or
> exposure option.
> 
> Also, the -test- command includes a -coef- option, which reports
> estimated constrained coefficients, e.g.
> 
> . quietly reg price mpg weight
> 
> . test weight=2, coef
> 
>   ( 1)  weight = 2
> 
>         F(  1,    71) =    0.16
>              Prob > F =    0.6939
> 
> 
> Constrained coefficients
> 
>
------------------------------------------------------------------------
> ------
>               |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
> Interval]
>
-------------+----------------------------------------------------------
> -------------+------
>           mpg |  -22.03124   50.85898    -0.43   0.665     -121.713
> 77.65053
>        weight |          2          .        .       .            .
> .
>         _cons |   595.5436   1121.893     0.53   0.596    -1603.325
> 2794.413
>
------------------------------------------------------------------------
> ------
> 
> If none of this answers your question, please clarify what the
> question
> is.
> 
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology
> OFFICE: (574)631-6668, (574)631-6463
> HOME:   (574)289-5227
> EMAIL:  [email protected]
> WWW:    http://www.nd.edu/~rwilliam
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> This message has been checked for viruses but the contents of an
> attachment
> may still contain software viruses, which could damage your computer
> system:
> you are advised to perform your own checks. Email communications with
> the
> University of Nottingham may be monitored as permitted by UK
> legislation.
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


		
___________________________________________________________ 
Yahoo! Messenger - with free PC-PC calling and photo sharing. http://uk.messenger.yahoo.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index