Creating rows for interpolation
Dear All, I have a dataset (on consumption) for the following years: 1980, 1985, 1992, 1996, 2004 and 2010, for 108 individual observations. Now I want to interpolate for the missing years, i.e. 1981,...
View ArticleProbit - omitted variables
Hi all, I am currently encountering difficulties concering a probit analysis. I am researching the factors that influence a company's decision to withdraw. So my dependent variable is withdrawn,...
View Article95%CI for interater agreement & weighted kappa
Hello, I'm using Stata 13.1. Can you please give me some guidance on how to estimate 95% CI for weighted kappa and interater agreement among 3 observers and 6 ratings? Ratings can be analyzed as both...
View ArticleRegression output
I am using Stata 14.0. I am trying to put all my regression output in big excel file, where each time after running regression all those result will append one by one. ****************** set more off...
View ArticleSimple pb with long format
Hi there, I am starting with stata and I would really appreciate some help on this problem, I know it is quite basic but I can't get it. I just would like to numbers the different value of one variable...
View ArticleCumulative Accuracy Profile and Accuracy Ratio
All, Anyone knows what the commands are for a CAP curve and AR respectively, or is there a specific package to install? Thanks tons. AK
View ArticleGenerating a count of a variable based on unique identifiers?
Hi there, This might be simple and I'm missing something, but I'm looking to do a count of a couple of things. Here is an example of my data: +-------------------------------+ | chart_id gender dx_code...
View ArticleCalculating unadjusted and adjusted risk differences using svy
Hello, I am using Stata 12.1. I am analyzing DHS data using the svy command. I would like to calculate unadjusted and adjusted risk differences (rather than ORs or RRs). I've seen this done with the...
View Articleforval loop overwriting its previous iterations
I’m having a rather silly problem with a simple forval loop, such that the last cycle of the loop seems to be populating all previous local macros created therein. I am simply trying to record a series...
View ArticleFrom String Scalar to Numeric Scalar
Dear All, I encountered a problem when using -inequal7- (this may also happen in other commands). Code: inequal7 income return list scalar gini = r(gini) I used the above code to store the gini...
View Articlebeta coefficients with outreg
Hi all, I'm using outreg2 to produce an output table and want the coefficients displayed as standardized beta coeffs with se below. I have the code Code: outreg2 using results.doc, title("results")...
View ArticleQuantile regressions with clustered standard errors and sampling weights
Hi Statalist, I am having troubles estimating quantile regressions using both clustered standard errors (by country in a multi-country regression) and sampling weights. The command qreg does not allow...
View ArticlePanel data: Mean of DISTINCT population observation
I have a "census" data set. Each row is the number of patients living in the specific housing area of a facility for the each day. I generated a total number of patient per day for the facility. sort...
View ArticleProblems with destring
I'm working with a Household Income and Expenditure National Survey, so I got a stringed variable My variable name is clave, and it contains letters and numbers. It is a str4 type and in %4s format. If...
View ArticleRegression after PSM and DD mathcing
Hi all, I’ve been working with quasi-experimental methods, but have not been able to solve these naïve doubts. I’m implementing PSM for my subset1 and DD matching for my subset2. Let’s assume y is the...
View ArticleReplacing variable value for groups in unbalanced panel data
Dear Statalist I am running Stata 14.1. I have an unbalanced panel which follows the same set of individuals from 2009-2014. I have 99,742 obs in total. To illustrate my question, I've created the...
View ArticleBug in -describe- when varlist starts with "in" ?
Dear Statalist. I think I found a bug with describe when it tries to parse varlists that start with "in" Code: clear set obs 10 gen ina_ex_od=. gen out_ex_od=. des out*ex_od des in*ex_od Last command...
View Articleforeach with strange error
Would anyone know why the `i' does not show up in the \`i'\ part of my code? Stata is having trouble finding the file because it does not read the link correctly in the foreach below Code: . foreach k...
View Articlerepeated time values within panel error(451);
Hello! I have a very short question regarding creating panel data. So I have a very big sample of states with different variables. Now when I use the command xtset state year it states that: "repeated...
View ArticleBimodal distribution in Histogram using STATA
Dear Stata users, I have a public spending data of a sample size of 483 counties. Among these counties, 211 counties did not receive any public funding i.e. 211 zero observations. The rest 272 counties...
View Article