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

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 Article


Probit - 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 Article


95%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 Article

Regression 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 Article

Simple 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 Article


Cumulative 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 Article

Generating 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 Article

Calculating 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 Article


forval 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 Article


From 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 Article

beta 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 Article

Quantile 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 Article

Panel 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 Article


Problems 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 Article

Regression 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 Article


Replacing 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 Article

Bug 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 Article


foreach 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 Article

repeated 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 Article

Bimodal 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
Browsing all 72756 articles
Browse latest View live


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