Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: re: if-sentences in Stata


From   Linn Renée Naper <linn.naper@ecgroup.no>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: re: if-sentences in Stata
Date   Fri, 28 Nov 2008 09:55:04 +0100

Hi again
I just need to be sure that I understand a couple 
of things in your proposed command as it is not 
working exactly as I want it to yet:

1) When you type L.flow is that referring to the
Value in cell [_n-1]?

2) you type flow = (shift == - 1)*..... and then + (shift == 1)*...
Adding the + there and then (shift == 1) means Stata should
execute the last command only if the (shift == 1) is true?

The 2/1 at last means starting in cell 2 and continue in
Steps of 1, right? As you probably understand I am 
Kind of new to programming syntax in Stata.

Thanks,
You are very helpful!!
L
-----Opprinnelig melding-----
Fra: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] På vegne av Kit Baum
Sendt: 27. november 2008 20:34
Til: statalist@hsphsun2.harvard.edu
Emne: st: re: if-sentences in Stata

< >
Linn said

I've tried and it really doesn't matter...
I get the same result.


And that result will presumably be meaningless, as a statement like

if shift == 1

will ever only reference the FIRST observation of the variable shift.  
Given what you have outlined as the logic, I cannot imagine that this  
could be useful. Please see my proposed solution.

Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
*   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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index