Quantcast
Channel: Statalist
Browsing all 72756 articles
Browse latest View live
↧

Creating bar chart with multiple binary variables

Hi, I am attempting to create a bar chart in Stata that shows proportions for multiple different binary variables. Each is a different measure of whether or not a medical provider offered a certain...

View Article


levelsof within for loop

I am using STATA 17 and want to run the following code Code: * for each block forvalues b = 1/`nblock' { levelsof choice_set if block == `b', local(choice_sets) * for each choice set foreach c_set in...

View Article


Analysing which colour contributes to the greatest price premium

Hi Everyone, I hope you're well! I am trying to observe what colours have the greatest price premium. Here is a sample of my data. Code: input str39 Name str10 Colour double PricePrem "Nike Jordan 5...

View Article

Extremely large AIC & BIC figures (xtpoisson, ppmlhdfe, xtnbreg)

Dear Statalisters, I would appreciate your kind opinion on the below issue. I have around 1 million observations from a few thousand manufacturers. I am dealing with an outcome variable which is...

View Article

why my CI 95% is coming .42 - 4.38 but SE is .81 ?

why my CI 95% is coming .42 - 4.38 but SE is .81 ? ------------------------------------------------------------------------------ | Linearized transfusion | Odds ratio std. err. t P>|t| [95% conf....

View Article


Counting number of individuals (by sex and age) that answer a question in a...

Hello, I have a dataset with information of abuse (variable name: abused) at work by age and sex (variables name "dvage" and "sex") for several waves. Can you please help me with the code to count the...

View Article

How to simulate data with specified ROC AUC and specified odds ratio

I would like to do the following: 1- simulate 1000 observations 2 - simulate a continuous biomarker which can be normally distributed with a given mean and given standard deviation and simulate a...

View Article

Why is all variables not significant in panel treshold regression

Dear all, I am using the xtendothresdpd package by Diallo (2020) to estimate the dynamic panel treshold regression with 37 countries and 20 years. All the independent variables aren't significant...

View Article


Drawing a time series graph of prices with 19 line

Hi Stata community; I do have this data: Code: * Example generated by -dataex-. To install: ssc install dataex clear input double(ann_2001 ann_2002 ann_2003 ann_2004 ann_2005 ann_2006 ann_2007 ann_2008...

View Article


Graphs

how would I go about producing s graph like this in STATA, what would be the commands? Any help will be appreciated, thank you. Array

View Article

first difference regression

hello stata community, Is it possible to run first difference regression if I have time series data? Code: reg d.y d.x1 d.x2

View Article

Testing measurement invariance across two groups/endless iterations when...

I am trying to test measurement invariance for a scale with 20 items loading 4 latent variables (no cross-loadings) and 4 error correlations. However, while fitting a target model there are endless...

View Article

Advice for Imputing my Control Variables

Hi everyone, I hope everything is well! I'm reaching out because I read some guidance on imputing but I still feel lost, and I was hoping some of you were familiar with the topic. I'm currently...

View Article


Image may be NSFW.
Clik here to view.

Number of observations per participant

Hello, I am very new to Stata and need help with some simple commands. I have got data from participants who have been measured repeatedly across different visits to see how variables change with...

View Article

Category omitted from fixed effect when running regression

I am having a confusing problem -- when I ran my code last week, everything was normal. Now, not so much. I have a crossectional data set (DHS for Colombia), and am running a diff-in-diff...

View Article


Inclusion of Failure Variable in Survival-Time Regression Model?

Hello, I am working on a question involving survival time in the presence of competing risks, which is something I haven't worked with before. I am looking for a quick sanity check, as in my study the...

View Article

Opening Excel file exported by etable

In the example below, when I click results.xlsx, the file tries (and fails) to open using my browser. How do I direct Stata to open the file using MS Excel? I am using the latest version of StataSE 17...

View Article


IV strength for two endogenous vars

Dear all, Greetings. I meet the below problems and hope someone could give me hints. Thank you very much for your replies. I had two endogenous variables (Var1 Var2) and two instruments(IV1 IV2). The...

View Article

Computing standard errors for Erreygers index when using categorical variable...

Hello Experts, I have recently come across literature that advises calculating new standard errors for inequality indices when using categorical variable for ranking socio-economic welfare, which in my...

View Article

foreach, forvalues loop

Can I use loop command about these? recode v11 (1/9=1) (else =.), generate(hmember_1) recode v14 (1/9=1) (else =.), generate(hmember_2) recode v17 (1/9=1) (else =.), generate(hmember_3) recode v20...

View Article
Browsing all 72756 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>