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   "Silcocks Paul" <>
To   <>
Subject   RE: st: regression with coefficients at a set value
Date   Sun, 13 May 2007 20:44:44 +0100

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 

tel +44 115  9515151 x 30514
Direct line: +44 115 8230505. 
General office: +44 115 8230500
fax +44 115 8230515

-----Original Message-----
[] On Behalf Of Richard
Sent: 11 May 2007 21:39
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.
          mpg |  -22.03124   50.85898    -0.43   0.665     -121.713
       weight |          2          .        .       .            .
        _cons |   595.5436   1121.893     0.53   0.596    -1603.325

If none of this answers your question, please clarify what the question

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu

*   For searches and help try:

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:

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