# stata

1. ### Frequency Count Question

Hey everyone, I have a question involving counting frequencies. I have a variable x that takes on values between 1 and 5. And some of them occur more than once, so x= 1 1 1 2 3 3 4 5 5 5 I want to create a dummy variable that equals one when a number only occurs once in the...
2. ### Loop Question for Data Cleaning.

Hi guys, First time posting. I have a question as I have just started doing some data cleaning with Stata. I have had to personally identify certain numbers I want to change in Stata from another dataset. And for these numbers, I want to make a dummy variable=1. My current code...
3. ### Using Stata for Card and Krueger's minimum wage: need help with "reshape" variables.

I have this question about the where I have a data set based on Card and Krueger's minimum wage study in New Jersey and Pennsylvania and how it effects employment. I've done these commands. rename psoda psoda1 rename pfries pfries1 rename hrsopen hrsopen1 rename emp emp1 rename NJ NJ1...
4. ### Obtaining population estimates for multiply imputed survey data

My data is mi set (multiply imputed) and I am analyzing it using the mi commands. It is survey data, so it is also svyset. I can see that mi commands allow one to obtain proportions, ratios, and means using the command structure "mi estimate: svy: [proportion/mean/ratio]" but the command I...
5. ### r (2000) code Stata. HELP!!!!!!!!!!!!!!! please

We are currently running a probit model based on the determination of the probability of blue collar workers applying for unemployment benefits using Mccalls 1995 data set as a restricted model using the following variables: bluecol: dummy, 1 if blue collar worker stateur: state...
6. ### Panel Data Regression with Few Observations

Hello! I know very little of statistics but I need help to do my thesis. I'm running a regression with fixed and random effects in a panel data of 5 countries with 11 years of data. The number of variables I'm using are 5 and I need to analyze also a model with 6. Is this feasible? If not...
7. ### Stata - Merging 2 datasets

Hi all, How can I merge Dataset1 and Dataset2 to create Dataset3? Merge m:m Group doesn't provide the result expected... Thanks for your help. StdDev. Dataset1 Group Elt A 01 A 02 A 03 B 04 B 05 C 06 C 07 Dataset2 Group Type A CP A CM B CB B TD C CA...
8. ### Ranked Data analysis Help

Hi I need help analyzing data from a survey. i am looking at consumers shopping venue and their confidence in regulation by various industry players. Shopping venues question: please choose your top 3 shopping venues (1 for each and zero for those not chosen) Confidence questions: How...
9. ### merging datasets with population weights in STATA

I would like to compare means and percentages from a small sample dataset to a large population national dataset. The population dataset has population weights. I have stset the population dataset but I need to merge the two datasets in order to run analyses. I am wondering how I can...
10. ### Comparative study and too many variables

Hey guys. I've been sociology for quite some time but I'm still pretty inexperienced in statistics and Stata. Here's my problem: I'm working on a comparative study between Poland and Denmark in regards to social life and education. What I'd like to do, is to compare the respondents level...
11. ### Survey data and STATA svy functions

Hi! I'm working with a large dataset which is heavily weighted. I need to produce the distribution of weights by key variables in our dataset (region, race, etc). This may be an elementary question, but to produce the distributions do I use the "summarize" and "tab" functions, or do I need to...
12. ### Logistic Regression: Testing for interaction effects with many covariates

Hello everyone! As topic states, I am running a logistic regression with quite a lot of independent variables (23). There are a lot more candidate variables but this is the best model I ended up with. I would like to know if there are any possible interaction/synergy effects among them, but...

Hi all, I have this question and have been toiling on it for days. Am not sure if I'm tackling it correctly. A group of patients attending a particular program were assessed at the start of program and then at the end of the program. Some in the group were prescribed medications before end...
14. ### Predicting 5 year survival Kaplan-Meier

Hi all, I need to predict 5 year survival proportion with a kaplan meier plot. Thus far, I'm getting mean and median survival times. How do I get what I need? Thank-you very much.
15. ### Entering values into a matrix from a loop command

I have created a loop to generate a counter variable values that will then be entered into an OUTPUT matrix. Everything except for 1 line seems to be working. The line is here: matrix OUTPUT[i', j']=counter *STATA writes: counter not found. But then I write: display...
16. ### How to draw cubic splines after Cox regression in Stata 11.1?

Hi everyone:), In a cohort study, I would like to draw cubic splines, including HR and 95% CI, after Cox regression adjusted for age and sex. Yet, I have not found out the solution:confused:. Suppose that there are variables as follows: observetime, censor, variablex (the independent...
17. ### Stata Project Help (10-12 hour Job)

Dear All, I need your help regarding one of my projects of Stata software. You must be familiar with dates formatting, system variables and lagging and merging and transposing of data. I understand you would be busy in your job and studies, and that is why I am happy to pay you reasonable...
18. ### non-linear regression

I'm a newbie to STATA and am trying to estimate a parameter using the 'nl' command. Here is the syntax: . nl (c1 = (c2^{a}-c2^{a}*y1^{a}/x1^{a}+y1^{a})^(1/{a})) The dataset has c1,c2,x1 & y1 given and I want to estimate a. However, I am getting the following error: "starting values...
19. ### Power Calculation using Stata

Hi, I am involved in a clinical study where I need to ascertain that the study has adequate power. The study aims at understanding the effect of a program on patients. We are required to have a control and a treatment sample. I believe I can recruit about 22 individuals for the study in each...
20. ### Interrater Reliability of Dichotomous Variables

Disclaimer: Not psychological research, I know, but the type of statistics are more often used in psychology than in medicine, so I'm asking for help here. Background: I had 4 radiologists read CT scans of ~50 patients to assess whether a series of 'signs' were present or not. After a washout...