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

Citing code borrowed from other source files

Hi, I'm writing a few programs that adapt ideas and code chunks I've found in a couple of stata source files. Does anyone the appropriate way to cite this code? I'm planning on posting the programs...

View Article


Forecast's Confidence Levels - VEC model

Dear all, Do you know how can I plot a forecast form a vec model with several confidence levels in the same graph? Stata allows me to choose one confidence level. Then I estimated a VEC model twice,...

View Article


- chaidforest - updated on SSC

With many thanks to Kit Baum, a new version of the module chaidforest is available on SSC. Description chaidforest is an implementation of a random forest (Breiman, 2001) ensemble classification...

View Article

Esttab and reg3

Hi everyone, I've looked online a little bit, but cannot find anything too definitive on the following matter. My goal is to esttab results from reg3 to be in a nicely presented table, just like I...

View Article

string to missing

hi everyone! I have a small dataset of perceptions, likert scale. the thing is some answer are "na" meaning for do not apply. I want to encode this variables as missing but I get a type mismatch. Here...

View Article


How to adjust the cox model schoenfeld residual plot is flat but with non...

When I tested the PH assumption of cox model. schoenfeld residual plot is flat (with zero slope) but with non zero mean (y=-0.3). The chi2 statistic for this variable is significant. And even after I...

View Article

tobit with known but varying censoring points

This ought to be a common problem. My data has a constant censoring point in nominal dollars, but I want to estimate panel and stacked tobits for multiple years in real dollars, meaning I have a...

View Article

Export a table (or regressions) to excel format

Hello, I would like to know what commands I use to export a table (or regressions) made in STATAusing the PCA (Principal Components/Correlation and Principal Components/Eigenvectors) to excel format (...

View Article


Transforming z-scores into NCEs

Hello, I have a dataset where my dependent variable is student_score (from a math standardized test) and a series of independent variables, e.g. class size, household characteristics, age, gender, etc....

View Article


long names of labels

I'm doing a simple two-way tabulation. The first variable is value-labelled, with some rather long values; some are as much as 46 characters. (I believe that the fact that they are label values is...

View Article

Append to global macro in foreach

I want to append to a global macro using foreach. I also want to call a macro ('stem') as part of the macro name. This performs the desired task; : global stem abcdefg macro drop d$stem foreach x of...

View Article

Replacing blanks conditional on value sin another variable &...

Hello, I have a variable po that only contains one value. However, I want to populate this variable so that if po is true for a particular id, then true will be inserted for all instances of that id,...

View Article

Displaying variable value using putexcel command

Hello all, I have what I believe to be a simple problem but I have wasted so much time on it. I am writing the results for the summary command for a single variable in a foreach loop, using putexcel,...

View Article


How do I do stcox or stmc with a categorical variable?

Hello Statalist and welcome to me. I look forward to assisting other users with aspects of Stata that I am familiar with. I'm trying to do survival analysis in Stata with both categorical variables and...

View Article

matrix with loops

Hi everyone, few hours ago I was having problems posting here something with rich text, so I hope everything goes fine now. I have a very small dataset of a survey of perceptions. I have six variables...

View Article


Panel Attrition - too many Rejoiners

Hello, I´m working with the SOEP(Lecture-Dataset). I would like to analyse the panel attrition from 2000 - 2008 using the code provied in Applied Health Economics Chapter 10. miss = 1 if in sample and...

View Article

Gauss Error Function in Stata

Dear All, I am writing to seek help on the Error function in Stata. I would like to write a survival function from the cumulative distribution function of lognormal distribution but cannot figure out...

View Article


Interpretation of BIPLOT

Good morning listers, I have a dataset of 1500 respondents with their status on 7 ordinal variables that are supposed to represent cardiac health. Although Males and Females have similar total...

View Article

Specifying iterations for biprobit 1st, 2nd models

Good morning, I am running a biprobit model in Stata 14, and want to stop the first two "fitting" equations after a max number of iterations. (In order to skip over non-converging models... I am...

View Article

Doubts about using xi: command

Hello Stata users: I'm new in Stata, and would like to ask a question related to the use of the command xi: I've been reading about this command, which can be really useful when we do a regression that...

View Article
Browsing all 72769 articles
Browse latest View live


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