Hi,
I wanted to run the logistic regression
Logit k x y z
Under the constraint c1+c2+c3=1 where c1,c2,c3 are the coefficients on x,y,z. This seems easy to do for least squares but I can’t see a way to do it for logit. Any help would be greatly appreciated.
Thanks!
Amber
Simple constraint on logistic regression?
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Simple constraint on logistic regression?
Same as with Least Squares:
Code: Select all
k=c(1)*x+c(2)*y+(1-c(1)-c(2))*z
Re: Simple constraint on logistic regression?
That worked! Thanks!
Is there a way to figure out the Standard Error for the constrained variable (c(3) in this case)?
Amber
Is there a way to figure out the Standard Error for the constrained variable (c(3) in this case)?
Amber
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Simple constraint on logistic regression?
sqrt(var(c(1))+var(c(2))+2cov(c(1),c(2))) I think.
Re: Simple constraint on logistic regression?
Yes, thanks, but where do you find the covariance matrix in the output?
It appears that another way to get the standard error is to run the regression several times while putting the constrained coefficient (1-c(1)-c(2)) on a different explanatory variable each time.
Thanks again!
Amber
It appears that another way to get the standard error is to run the regression several times while putting the constrained coefficient (1-c(1)-c(2)) on a different explanatory variable each time.
Thanks again!
Amber
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Simple constraint on logistic regression?
View/Covariance matrix
Who is online
Users browsing this forum: No registered users and 2 guests
