r/stata • • May 22 '23

Hi what does it mean if you have a p value of 0.000?

Post image
0 Upvotes

r/stata • • Mar 17 '23

Question Urgent help needed!! How do I find a Key Value?

1 Upvotes

Hi I am trying to do some overdo homework for my PhD stats class. I am on the verge of tears because I can’t figure this out. One of the steps is “For each variable, examine its distribution and key value” I for the life of me can’t figure out what is meant by key value and I definitely don’t understand how to do it in stata.


r/stata • • Feb 15 '21

Why does stata omit variables? and what is collinearity?

1 Upvotes

I ran a regression looking at anemia levels and education levels. One of the education levels was omitted. I've tried googling why this is, but everything mentions collinearity. Can someone ELI5?


r/stata • • Jan 15 '23

Question Help me interpret this Regression table! (More details in comments)

Post image
2 Upvotes

r/stata • • May 11 '23

Do I accept or reject the hypothesis?

0 Upvotes

Hi. One of my research hypotheses states “the presence of CEO on the board of directors has a positive impact on firm performance”. I have 3 dependent variables, the main one indicated a negative correlation, while the other two positive. Is the hypothesis supported or at least partially?


r/stata • • May 21 '22

Question Hi, I need some help, does anyone know how to interpret this? As I feel like I have messed up

Post image
0 Upvotes

r/stata • • Nov 15 '19

Very high P values

0 Upvotes

I'm doing research on the effect of civil society on corruption using EU28 timeframe 2011-2018 and V-DEM data. My main independent variable is the corruption index made by amnesty my explanatory variables are different civil society variables like how much they are engaged in everyday life and how much are they consulted their size and so on.

My main problem is if I run xtreg ....., r fe simply nothing is significant

Can I run xtpcse model in this case? I've read xtgls should be used when N<T which is not my case. If I run XTPCSE what options should I use?

Please help me its for my master thesis should I increase the number of years or what should I do to have better more significant results? If I use a different corruption variable it gets a bit better but only in the case of XTPCSE.


r/stata • • May 30 '19

urgent question about survey data

0 Upvotes

It's about rstudio or stata. I've got survey data where they ask what is the most important issue in your country. Somewhere else they ask who is best to solve the issue (from the first question). How do I connect these two? What I want is to know who is most answered per issue. An example: problem immigration most answered is party x


r/stata • • Feb 27 '25

min & max values in a questionaire sorted by group

0 Upvotes

Hey!
I need help figuring this out

I have a data set whereas the question is as follows;

find the minimum and the maximum hours reported cardio work-out among men

Thus, Cardio is he variable and men is the group.

How can i see what the lowest and highest reported hours of cardio among men are?

Please NO coding-answers! (There has to be a function for it in the menu, right?)
Im a psychology student, not a software programmer :''D


r/stata • • Nov 01 '16

Probit regression trouble

0 Upvotes

Hi everybody,

I created a dummy variable in which if someone is male then. Male=1 if not male=0 and a corresponding one for female. When I try to do a probit regression my Z-score is really low. Same thing with female despite having a LARGE amount of observations. I did the same thing with region and separated it out into 4 regions with 0 or 1. When I regress them though, the z score is .02. How can I regress these variables, because I am studying STEM majors and know for a fact that gender and region are significant just by looking at several other studies. My regression is telling me they're not. What should I do?


r/stata • • Oct 16 '25

Solved Heavy Stata users: disable hyperthreading

0 Upvotes

If you use a Stata a lot, you can speed it up by perhaps 50-75% by disabling Hyper-threading on your PC, assuming that your PC has more cores available than your Stata license. Hyperthreading is a pipelining technology that presents doubles the number of CPU cores in your PC to the Operating System. This can speed up applications that can take advantage of parallelization, but sacrifices performance of applications that cannot.

Think of hyperthreading as having a team of a people ("cores") each doing a manual task like collating documents. For some documents, it's faster for your workers to collate one page at at a time using both hands. For other documents, your workers can work faster collating two pages at a time with one page in each hand. That's roughly describes hyperthreading.

Stata did do a performance analysis showing some advantage to hyperthreading, but the report doesn't appear to account for licensing. Stata may have tested using Stata/MP licensed for unlimited cores, even though most users have a license for 2x or 4x cores running on workstations with 6x or more physical cores. In those cases where you Stata/MP license is for fewer cores than your physical core count, hyperthreading works against you.

Disabling hyperthreading on a PC is easy once you find the setting. You have to enter BIOS which requires mashing the F1, F2, or Delete key when you power on the system. From there hyperthreading would be buried in either the CPU or Performance menus.

Note that desktop applications that benefit from hyperthreading will run slower. However, applications that depend on single-thread performance will run faster.

edit: On AMD systems, the hyperthreading setting may be called "SMT".


r/stata • • Mar 15 '25

Grad Project

0 Upvotes

Hello guys. I joined this community to get better at stata for graduate school. I have an upcoming project and I wanted to know the best place to find data sets. My project is about the infant mortality rate in the US. Where is the best place to find good datasets and what are some stata commands that would be useful to use? Thank you in advance


r/stata • • Jan 31 '25

Question Any tips on coding stata?

1 Upvotes

Hi, I have been learning stata now and I have some confusion about replacing the name while sorting it and I keep getting errors. It would be nice if you could explain me in simple terms. Thank you


r/stata • • May 01 '26

Help with Stata code

1 Upvotes

I need help with producing some Stata code from an academic paper. I created a do file and would like to verify that they are correct before proceeding with the empirical analysis. Specifically, I am trying to construct the money center roadshow variable, which is defined as an indicator equal to 1 for a three-day window in which the firm has flights to two or more money centers, and 0 otherwise. The money centers are Boston, Chicago, New York, and San Francisco. I appreciate the help!

Here is a sample of my data:

clear

input str179 companynames str48(companyticker departurecity) str6 departurestate str16 departuretimestamputc str48 arrivalcity str6 arrivalstate str16 arrivaltimestamputc

"Globus Medical, Inc." "GMED" "Wilmington" "DE" "2025-09-05 21:20" "St Louis" "MO" "2025-09-05 23:23"

"Fiserv, Inc." "FISV" "Morristown" "NJ" "2025-03-20 12:08" "Madison" "WI" "2025-03-20 13:55"

"General Motors Co." "GM" "Detroit" "MI" "2025-07-25 01:05" "Atlanta" "GA" "2025-07-25 02:18"

"Dominion Energy, Inc." "D" "Hyannis" "MA" "2023-09-10 17:29" "White Plains" "NY" "2023-09-10 18:08"

"Nicholas Services LLC" "<None>" "Jackson" "MS" "2017-05-02 16:51" "Trinidad" "CO" "2017-05-02 18:58"

end


r/stata • • Apr 11 '21

Converting Stata t-test code to R code

0 Upvotes

I am attempting to reproduce the results of an analysis originally conducted in Stata in R. In short, I have a table containing differences in means for three periods. Here is the original Stata code:

*Table 1  

*Period1 vs. period2 

ttest trustarmy if period3~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustpolice if period3~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustfsb if period3~=1 & electday~=1 & protestday~=1, by (period1min)
ttest trustcourt if period3~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustmungov if period3~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustfedgov if period3~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustduma if period3~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustprocuracy if period3~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustun if period3~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustgovind if period3~=1 & electday~=1 & protestday~=1, by (period1min)  

*Period1 vs. period3 

ttest trustarmy if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustpolice if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustfsb if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustcourt if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustmungov if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustfedgov if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustduma if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustprocuracy if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustun if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
ttest trustgovind if period2min~=1 & electday~=1 & protestday~=1, by (period1min) 
 
*Period2 vs. period3 

ttest trustarmy if period1min~=1 & electday~=1 & protestday~=1, by (period2min) 
ttest trustpolice if period1min~=1 & electday~=1 & protestday~=1, by (period2min) 
ttest trustfsb if period1min~=1 & electday~=1 & protestday~=1, by (period2min)
ttest trustcourt if period1min~=1 & electday~=1 & protestday~=1, by (period2min) 
ttest trustmungov if period1min~=1 & electday~=1 & protestday~=1, by (period2min) 
ttest trustfedgov if period1min~=1 & electday~=1 & protestday~=1, by (period2min) 
ttest trustduma if period1min~=1 & electday~=1 & protestday~=1, by (period2min) 
ttest trustprocuracy if period1min~=1 & electday~=1 & protestday~=1, by (period2min) 
ttest trustun if period1min~=1 & electday~=1 & protestday~=1, by (period2min) 
ttest trustgovind if period1min~=1 & electday~=1 & protestday~=1, by (period2min)

I have a single dataframe in R containing all of these variables. Could someone tell me what the R code for this would look like? Thanks.


r/stata • • Sep 30 '20

What do logistic regression variables tell you?

0 Upvotes

I need someone to explain in layman’s terms. What does Prob>chi2=? Is this the p value? What about pseudo R2, log likelihood, and P> |z|


r/stata • • Dec 19 '19

How do I fix this colinearity conundrum?

Post image
1 Upvotes

r/stata • • Mar 01 '20

Question HELP

0 Upvotes

I am very new to STATA and I am doing a project and am very, very stuck with the basics. I am trying to find the percentage of Burger King stores (BK) in New Jersey (NJ). How would I go about this? Also, I need to find the percentage of those greater than 20% in poverty, greater than 10% in poverty (prppov being proportion in poverty by zip code) but I need it in the entirety of NJ. Sorry this is vague, happy to go into further detail if you have questions. Would massively appreciate any help as I’m on a tight schedule and am freaking out. Thank you so much.


r/stata • • Mar 17 '22

Is there a way to use Stata online for free?

1 Upvotes

Is there a way to use Stata online for free? Or possibly a free trial of Stata? Thanks!


r/stata • • Dec 14 '23

URGENT HELP STATA!!!!!!!

0 Upvotes

Hello!

I have a question concerning an exercise I have to do on STATA. This is the exercise in question: " Use the model you ended up with at the end of point 5 except that you replace music with four new binary variables: M0, M1, M2, M3 that are equal to 1 if the number of musical instruments in the home is respectively 0, 1, 2 and 3 or more (0 otherwise). " In my database, the variable music is written as such "none / one/ two / three or more"

I have tried to generate those variables by doing this:

"gen M0=0

replace M0=1 if music==0

gen M1=0

replace M1=1 if music==1

gen M2=0

replace M2=1 if music==2

gen M3=0

replace M3=1 if music>=3"

Except, I have found some errors when doing it like this. (I have also tried this: "destring music, replace" But STATA answered: "music already numeric; no replace".

Could anyone help me please?

Thank you so much for your help!


r/stata • • Mar 03 '25

Aggiustare survival per variabili binarie tempo-dipendenti

0 Upvotes

Carissimi, sto facendo un'analisi di sopravvivenza in cui per ogni paziente ho multiple records.

L'evento è l'abbandono del farmaco (variabile "abandonment").

La mia variabile di interesse è il trattamento ("treatment").

Vorrei aggiustare le analisi per delle variabili binarie tempo-dipendenti.In pratica, abbiamo tre categorie di farmaci (drugcat*), che il paziente può assumere o meno ai diversi tempi di osservazione.

Il dataset avrebbe questo tipo di struttura come questa:

Idtimeabandonmenttreatmentdrugcat1drugcat2drugcat3
1301101
1601111
11201010
11411100
2300110
2600011
2710010
3300010
3600010
31200110
31800001
32100011

Io ho già fatto questo tipo di analisi in passato, splittando il dataset a diversi tempi di osservazione oppure stimando la tempo-dipendenza tramite l'opzione "tvc".

In questo caso la questione potrebbe essere estremamente complessa, perchè dovrei successivamente utilizzare modelli più complessi (joint modelling, eccetera) sugli stessi dati.

In passato ho letto su un paper (che però non trovo più) che l**'aggiustamento per questo tipo di variabili STATA le gestisce automaticamente una volta inserite nel modello come normali covariate**.

Per capirci, se fosse un rischi proporzionali, le dovrei inserire come segue:

stset time, id(id) failure(abandonment==1)
stcox treatment i.drugcat1 i.drugcat2 i.drugcat3

Cosa ne pensate? E? un approccio ragionevole per correggere l'effetto di "treatment" per il variare di drugcat*?


r/stata • • May 24 '25

Newbie: how to controll an effect for dummy avriable?

0 Upvotes

Hey!

Im probably staring the solution straight in the face but I just cannot fathome how to do this;

I have an index effect (self-reported loneliness) I wanna check up against a dummy variable (the values for this is variable is ''working'' coded 1 and ''unemployed'' coded 0).

I want to see if the index effect is different for those who work compared to those who are unemployed.

I know its a super easy answer but I just cannot get the gears grinding in my head.... ;'D


r/stata • • Apr 14 '25

Normalizing SVAR IRFs for a Log–Log Model: Help a bachelor student out! :D

0 Upvotes

Hi all

I’m estimating a 3‐variable structural VAR in Stata using the A/B approach, with all variables in logs (lfm = log(focal marketing), lrev = log(revenue), lom = log(other marketing)). My goal is to interpret the immediate and dynamic effects in elasticity form.

Below are three screenshots:

  1. Image A: The impulse response (coirf) for impulse(lfm) → response(lfm); you see the period‐0 estimate is 0.302118.

  2. Image B: The impulse response (coirf) for impulse(lfm) → response(lrev); you see the period‐0 estimate is 0.175278.

  3. Image C: The SVAR output’s A/B matrices. Notice that the diagonal element in the B‐matrix for lfm (row 1, col 1) is 0.302118, which matches the period‐0 IRF for impulse(lfm) → response(lfm). And the A‐matrix shows how lfm appears in the lrev equation with a coefficient ‐0.5778, etc.

My observation is that if I divide the period‐0 IRF of impulse(lfm) → response(lrev) (which is 0.175278) by the period‐0 IRF of impulse(lfm) → response(lfm) (which is 0.302118), I get ~0.58, which matches the the structural coefficient from the A‐matrix in the second equation. This suggests that the default IRFs are scaled to a one‐unit structural‐error shock (in logs), not a one‐log‐unit shock in lfm.

Proposed solution
I plan on normalizing the entire “impulse(lfm) → response(lrev)” columns by dividing each period’s IRF by the period‐0 IRF for impulse(lfm) → response(lfm) (0.302118). That way, at period 0, the IRF of lfm becomes 1.0, so it represents “a +1 log‐unit change” in lfm itself (rather than +1 in the structural error). Then, the IRF for lrev at period 0 will become 0.175278 / 0.302118 ≈ 0.58, which I can interpret as the immediate elasticity (in a log–log sense). Over time, the normalized IRFs would show in the form of elasticities how lfm and lrev jointly move following that one‐log‐unit shock.

My question: Does this approach for normalizing the IRFs make sense if I want a elasticity interpretation in a log–log SVAR? And is it correct to think that I can just divide the entire column of impulse(lfm) → response with 0.302118 (the coffecient of period 0 of impulse(lfm) → response(lfm))

Thanks in advance for any feedback!


r/stata • • May 21 '25

Supressing xlabel

0 Upvotes

Hi,

This is a bit urgent-- how do I just keep values of some coefficients on the xaxis while not keeping the labels for others when I am using the coefplot command?

Thank you so much!!