Statalist


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

st: question about histograms


From   Katie Vigilante <[email protected]>
To   [email protected]
Subject   st: question about histograms
Date   Mon, 23 Feb 2009 16:51:53 -0500

my students are using stata 10.0; we are launching stata through the university server. unfortunately, many of the students are having trouble using the histogram command through the graphics pull down menu; it works fine on my desktop with a hard version of stata installed.

They continue to get an awkward result....the instruction I founf for this sort of issue were "update swap" but when I have them try this, the result is that the program fails to engage because it is being used by another user. I shut down the system and started over to no avail.

it's very frustrating to me and the students and i really wish I could help them. any suggestions?

thanks.
prof. vigilante

On Feb 8, 2009, at 2:33 AM, statalist-digest wrote:

statalist-digest Sunday, February 8 2009 Volume 04 : Number 3330



** Send unsubscribe or help commands to [email protected] **

The digest contains:

st: AUTO: Jaai Parasnis is out of the office.
[none]
st: RE:
Re: st: Marginal effect after -clogit- and -xtlogit-
st: Re:
st: Re:
st: prediction in loglinear regression model
st: update sheafcoef
st: re: prediction in loglinear regression model
Re: AW: AW: st: round () if
st: data reorganization
st: RE: data reorganization
Re: st: RE: data reorganization
st: Interaction terms in fixed effects analysis
st: How to detect the change of i over t?

----------------------------------------------------------------------

Date: Sat, 07 Feb 2009 19:13:57 +1100
From: Jaai Parasnis <[email protected]>
Subject: st: AUTO: Jaai Parasnis is out of the office.

I will be out of the office starting Fri 02/06/2009 and will not return
until Mon 02/23/2009.

I am on leave and overseas till Mon 23/02/2009. Please contact Felicity Milne ([email protected]) in case of any inquires. I will
respond to your message when I return.


Note: This is an automated response to your message statalist-digest V4
#3329 sent on 7/2/09 6:33:05 PM.
You will receive a notification for each message you send to this person
while the person is away.

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

------------------------------

Date: Sat, 7 Feb 2009 11:29:29 -0500
From: Antonio Silva <[email protected]>
Subject: [none]

Hello Statlist:
I have an OLS model that looks like this: y = constant + b + c + d + e + f. c is the variable in which I am most interested. In the basic model, c turns out NOT to be significant (it is not even close). However, when I include an interaction term in the model, c*f, c turns out to be highly significant. So the new model looks like this: y = constant + b + c + d + e + f + c*f. The interaction term, c*f, is highly significant as well (though in many versions f is NOT significant). My question is this: Is it defensible JUST to report the results of the fully specified model--that is, the one with the interaction? I kind of feel bad knowing that the first model does not produce the results I desire (I am very happy c ends up significant in the full model--it helps support my hypothesis). I have heard from others that if the variable of interest is NOT significant without the interaction term in the model but IS significant WITH the interaction term, I should either a) report the results of both models; or b) assume the data are screwy and back away...
What do you all think?
Thanks so much.
Antonio Silva
_________________________________________________________________
Windows Live?: Keep your life in sync.
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_022009


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

------------------------------

Date: Sat, 7 Feb 2009 12:00:08 -0500
From: "Benjamin Villena Roldan" <[email protected]>
Subject: st: RE:

Antonio,
The correct answer must come from the theoretical considerations of your model. Do you a have a reasonable argument to justify this interaction term? Does it make sense for your theory? Be aware that marginal response of your
dependent variable with respect to C depends on the level of your F
variable. What does it mean?

- -----Mensaje original-----
De: [email protected]
[mailto:[email protected]] En nombre de Antonio Silva
Enviado el: Saturday, February 07, 2009 11:29 AM
Para: Stata list
Asunto:

Hello Statlist:
I have an OLS model that looks like this: y = constant + b + c + d + e + f. c is the variable in which I am most interested. In the basic model, c turns
out NOT to be significant (it is not even close).
However, when I include an interaction term in the model, c*f, c turns out
to be highly significant.
So the new model looks like this: y = constant + b + c + d + e + f + c*f. The interaction term, c*f, is highly significant as well (though in many
versions f is NOT significant).
My question is this: Is it defensible JUST to report the results of the fully specified model--that is, the one with the interaction? I kind of feel bad knowing that the first model does not produce the results I desire (I am very happy c ends up significant in the full model--it helps support my hypothesis). I have heard from others that if the variable of interest is NOT significant without the interaction term in the model but IS significant WITH the interaction term, I should either a) report the results of both
models; or b) assume the data are screwy and back away...
What do you all think?
Thanks so much.
Antonio Silva
_________________________________________________________________
Windows LiveT: Keep your life in sync.
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_0220
09


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

------------------------------

Date: Sat, 7 Feb 2009 12:00:24 -0500 (EST)
From: "Supnithadnaporn, Anupit" <[email protected]>
Subject: Re: st: Marginal effect after -clogit- and -xtlogit-

Yes, this helps! Thanks Maarten and Steven.

Anupit

- ----- "Steven Samuels" <[email protected]> wrote:

Maarten is correct: -predict(pu0)- gives the predicted probability
when the intercept is zero.  However, zero may not be a plausible
value.  For example: consider an unconditional model Y= logit(P) = a

+ ln(2)X, corresponding to OR = 2.0, for a one-unit increase in X.
If the likely range of probabilities is 0.01 to 0.30, the
corresponding range of Y is about -4.60 to -0.85.  If X > -1, then a

= 0 is not possible.

-Steve
On Feb 6, 2009, at 3:01 PM, Maarten buis wrote:


--- On Fri, 6/2/09, Supnithadnaporn, Anupit wrote:
I analyze the data using both -clogit- and -xtlogit fe-
commands. I would like to get the marginal effect of each
independent variables in the model. However, -mfx- command
does not work after both -clogit- and -xtlogit fe-, giving
the error

predict() expression  unsuitable for marginal effect
calculation
r(119);

Would anyone please suggest me how to get the marginal
effect after running -clogit- and -xtlogit fe-?

-mfx, predict(pu0)-


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

------------------------------

Date: Sat, 7 Feb 2009 12:18:35 -0500
From: Gabi Huiber <[email protected]>
Subject: st: Re:

This result simply says that the marginal effect of whatever regressor
c is the slope of is not a constant. Instead, it depends on the size
of whatever regressor f is the slope of. Namely, it's equal to
c+c*f*[whatever regressor f is the slope of].

Was your theory suggesting otherwise? If not, pick (a). If yes, why
would these particular data say otherwise? Based on the answer to this
question you may be right to consider (b), but the other alternative
is that the data are fine and your theory's screwy.

Gabi

On Sat, Feb 7, 2009 at 11:29 AM, Antonio Silva <[email protected]> wrote:
Hello Statlist:
I have an OLS model that looks like this: y = constant + b + c + d + e + f. c is the variable in which I am most interested. In the basic model, c turns out NOT to be significant (it is not even close). However, when I include an interaction term in the model, c*f, c turns out to be highly significant. So the new model looks like this: y = constant + b + c + d + e + f + c*f. The interaction term, c*f, is highly significant as well (though in many versions f is NOT significant). My question is this: Is it defensible JUST to report the results of the fully specified model--that is, the one with the interaction? I kind of feel bad knowing that the first model does not produce the results I desire (I am very happy c ends up significant in the full model--it helps support my hypothesis). I have heard from others that if the variable of interest is NOT significant without the interaction term in the model but IS significant WITH the interaction term, I should either a) report the results of both models; or b) assume the data are screwy and back away...
What do you all think?
Thanks so much.
Antonio Silva
_________________________________________________________________
Windows Live?: Keep your life in sync.
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_022009


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

------------------------------

Date: Sat, 7 Feb 2009 18:30:05 +0100
From: "Martin Weiss" <[email protected]>
Subject: st: Re:

<>

Stata reserves its most comprehensive postestimation suite of commands
for -regress- accessible via -help regress_postestimation-. Make use of
them...

BTW, are you sure OLS is appropriate for your underlying theoretical model? I grew up with the OLS estimator during my econometrics education, but have
concluded that it simply does not get you published...

HTH
Martin
_______________________
- ----- Original Message -----
From: "Antonio Silva" <[email protected]>
To: "Stata list" <[email protected]>
Sent: Saturday, February 07, 2009 5:29 PM


Hello Statlist:
I have an OLS model that looks like this: y = constant + b + c + d + e +
f.
c is the variable in which I am most interested. In the basic model, c
turns out NOT to be significant (it is not even close).
However, when I include an interaction term in the model, c*f, c turns out
to be highly significant.
So the new model looks like this: y = constant + b + c + d + e + f + c*f. The interaction term, c*f, is highly significant as well (though in many
versions f is NOT significant).
My question is this: Is it defensible JUST to report the results of the fully specified model--that is, the one with the interaction? I kind of
feel bad knowing that the first model does not produce the results I
desire (I am very happy c ends up significant in the full model--it helps support my hypothesis). I have heard from others that if the variable of interest is NOT significant without the interaction term in the model but IS significant WITH the interaction term, I should either a) report the results of both models; or b) assume the data are screwy and back away...
What do you all think?
Thanks so much.
Antonio Silva
_________________________________________________________________
Windows LiveT: Keep your life in sync.
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t1_allup_howitworks_022009


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

------------------------------

Date: Sat, 7 Feb 2009 15:23:50 -0500
From: Kit Baum <[email protected]>
Subject: st: prediction in loglinear regression model

<>
     'LEVPREDICT': module to compute log-linear level predictions
without retransformation  bias

DESCRIPTION/AUTHOR(S)

     levpredict is a post-estimation command for use after a
     log-linear regression model has been estimated. It generates
     predictions of the levels of the dependent variable for the
     estimation sample. These predictions avoid the retransformation
     bias that arises when predictions of the log dependent variable
     are exponentiated. See Cameron and Trivedi, MUS, 2009, 3.6.3.

     KW: log-linear model
     KW: regression
     KW: retransformation bias

     Requires: Stata version 9.2

     Distribution-Date: 20090207

     Author: Christopher F Baum, Boston College
     Support: email [email protected]


INSTALLATION FILES                           (type net install
levpredict)
     levpredict.ado
     levpredict.hlp
- -------------------------------------------------------------------------------------------
(type -ssc install levpredict- to install)



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/

------------------------------

Date: Sat, 7 Feb 2009 20:58:52 +0000 (GMT)
From: Maarten buis <[email protected]>
Subject: st: update sheafcoef

Thanks to Kit Baum a update of the -sheafcoef- package is now available from SSC. -sheafcoef- is described below. Martin Weiss pointed out an error in the help-file, and -sheafcoef- mis-labeled the constant when the -eform- option was specified. These problems have been fixed. To update -sheafcoef- type -ssc install sheafcoef, replace- or -adoupdate-.

- -- Maarten

- -sheafcoef- is a post-estimation command that estimates sheaf
coefficients (Heise 1972). A sheaf coefficient assumes that a block of
variables influence the dependent variable through a latent variable.
This assumption is not tested, nor is it testable; a sheaf coefficient
is just a different way of presenting the results from a model. Its
main usefulness is in comparing the relative strength of the influence
of several blocks of variables. For example, say we want to know what
determines the probability of working non-standard hours (evenings,
nights, and weekends) and we have a block of variables representing
characteristics of the job and another block of variables representing
the family situation of the respondent, and we want to say something
about the relative importance of job characteristics versus family
situation. In that case one could estimate a logit model with both
blocks of variables and optionally some other control variables. After
that one can use -sheafcoef- to display the effects of two latent
variables, family background and job characteristics, which are both
standardized to have a standard deviation of 1, and can thus be more
easily compared.

- -----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room N515

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
- -----------------------------------------





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

------------------------------

Date: Sat, 7 Feb 2009 16:39:37 -0500
From: Kit Baum <[email protected]>
Subject: st: re: prediction in loglinear regression model

<>	
Maarten Buis pointed out that the term 'loglinear regression model'
may be ambiguous, as it is used in some contexts to refer to a type of
ANOVA. The routine
- -levpredict- works with a standard linear regression model in which
the dependent variable is the logarithm of the variable of interest,
and does not (necessarily) refer to any sort of ANOVA model. I have
updated the help file to make that clear (thanks, Maarten).

Kit

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/

------------------------------

Date: 07 Feb 2009 21:43:06 +0000
From: Shehzad Ali <[email protected]>
Subject: Re: AW: AW: st: round () if

Thanks again, Martin and Jeph. This works perfectly.

Shehzad

On Feb 6 2009, Martin Weiss wrote:


<>


You can nest those -cond()-s, see
http://www.stata-journal.com/sjpdf.html?articlenum=pr0016




HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Shehzad Ali
Gesendet: Freitag, 6. Februar 2009 17:16
An: [email protected]
Betreff: Re: AW: st: round () if

Thank you, Jeph and Martin. This was really helpful.

To add further, is it possible to add another condition to round off weeks
0 and <1.5 to become 1 instead of zero while keeping the previous
condition alive?

Regards,
Shehzad

On Feb 6 2009, Martin Weiss wrote:


<>

Good solution, and in one line. Careful with 1 and 2, though. Does Ali
really want them to become zero?

*************
clear*
set obs 30
gen weeks=_n
gen newweek=cond(abs(round(week,12)-week)<=2,round(week,12),week)
list
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Jeph Herrin
Gesendet: Freitag, 6. Februar 2009 16:56
An: [email protected]
Betreff: Re: st: round () if


Assuming your week is integers

gen newweek=cond(abs(round(week,12)-week)<=2,round(week,12),week)

should do.

hth,
Jeph


Shehzad Ali wrote:
Hi listers,

I want to round a variable 'week' if it is within 2 weeks range of
multiples of 12 week. So 10 weeks should become 12 weeks while 9 weeks should not change. Similarly 21 weeks would not change while 25 weeks will change to 24 weeks. Is there a way to do it in Stata using - round-
or other command?

Thank you,
Shehzad
*
*   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/


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

------------------------------

Date: Sat,  7 Feb 2009 18:07:56 -0500 (EST)
From: Arina Viseth <[email protected]>
Subject: st: data reorganization

Dear all,

I have a question regarding how to re-organize my data on stata.

Here is how the data currently looks:

Indice Year
1      1990
1      1991
2      2000
2      2001
2      2003
3      1995
3      1996
4      2002

Would it be possible to re-arrange the data so that I would have the following:

Indice  Year
1       1990, 1991
2       2000, 2001, 2003
3       1995, 1996
4       2002


Any suggestion would be very much appreciated. Thank you in advance.

Arina

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

------------------------------

Date: Sat, 7 Feb 2009 18:44:26 -0500
From: "Steichen, Thomas J." <[email protected]>
Subject: st: RE: data reorganization

I can't imagine a reason for wanting this but the following code will do so (but in new variables).

levelsof indice, l(i)
qui gen newindice = .
qui gen newyear = ""
local j = 1
foreach index of local i {
 levelsof year if indice == `index', l(yrs) s(", ")
 qui replace newindice = `index' in `j'
 qui replace newyear = "`yrs'" in `j'
 local j = `j' + 1
}

- -----------------------------------
Thomas J. Steichen
[email protected]
- -----------------------------------

- -----Original Message-----
From: [email protected] [mailto:[email protected] ] On Behalf Of Arina Viseth
Sent: Saturday, February 07, 2009 6:08 PM
To: [email protected]
Subject: st: data reorganization

Dear all,

I have a question regarding how to re-organize my data on stata.

Here is how the data currently looks:

Indice Year
1      1990
1      1991
2      2000
2      2001
2      2003
3      1995
3      1996
4      2002

Would it be possible to re-arrange the data so that I would have the following:

Indice  Year
1       1990, 1991
2       2000, 2001, 2003
3       1995, 1996
4       2002


Any suggestion would be very much appreciated. Thank you in advance.

Arina

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

CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.

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

------------------------------

Date: Sat,  7 Feb 2009 19:11:44 -0500 (EST)
From: Arina Viseth <[email protected]>
Subject: Re: st: RE: data reorganization

Thank you very much!

Arina

- ---- Original message ----
Date: Sat, 7 Feb 2009 18:44:26 -0500
From: [email protected] (on behalf of "Steichen, Thomas J." <[email protected]>)
Subject: st: RE: data reorganization
To: "'[email protected]'" <[email protected] >

I can't imagine a reason for wanting this but the following code will do so (but in new variables).

levelsof indice, l(i)
qui gen newindice = .
qui gen newyear = ""
local j = 1
foreach index of local i {
levelsof year if indice == `index', l(yrs) s(", ")
qui replace newindice = `index' in `j'
qui replace newyear = "`yrs'" in `j'
local j = `j' + 1
}

-----------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------

-----Original Message-----
From: [email protected] [mailto:[email protected] ] On Behalf Of Arina Viseth
Sent: Saturday, February 07, 2009 6:08 PM
To: [email protected]
Subject: st: data reorganization

Dear all,

I have a question regarding how to re-organize my data on stata.

Here is how the data currently looks:

Indice Year
1      1990
1      1991
2      2000
2      2001
2      2003
3      1995
3      1996
4      2002

Would it be possible to re-arrange the data so that I would have the following:

Indice  Year
1       1990, 1991
2       2000, 2001, 2003
3       1995, 1996
4       2002


Any suggestion would be very much appreciated. Thank you in advance.

Arina

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

CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.

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

------------------------------

Date: Sat,  7 Feb 2009 23:44:27 -0500
From: [email protected]
Subject: st: Interaction terms in fixed effects analysis

Hi,

I'm using panel data to analyze the effect of educational expenditure per student on test scores across 100 Indian districts over two years. Now, these 100 districts belong to three different states. To capture the different effect of expenditure on test scores across the three states, I used the *xi* command to interact *perstudent* and *state*, with state as the group variable. I'm using both OLS and Fixed Effects regression (the OLS regression table is
below). However, I'm not quite sure how to interpret the regression
coefficients. I have three specific questions:

1. In OLS, is the effect of expenditure in State 2 on *testscore* 11.16 units more than State 1? Or is it 11.16 - 0.0068 (-0.0068 is the coefficient on the
interaction between state 2 and expenditure)

2. In Fixed Effects, _Istate_2 and _Istate_3 were dropped. _IstaXpers~2 and _IstaXpers~3 were not. How would one interpret the coefficients on IstaXpers~2
and _IstaXpers~3 in the Fixed Effects model?

3. Does the coefficient on *perstudent* indicate that increasing expenditure across *all three states* is decreasing testscores by 0.0025 units? Or does
*perstudent* refer to a specific state?

Thank you. I really appreciate your taking the time to help.

Regards,
Tara Iyer

. xi: reg testscore i.state*perstudent

i.state _Istate_1-3 (naturally coded; _Istate_1 omitted)
i.state*perst~t   _IstaXperst_#       (coded as above)

Source | SS df MS Number of obs = 230 - -------------+------------------------------ F( 5, 224) = 22.51 Model | 15291.7444 5 3058.34888 Prob > F = 0.0000 Residual | 30436.1777 224 135.875793 R-squared = 0.3344 - -------------+------------------------------ Adj R- squared = 0.3196 Total | 45727.9221 229 199.685249 Root MSE = 11.657

- ------------------------------------------------------------------------------ ner | Coef. Std. Err. t P>|t| [95% Conf. Interval] - ------------- +---------------------------------------------------------------- _Istate_2 | 11.15724 7.264148 1.54 0.126 -3.157571 25.47205 _Istate_3 | 10.23105 6.075904 1.68 0.094 -1.742197 22.20429 perstudent | -.0024748 .0013051 -1.90 0.059 -. 0050468 .0000971 _IstaXpers~2 | -.0067742 .0022988 -2.95 0.004 -.0113042 -.0022441 _IstaXpers~3 | -.0020089 .0016681 -1.20 0.230 -. 0052961 .0012783 _cons | 97.34217 2.719425 35.80 0.000 91.98324 102.7011

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

------------------------------

Date: Sat, 7 Feb 2009 21:46:46 -0700
From: Benson Limann <[email protected]>
Subject: st: How to detect the change of i over t?

Hi all:

I am using an unbalanced panel dataset. i is ID and t is time. Every (i,t) has a characteristic x=0 or 1.

I want to generate a variable called "become" such that for each (i,t):

become=1, if x=0 at time t-1, and x=1 at time t
become=0, otherwise

How to write it? My primary concern is how to deal with the first t for each i--this observation does not have t-1.

Any suggestion would be greatly appreciated.

Ben


_________________________________________________________________
Windows Live?: E-mail. Chat. Share. Get more ways to connect.
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_allup_howitworks_022009
*
*   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/

------------------------------

End of statalist-digest V4 #3330
********************************

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