Thank you in advance for any reply.]]>

xtabond2 Y L.Y X1 X2 X3, gmm (Y X1 X2, lag (2 3) collapse) iv (X3) twostep robust small

on executing the command I get the following error:

<istmt>: 3499 xtabond2_mata() not found

r(3499);

Can anyone please help me with that? I am currently using STATA 12.1. Thank you.

]]>

I am doing a CCREM in Stata. This is the code:

Code:

mixed tolind c.age##c.age Inspired Fables female Liberal Moderate white ceduc marry kids south urban rural suburban crelcom mainline blackprot catholic nofaith [fweight=wtssall]|| _all:R.cohort5 || year:

Code:

predict c5reall yearreall, reffects

I do not know how to interpret or manipulate the results of the c5reall and yeareall random effects variables so that they make sense in terms of graphing estimated differences in my DV (tolind), which runs from 0 to 15.

For example: this is the output from

Code:

tabulate c5reall

HTML Code:

BLUP r.e. | for _all: | R.cohort5 | Freq. Percent Cum. ------------+----------------------------------- -.5852549 | 1,004 2.46 2.46 -.5204305 | 655 1.60 4.06 -.4261875 | 1,765 4.32 8.37 -.3709875 | 724 1.77 10.15 -.3438976 | 1,548 3.79 13.93 -.2439106 | 1,471 3.60 17.53 -.1473774 | 1,892 4.63 22.16 -.1162268 | 1,181 2.89 25.04 -.0620598 | 2,212 5.41 30.45 .0386802 | 2,218 5.42 35.88 .0846847 | 4,365 10.68 46.56 .2662306 | 2,796 6.84 53.39 .2839063 | 3,626 8.87 62.26 .3863582 | 2,855 6.98 69.24 .5371156 | 4,683 11.45 80.70 .6077166 | 3,717 9.09 89.79 .6116406 | 4,175 10.21 100.00 ------------+----------------------------------- Total | 40,887 100.00

Array

Honestly, I'm not sure if I'm saving the right information (using the predict command) or if I should be saving some other information. Any guidance is appreciated.

Thanks,

Marie]]>

I performed unit root test using fisher-type unit root test based on ADF and got the results below. I know I should be looking at the P value, but which P values? and from the results do I have unit roots present?

Fisher-type unit-root test for lgbealth

Based on Augmented Dickey-Fuller tests

Ho: Al1 panels contain unit roots Number of panels= 12

Ha: At least one pane1 is stationary Number of periods= 13

AP parameter: Panel specific Asymptotics: 7 -> Infinity

Panel means-: Included

Time trend: Included Cross-sectional means removed

Drift term: Not included ADF regression: 1 lag

statistic p-value

Inverse Chi-squared (24) P 34.9598 0.06908

Inverse normal z -0.9553 0.1697

Inverse Logit t (64) L* -0.9732 0.1671

Modified inverse chi-square PM 1.5819 0.0568

P statistic requires number of panels to be finite.

Other statistics are suitable for finite or infinite number of panels.

]]>

margins ib0.married#ib1.female

The Stata output shows 4 marginal effects: notmarried#male, notmarried#female, married#male, married#female

Now, in another context, I want to calculate the marginal effects of a categorical variable and a continuous one. To make it simple, say married or not with the level of IQ:

reg salary i.married##c.IQ

I am interested in two levels of IQ, 90 and 120.

The Stata output should show these marginal effects: notmarried#IQ=90, notmarried#IQ=120, married#IQ=90, married#IQ=120

What would be the command to achieve this output in this context?

Thank you!]]>

I am using Stata v13. However, I cannot open one .dta file. Here is an error message.

".dta too modern

File ...... is from a more recent version of Stata. Type update query to determine whether a free update of Stata is available,

and browse http://www.stata.com/ to determine if a new version is available.

r(610);"

I am trying to get it updated but it doesn't help. How can I open this?

Thank you.

]]>

Code:

histogram _bank, discrete frequency xlabel(1 2 3 4 , ang(v) valuelabel labsize(vsmall))

How i can sort this histogram by frequency, not by alphabet

Array ]]>

I want to run a regression-based decomposition as outlined in Fields(2002) where my dependent variable will be ln(wages)

However, I also want to correct for selection bias in my wage equation , specifically using a multinomial logit selection model, as in Lee (1983).

I know the user-written commands that do each of these separately, namely

-ineqrbd from SSC, and

-selmlog from SSC, in Stata 10 .

and I was wondering if there is any way/existing command that incorporates both of these ?

Essentially, is there a command to run a regression-based inequality decomposition of selectivity corrected wages ( polychotomous selection model) ?

Thank you!

References

Fields, G. S. (2002). Accounting for income inequality and its change: A new method, with application to the distribution of earnings in the United States. http://digitalcommons.ilr.cornell.edu/articles/265/

Lee (1983) Generalized Econometric Models with Selectivity. Econometrica Vol 51(2) p 507-512

http://www.jstor.org/stable/1912003]]>

After dropping the observations unrelated to the population of interest, and using the "svy" command for descriptive statistics, I get a note that I am "missing test statistics because of stratum with single sampling unit".

I've done my due diligence as far as troubleshooting the problem, and used "svydes" to identify the stratum with a singleton PSU. It turns out there is only ONE observation that falls into that category. I'd like to drop that observation, but the problem is that the stratum and PSU variables are masked in this public dataset, so "list strata psu if strata==1" command returns with a blank.

Any ideas as to how to address this issue with masked variables?

Thanks!]]>

My initial task is to estimate the following model with interaction:

Code:

xtpoisson y i.x1##c.x2 x3 x4, fe vce(robust)

Code:

margins, dydx(x1) at(x2 = (1(5)20)) vsquish marginsplot

Code:

margins, at(x1=(1 0) x2 = (1(5)20)) vsquish marginsplot

Code:

ivreg2h y_ln x2 x3 x4 (x1 m1 = ), gen fe r

Thank you in advance for help!]]>

I'm using qreg to fit quantile regression models (median, 90, and 95) for drug infusion rates with factor variables as independent variables; the data span 19 different hospitals.

qreg dose surgery_group2 surgery_group3 genderF, q(0.5) vce(iid,res)

NB-- surgery_group1 and genderM are omitted

I have data on several drugs. For each drug except one drug, the regression runs perfectly.

This one drug has a huge number of entries Observations (1.3 million) compared to 300,000 for other drugs. This is the one drug that fails.

I need to use qreg, because I need to bootstrap the process to get medians and SE that reflect the differences between hospitals.

(See Post 13 from Joao Santos Silva in http://www.statalist.org/forums/foru...ile-regression).

I need vce(iid,res) because it dramatically speeds up the process (as Dr. Silva suggested and I observed for my 6 other drugs).

qreg2 works using its default settings (same as vce(r, fitted)? and with the the nor option (?same as vce(r, k))

qreg works with vce(iid, fitted)-- but takes far too long to use in bootstrapping.

Can someone suggest a method for working out the source of the error and getting qreg to work?

Thank you in advance.

Mitchell Berman

Columbia University

]]>

I am estimating models of organizational turnover (i.e. quit rates). My outcome data is in the form of "number of quits." Most organizations report zero quits, but the range is quite large. The data is most definitely not normally distributed. I also have data on the number of employees in each organization.

My inclination is to use zero-inflated negative binomial regression with total number of employees as the exposure variable, but it this type of modeling is not common practice in my field. More commonly, researchers will divide turnover by total number of employees to construct a turnover rate variable, add one, take the log, and then model it using OLS regression.

Can anyone help me understand the implications of these two approaches for modeling the data so I can produce the most accurate estimates? I have found plenty of information on how to conduct regression for count outcomes, but have not been able to find any advice comparing these two approaches. Thanks for any help you might be able to provide.

-Matt]]>

Code:

histogram _bank, discrete frequency xlabel(59 50, valuelabel)Array

i need rotate to

Array

how i can do it ?

]]>

I am doing a CCREM with two random levels, cohort and period. Here is my code:

Code:

mixed tolind c.age##c.age Inspired Fables female Liberal Moderate white ceduc marry kids south urban rural suburban crelcom mainline blackprot catholic nofaith [fweight=wtssall]|| _all:R.cohort5 || year:

As I understand, I need to use a post-estimation command, specifically the command

Code:

predict

Code:

predict c5reall

Any assistance is appreciated.

Marie

]]>