I have one variables which categorizes the companies under aggroculture, technology, finance, insurance etc. This is a string variable with values 0-30 ( depending on what sector they are in).

I also got a dummy variable which takes the value 1 if they have negative equity.

I want to categorize/tabulate the companies with negative equity under their sector.

I run

:

xtset sort pcid year

:

xtset pcid year

:

tabulate INDUSTRY NEGEQ

However, since I am using panel data I get all the observations (all company years) when I want to only include each company individually. Is their any way to only use the pcid(company nr) individually and not for all the respective years ( pcid in 2010, 2011, 2012, 2013, 2014, 2015).

I have tried searching the FAQ and tried different alternatives, but I`m not able to properly execute the command. Does anyone have any idea on how to progress?]]>

I am currently working with a dataset with 250 variables and aprox. 200.000 obs.

I need to create a variable called x if the values in the varlist act1-act75 are equal to 042* or V08*, and if the values in the varlist adm1-adm75 = "yes"

I was able to run the first part using the following code:

gen x=.

foreach var of varlist act1-act75 {

replace x =1 if strmatch(`var', "042*") | strmatch(`var', "V08*")

}

replace x=0 if x==.

But when I tried both varlist, I got 0 changes (and it should be 650 obs). Here is my code:

drop x

gen x=.

foreach var of varlist act1-act75 {

foreach y of varlist adm1-adm75 {

replace x=1 if (strmatch(`var', "042*") | strmatch(`var', "V08*")) & strmatch(`y', "Yes")

}

}

replace x=0 if x==.

Please help. Thanks in advance.

Lesley.

]]>

I have a quick question on fixed effects regressions. I'm estimating the following diff-in-diff model:

Y(it)=a+delta(Treat(i)*Post(t))+fe(i)+fe(t)+e(it)

The panel is unbalanced. I run two estimations: 1) on the unbalanced panel 2) on the balanced panel. The estimates on delta are the same, even though the number of observations in the two cases are different.

Can any of you explain why this is the case?

Thank you very much!

]]>

I want to produce a hbox for a cohort of student MCQ exam results with a specific student score overlaid onto the graph.

I can produce the box plot with the usual features and display the whole cohorts range and median etc. but I want each student to see where they sit in the range.

Even better (if possible) I would like to show an individual students quartile overlaid on the cohort range.

I have 130 students and 100 MCQs (100 stems, 5 distractors). The data is numerical and I have 'egen'd' the necessary features to align the marking key etc.

Any help would be fantastic!

Nathan]]>

One can install these program by using

mfp command is crashed on my personal laptop that is with 16GB RAM and Intel i7 quad core processor.

I have looked up here

http://www.stata.com/statamp/

It seems STATA/MP is suitable for parallel processing, but would it be useful these commands such as, mfp and mfpigen?

I would like to use following PowerEdge Dell machine.

What would you suggest that which version of Stata would be suitable for this purpose?

Thanks.]]>

foreach dum in $dummies {;// there are 6 dummy variables

foreach het in $heterogeneity {;//there are ~80 variables here

tab `dum' `het', chi2 row cell wrap;//this is the twoway tabulation I would like to export

};

};

I am unsure how I should go about exporting these tabulations to Excel such that each number is in its own cell and the horizontal and vertical axes are labeled with the variable labels. Tabulate saves neither frequency nor percentage of each cell as a scalar, and so that is the first stumbling block for me. If there are any resources on outputting twoway tabulations to Excel, I would love to see them. Thanks in advance for your help.

]]>

I would appreciate suggestions/ pointers on the type of model could be leveraged in this scenario. ]]>

Can you explain me what does it mean? It was expected to be a table as a output with a chi-squared test for autocorrelation in the errors.

I have also noticed that this error does not come out if I run a var regression with one lag only.

Thanks in advance.]]>

each patient has a unique identifier (each patient has his own row)

There is also a variable for the hospital ID, which is a string variable.

There are many hospitals in the databse and I just want to know how many different hospital is there?

]]>

:

net inst raschjmle, from("http://www.paces-consulting.org/stata")

Full-time, starting Spring/Summer 2016. Fellowships last for one year, with an option to renew for a second year by mutual agreement of the professor and the fellow.

Assist with the research of Professors John J. Donohue, Jacob Goldin, Daniel Ho, Daniel Kessler, and Alison Morantz at Stanford Law School. Designed for graduating seniors or recent college graduates, fellowships provide a unique opportunity for those considering graduate school, law school, and/or business school in the future.

Prior Research Fellows have matriculated to Ph.D. programs at Harvard, Stanford, Yale, and MIT, and law school at Harvard, Yale, Stanford, and Columbia. They have been drawn from a variety of undergraduate disciplines, including economics, political science, applied math, public policy, statistics, and computer science.

Successful applicants will be matched with a specific professor based on background and interests. As full-time Stanford University employees, fellows will receive a competitive salary and benefits package, including full medical and dental insurance, access to campus athletic and academic facilities, paid vacation time, professional development funds, and the capacity to audit Stanford courses and attend on-campus lectures and seminars free of charge.

- Conceptualization of suitable empirical methodologies and models
- Collecting, managing, and structuring quantitative datasets
- Statistical analyses of complex datasets and interpretation of results
- Communication with government officials, industry stakeholders, and research collaborators
- Report writing and manuscript preparation

- Bachelorâ€™s degree, preferably in the social sciences or another relevant field
- Outstanding academic credentials and intellectual creativity
- Eagerness to take initiative and solve intricate problems
- Excellent time-management skills and ability to work effectively with minimal supervision
- Experience in a quantitative discipline such as economics, political science, statistics, applied math or engineering
- Exceptional research and analytical writing skills
- Programming experience in Stata, SAS, R, Python or other languages is preferred, but not required
- Prior research experience and coursework in the empirical social sciences is preferred, but not required

There will be two rounds of application review. The deadline for the first round is

- Brief cover letter explaining your interest in the position
- Current resume
- Transcript (unofficial version acceptable)
- Short academic writing sample, preferably empirical or social science-related
- Contact information for at least two references, preferably able to speak to academic research skills

I have a dynamic panel (N= 353 T= 22 balanced).

I am trying to run the model:

xtpmg dbdrl inva cashflow rd_ta tau1992-tau2011, lr (lbdrl lrcostd lndts lfa_ta lrd_dum) ec(ec) replace pmg

and the error message

How could I solve this problem? And what about the trend?]]>

Problem is, after running e.g. the following commands:

webuse pig, clear

bayesmh weight week i.id, likelihood(normal({var_0})) noconstant prior({weight:i.id}, normal({weight:_cons},{var_id})) prior({weight:_cons}, normal(0, 100)) prior({weight:week}, normal(0, 100)) prior({var_0}, igamma(0.001, 0.001)) prior({var_id}, igamma(0.001, 0.001)) mcmcsize(5000) dots

I keep getting this error:

command _bayesmh_eqlablist is unrecognized

r(199);

Where I am doing wrong?]]>