Statalist


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

st: RE: marksample


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: marksample
Date   Thu, 11 Sep 2008 12:30:08 +0100

-marksample- is not part of Mata. It is a Stata command.

It marks observations, not variables. 

It produces a new temporary variable, not a matrix. 

It is possible to use -marksample- independently of -syntax-: 

. sysuse auto
(1978 Automobile Data)

. local if "2 == 2"

. marksample touse, novarlist

. su `touse'

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
    __000000 |        74           1           0          1          1

However, it is usual to use -marksample- after -syntax-, or after a set
of commands that produced similar results. I can't think up a different
kind of situation in which -marksample- is the command of choice. 

Nick 
[email protected] 

Ashim Kapoor

I am trying to learn MATA. I have a query. What is marksample ? Does
it  return a matrix  with 0's in place of variables which are NOT
marked. Is it ONLY used after syntax ?

I did not find the help very useful. Can someone please shed some
light on this ?


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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