SHAZAM Community
Ask Your Question
0

How can I get stat output on obs with a 1 in dummy var?

asked 2014-08-02 14:42:57 +0000

anonymous user

Anonymous

How can I get stat output only on those obs with a 1 in a dummy var?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-08-03 17:45:59 +0000

updated 2014-10-07 23:09:40 +0000

This is easy using the SKIPIF command.

Here is an example:

sample 1 3
read dummy myvar
1 2
0 4
1 5

* Use SKIPIF to calculate statistics for observations only where variable dummy = 1.
skipif(dummy.ne.1)
stat myvar
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2014-08-02 14:42:57 +0000

Seen: 1,700 times

Last updated: Oct 07 '14

Related questions