Page 1 of 1

Help with Dummy Variables

Posted: Sat Apr 22, 2017 10:56 am
by Mej12
Hi,

I have a dummy variable and i only want to include the observations that are '0' and leave out the '1' observations. I sorted the variable so that all the 0s will come first. I then tried to change the number of observations so that it will only include the '0's, but this came up with an error. Could someone please help with this? How can I ensure I'm only including the '0' observations in my model?

Re: Help with Dummy Variables

Posted: Sat Apr 22, 2017 11:11 am
by startz
smpl if dummy=0

Re: Help with Dummy Variables

Posted: Sat Apr 22, 2017 11:57 am
by Mej12
smpl if dummy=0
Hi, thank you for replying. I'm not too sure what you mean. Could you clarify your earlier comment?

Re: Help with Dummy Variables

Posted: Sat Apr 22, 2017 2:24 pm
by startz
smpl if dummy=0
Hi, thank you for replying. I'm not too sure what you mean. Could you clarify your earlier comment?
Type in that command and only observations where variable equals zero will be included.

Re: Help with Dummy Variables

Posted: Tue Apr 25, 2017 8:31 am
by Mej12
smpl if dummy=0
Hi, thank you for replying. I'm not too sure what you mean. Could you clarify your earlier comment?
Type in that command and only observations where variable equals zero will be included.
Thank you for your help, startz :)