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

create readmissino data with an index event

Hi, Sorry for this basic programming question, but I would appreciate any help with it. I have a dataset of inpatient discharges with several visits per patient and procedures. this means several rows...

View Article


reshape issue

Dear Stata users, I can't solve the following problem: Initial dataset structure company year varname varvalue A 2010 x1 2 A 2011 x1 6 A 2010 x2 3 A 2011 x2 5 B 2010 x1 4 B 2011 x1 1 B 2010 x2 6 B 2011...

View Article


Unable to reproduce Pearson's X^2 using mgof and Benford's distribution

I am interested in comparing the distribution of some observed counts and its theoretical distribution. One popular law is Benford's and Ben Jann wrote a Stata paper along with the command mgof at...

View Article

adding a covariate to moptimize_init_eq_indepvars inside an evaluator

Hi, I am running maximum likelihood estimation with moptimize where I passed my independent variables to the evaluator through moptimize_init_eq_indepvars(). I would like to add an extra covariate to...

View Article

Textmate 2 and STATA 14

I have been using Textmate 2 with the STATA bundle on STATA 13 for a while now. The feature that I use most often is COMMAND-R and COMMAND-OPTION-R which runs the do file. But today I installed STATA...

View Article


Graphing a nonlinear fit line

Dear Statalist, I'm trying to make a graph of a nonlinear function overlayed on an OLS line. When I run the code below, I get the attached figure. Despite experimenting with various options (e.g.,...

View Article

Testing If Coefficients Are Equal Across Time Series Regressions

Suppose I have two Portfolio returns for some time period, P1 and P2. I want to regress the two portfolios on the return to the S&P 500, and then test if the coefficients are identical. For t = 1...

View Article

Problem with exporting dates(timeseries) with day, month, year, hour, minute...

I am using stata 13.0 on Windows 7. I'm quite new to stata and there is a lot of information, so I apologize if I'm not specific enough. I am trying to export dates and times for time series analysis...

View Article


REshape to very long - columns end on end

Hi All I currently have data which looks like this: 800 810 812 820 Jul-10 0 1 0 0 Aug-10 0 0 0 1 Sep-10 0 0 0 0 Oct-10 4 0 7 0 Nov-10 0 0 0 6 The first row is an area code and the data is related to...

View Article


margins and marginsplot issues

HI All, I am trying to plot my DV vs IV using margins command as following: . xtmixed DepVar Var_1 Var_1#Var_1 (this is square term) Var_2 Var_2#Var_1 Var_2#Var_1#Var_1 (interactions with linear and...

View Article

Constraints in mixed models

I am manually implementing the likelihood ratio test for multiply imputed data by Meng and Rubin (1992). I am using it for testing variance components in a 3-components mixed model, using the command...

View Article

Comparing specific values of groups based on different criteria/ Panel data set

Hi Statlist, I have a panel data set: id year z group 1 1 22 2 1 2 8 2 1 3 10 2 1 4 11 2 2 1 10 1 2 2 10 1 2 3 7 1 2 4 9 1 3 1 10 1 3 2 21 1 3 3 8 1 3 4 17 1 The group is based on year 2 value of each...

View Article

Willingness to Pay using Choice based Conjoint on Stata

Hi everyone, I am a third year economics student wishing to go about this topic, but am having trouble in how to implement in on Stata. Does anyone have an example or tips which can be useful for me?...

View Article


areg vs. reg with group dummies

Hi all, I have searched through the forum, but I couldn't find a post with an answer I am looking for and this might be more of a simple econometrics question. I am trying to evaluate a program that...

View Article

Calculating the geometric mean across variables (by observation) with missing...

Good day all, I am working with a dataset that looks something like this. ID var1 var2 ... var17 1 a b c 2 d a . 3 . f a 4 e . f 5 c e d What I need to do is calculate the geometric mean of the 17...

View Article


Cross classified APC model

I want to replicate this model in Stata, but using ML and omitting the SAS options like maxopt, covtest and nloptions: Code: proc glimmix data=NHANES_Obesity maxopt=25000; class PERIOD COHORT; model...

View Article

-list- qualifier does not recognise some characters in a dataset imported...

Hi, I have had some problems matching two datasets. One of them is that Stata seems to not recognise the dataset imported from an Excel file (this second data source is only available in Excel file,...

View Article


Calculating medians on groups (excess cash)

Hello all, I'm new to Stata and to the forum. I am trying to replicate the method of DeAngelo, DeAngelo and Stulz (2010) with regard to their definition of 'excess cash'. Khieu and Pyles (2012)...

View Article

Marginal effects significance vs original model effects significance

I often get questions like "This variable has significant effects in the original (logit/probit/heckprobit/whatever) model. But its marginal effect is not significant. Why?" Or vice-versa. I tend to...

View Article

person-time at risk

Hi all I have the following dataset. ID Date 1 1/2/2013 1 4/2/2013 1 9/2/2013 1 10/2/2013 2 4/2/2013 2 9/2/2013 2 15/2/2013 2 19/2/2013 3 2/3/2013 3 9/3/2013 I want to calculate the person-time at risk...

View Article
Browsing all 65580 articles
Browse latest View live


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