Quantcast
Channel: Statalist
Browsing all 65052 articles
Browse latest View live

tabstat display min and max

Dear statalisters, I have used Code: tabstat xvar1 xvar2 xvar3, s(n mean sd p50 ) How can I add min and max to this statement ? Thanks, Rochelle

View Article


Automating graph titles including string variables

I am using Stata 13.1 to generate diagnostic graphs for visually inspecting unbalanced time series data. Each observation is a city i in year j. I have included a sample dataset at the bottom of this...

View Article


Prediction of a specific variable after the estimation

I want to calculate the predicted mean of hours in order to make comparisons with the actually mean of hours. The output of the stata is the following : PHP Code: mixlogit didep hours   if sex==1 &...

View Article

-todate- generates a Post-Classical date in year 206, from an observation in...

Hello, I'm using -todate- to convert string dates (yyyymmdd) to Stata dates. The following reproducible code generates a date of "12 May 206", which is puzzling given that the original string date...

View Article

How to compare two correlation coefficients within the same sample?

Let's say we have y being predicted by x1 and x2 such that y=a+b1*x1+b2*x2+e. How do we compare b1 and b2 and if the differences between b1 and b2 are significant?

View Article


How to open multiple DBF files in Stata or how to convert multpile DBF files...

Hey guys Im trying to convert or to open from stata multiple dbf files (864 to be exact). I read the answer Nuno Soares elaborated for a similar case using 3000 excel files...

View Article

Endogenous Variable Fixed Effect

Hello Everyone, How do I test for the endogenaity of a variable when running a fixed effect in Stata? I have an IV for that variable, but I am not sure if it will be necessary (I rather not use the...

View Article

Identifying/dropping observations based on frequency of one variable within...

Sample data: Business | Client | Purchases WalMart | Bob | $10 WalMart | Bob | $15 WalMart | Joe | $10 Kmart | Susan | $20 Kmart | Joe | $10 Kmart | Jane | $30 Kmart | Jane | $10 Kmart | Jane | $20...

View Article


Panel data: Ranking entities by average of a variable

Hi Stata folks, I have an unbalanced panel data of firms i at time t. I have a variable, say x for every firm at every point in time. I took the average of x for every firm over time in the following...

View Article


summation of all observations

Hi All I have the following data: num| No Yes | Total -----------+----------------------+---------- 0 | 493 457 | 950 1 | 108 183 | 291 2 | 114 179 | 293 3 | 142 202 | 344 4 | 155 202 | 357 What syntax...

View Article

actual vs predicted value

Dear all, i want to compare the actual with the predicted mean hours. I run the following model: PHP Code: mixlogit didep hours if sex==0 & marital_status==1, rand(disposable_income) id...

View Article

How to locally store the particular position of an observation for its...

Dear all, I´d like to compare the Values in two columns and if they mach, i´d like to know the difference between their timestamp. I have a dataset that looks like this: clear input str42 (pos ppos...

View Article

Compare two observations - building groups and doing the analysis in Stata

Hello everyone, as an add-on to my thesis I want to do an analysis that displays the results as in the table down below. Array I am also investigating workforce change within a group but not on family...

View Article


problems with temporary variables in my Ado-file

Hi all, I am pretty new to Stata mata language. I am trying to write a program to estimate risk preference parameters.After defining the program and arguments, i have created some temporary variables...

View Article

The book Practitioners Guide --BY Subal C.K

Dear All I just buy the book Practitioners Guide by Subal et al on Stochastic Frontier Ananlysis Using Stata. And to be able to use the Stata programs written by authors of the book I installed the...

View Article


Instrumental Variables- Choosing between 2SLS, GMM2S and LIML

Hi, How can I find out which among 2SLS, GMM2S and LIML is most efficient? Like Hausman test helps to decide between fixed and random effects, is there any way I can find the most efficient estimation...

View Article

Factor Variables with ivreg2

Hi, I am trying to include to control for industry and time effects in the following ivreg command: ivreg2 q2 (ocln= intcoverage mb) deta size risk age i.year i.industry, endog (ocln) but I am getting...

View Article


Date time variable- keep based on year; month, date, only

I have a "date and time" variable (clock variable is the right terminology?) Code: . list OCCURED_DT in 1/1 +--------------------+ | OCCURED_DT | |--------------------| 1. | 28jun2016 21:20:00 |...

View Article

Growth-Inequality-Social Spending Decomposition

Dear all, ​I am trying to do a decomposition of changes in poverty following Datt and Ravallion (1992), with the extension made my Cortes (2014) in order to include how changes in public social...

View Article

Variation of a parameter between contexts

I want to run an xtmixed model. My dependent variable is the agreement with the statement "Government should give everyone a job, who wants to work" on a scale from 1 to 5 (gov_job). My indenpent...

View Article
Browsing all 65052 articles
Browse latest View live


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