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

Using the Switching regression and Instrumental Variables (IV) in the same model

Dear Statalist, I have been looking at the switching regression to identify public-private wage differences: for public sector workers: log(public_wage) = A + B*X1 + E1 for private sector workers:...

View Article


Replace using a long list of variables to code for an 'Other' categroy

I am performing a study looking at surgical outcomes. I have created many categories which describe the main indication for surgery. each category is dichotomous. I want to create an 'Other indication'...

View Article


Adding Values in Panel Data

Hi, I have a problem in Stata and I hope that somebody can help me. My panel dataset looks the following: Code: Date ID Input1 Input2 13880 4 1 . 13880 5 1 . 13880 6 . . 13880 7 1 1 13880 8 . . 13880 9...

View Article

Deleting values

Hello I need to clean this data in a way that the last few digits which represent time (8:14) are removed while the dates remain intact. Is there a way or a command in stata that allows me to do this?...

View Article

Switch function in Mata?

In an effort to speed up my code I was recommended to replace my lengthy if and else if statements into switch commands. However, I could not find the switch command in Mata. Does it actually exist?...

View Article


r(111) issue in macro for creating and saving graphs

Dear Statalist, I am trying to create histograms of losses(Loss_Amount__USD__Millions_) by event type (BIS_Event_Type___Level_1) for each industry category (Industry). The macro shows me r(111) error,...

View Article

Size of exported graph (png) using export command

Hi all, I am using STATA 12 to export some (stacked bar) graphs using export command in png format (i.e graph export a.png, replace). Everything seems perfect except the size of the exported graph. If...

View Article

spgrid problem - block should be at least 1 r(498)

I’m trying to implement with my own data a kernel density estimation like in Pissati 2008 (pag. 2008) This are my data files. Array Array http://www.stata.com/meeting/italy12...t12_pisati.pdf I’ve been...

View Article


spmap resulting in blank spaces

I am trying to produce a world map with countries grouped into 3 categories. I can get the following command to draw a perfect map, which includes all countries. However, when I add any attribute, the...

View Article


How to use stata to plot or graph??

I have a dummy variable that I want to output a plot or graph showing the number of observations for each year when the dummy equals 1. What should I do? I used "graph twoway bar DummyVar year". It...

View Article

Benefits of a Rasch Model?

Hello, my prof wants me to do a Rasch Analysis for my paper. My aim is to check if there are some factors (like gender, age, etc...) that can explain if someone is willing to answer political questions...

View Article

Reducing the x axis of a graph

H statlist, I'm using Stata 13.1 on Windows 7 How can I reduce the scale of the x axis to start at 1925 and end 1965 so that ther is less open space outside of my observations? I thought xsc(r(1925...

View Article

Multilevel Mixed Effects command with Svy command not running properly

Good Afternoon Statalist, I am attempting to run a model in Stata 14 using menbreg while using svyset to appropriately adjust for complex survey design, and I'm having no luck getting anything to run...

View Article


Importing excel

I am having trouble importing a 993 thousand rows excel to stata. Is it possible to do somehow? Thank you! Code: . import excel using...

View Article

Factor variables and time-series operators not allowed

I'm working with the database of the National Sample Survey (PNAD) of the Brazilian Institute of Geography and Statistics (IBGE) and this present a sampling plan complex'm making use of svyset command...

View Article


URGENT: descriptive stats for continuous variable

I want to summarise a continuous variable by categories and then report the chi2 value for the existence of a difference in the continuous variable between the two categories. for example I want to...

View Article

Performing a log likelihood ratio test when one estimates cannot be stored

Hi, A quick help is very much desired. I am trying to conduct a log likelihood ratio test between two models. Stata can store estimates from one model which is built in Stata but it cannot store...

View Article


How to get confidence intervals for fitted in xtmixed post-estimation?

Do anyone know how I can obtain confidence intervals when I run post-estimation after xtmixed? If I run e.g. . predict yhat_school, fitted level(school) I could get the expected values but I also would...

View Article

Looking for Quotes in String Variables

How can I have Stata look for a quote (") in a string variable? I tried writing the following, but am getting an error, "too few quotes." count if regexm(Var1, "'") Thanks in advance for any ideas. Erika

View Article

Stars are not showing for all variables of the Correlation Matrix

Dear Statalist users, I am making correlation matrix for my research. I am facing problem with showing the stars in my correlation matrix. Stata does not involve the full results of the correlation...

View Article
Browsing all 72758 articles
Browse latest View live


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