Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

RE: AW: st: graph interaction in count models


From   Rodolphe Desbordes <rodolphe.desbordes@strath.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: AW: st: graph interaction in count models
Date   Sun, 4 Apr 2010 16:29:20 +0100

Dear Dali,

You certainly got this error because you are estimating more than six parameters. You will have to tweak the code to suit your own needs. You may also wish to look at the following paper:

http://gking.harvard.edu/files/abs/making-abs.shtml

Best regards,

Rodolphe



________________________________________
From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] On Behalf Of D Ma [lrpwhn@yahoo.com]
Sent: 01 April 2010 21:43
To: statalist@hsphsun2.harvard.edu
Subject: Re: AW: st: graph interaction in count models

Thanks, Rodolphe.  I was looking at predicted "counts" in negative binomial modeling.  Also thanks for sending over the codes.  I was unable to execute it for the following step:

. drawnorm b1-b6, n(10000) means(e(b)) cov(e(V)) clear
conformability error
r(503);

May I know how to fix it?  STATA explained that this was due to matrix error (r(503)).

Best regards,

Dali




----- Original Message ----
From: Rodolphe Desbordes <rodolphe.desbordes@strath.ac.uk>
To: "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Sent: Thu, April 1, 2010 11:35:19 AM
Subject: RE: AW: st: graph interaction in count models

Dali,

Are you looking at the impact on predicted "probabilities" or on predicted "values"?

Rodolphe

PS: I think that what I suggested in an earlier answer could fit your needs...

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss
Sent: jeudi 1 avril 2010 16:17
To: statalist@hsphsun2.harvard.edu
Subject: AW: AW: st: graph interaction in count models


<>

" I am using STATA 10."


Mind the FAQ, then... Also, the recent
http://www.stata.com/statalist/archive/2010-04/msg00022.html



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von D Ma
Gesendet: Donnerstag, 1. April 2010 17:10
An: statalist@hsphsun2.harvard.edu
Betreff: Re: AW: st: graph interaction in count models

Thanks, Martin.  I am using STATA 10.

Dali



----- Original Message ----
From: Martin Weiss <martin.weiss1@gmx.de>
To: statalist@hsphsun2.harvard.edu
Sent: Thu, April 1, 2010 10:38:09 AM
Subject: AW: st: graph interaction in count models


<>

"(I also don't know why there were question marks ?? in your codes)"


Those would be wildcards, denoting one character each. See [U], sect.
11.4.1.

Which -version- of Stata do you use?




HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von D Ma
Gesendet: Donnerstag, 1. April 2010 16:35
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: graph interaction in count models

Hi Maarten,

Thanks for the advice.  It looks like STATA cannot finish the programming
when it involves things like c.grade or c.tenure##c (I also don't know why
there were question marks ?? in your codes).  Could you please resend,
possibly in a format like .pdf?   In addition, suppose x2 moderates the
effect of x1 on y, I am looking the the differences of the predicted
probabilities in three scenarios: (1) -1 SD(x2), mean(x2), and +1 SD(x2).
Thanks!

Best regards,

Dali



----- Original Message ----
From: Maarten buis <maartenbuis@yahoo.co.uk>
To: statalist@hsphsun2.harvard.edu
Sent: Thu, April 1, 2010 4:12:05 AM
Subject: Re: st: graph interaction in count models

--- On Wed, 31/3/10, D Ma wrote:
> I am trying to graph an interaction between two continuous
> covariates in a count model (xtgee y x1 x2 x1*x2 ...,
> family(nb) link(log) vce(robust) nolog).  Do you have
> any suggestions as to how draw such a graph?  Thanks!

*------------------ begin example --------------------
webuse nlswork, clear
xtset idcode year
gen black = race == 2 if inlist(race, 1, 2)

xtgee wks_work c.tenure##c.grade south black, ///
      family(nb) link(log)

preserve
replace south = 0
replace black = 0
keep if e(sample)
bys grade: keep if _n == 1
expand 5
drop tenure
bys grade: gen tenure = (_n -1)*5
predict wks_hat
separate wks_hat, by(tenure)
twoway line wks_hat? wks_hat?? grade, sort
restore
*--------------------- end example ------------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------




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


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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index