1. 10-14-2010
+ Post New Thread
Page 1 of 28 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... LastLast
Threads 1 to 60 of 1647

Forum: Stata

Stata usage and programming, Stata help

  1. Date variable- only month

    Hi Guys, I have a date variable, save in the type below. example 03 Jul 14 DateToday long %dD_m_Y I would like to...

    Started by Marvin85‎, Today 11:05 AM
    date, month
    • Replies: 0
    • Views: 66
    Today, 11:05 AM Go to last post
  2. Keep IDs - "too many literals" error

    Hey guys, I want to keep only certain sample of my population based on agency_id. My try was keep if agency_id==1 | agency_id==2...

    Started by Marvin85‎, 04-29-2014 11:57 AM
    error, keep id, too many literals
    • Replies: 7
    • Views: 421
    Today, 09:44 AM Go to last post
  3. Value Labels to many Variables

    I have a series of variables with responses 1=Yes 0=No. I want to label the values of these variable in a efficient way. This is my try but it is...

    Started by Marvin85‎, 07-14-2014 01:02 PM
    foreach, label values
    • Replies: 2
    • Views: 98
    Today, 08:56 AM Go to last post
  4. Question How to convert a data stored as year (only) to 01/01/year?

    Hi, I am using STATA and in my dataset date of birth is as year (no md). I want to calculate the age. So I need the dob as mdy do that can format it...

    Started by leilafg‎, Yesterday 05:13 PM
    • Replies: 1
    • Views: 99
    Yesterday, 08:34 PM Go to last post
  5. Question Graphically check linearity in logit regression

    Hi all, I am running a logit regression where the outcome variable is binary. I am interested in checking, graphically, whether the relationship...

    Started by Phaedrus‎, 07-21-2014 07:50 AM
    2 Pages
    1 2
    • Replies: 16
    • Views: 255
    Yesterday, 09:45 AM Go to last post
  6. Controlling for autocorrelation in a regression

    Hi all I have a panel data; I ran the Hausman test and it showed a significant p-value, thus I conduct my regression by using 'xtreg' command +...

    Started by Man‎, 07-22-2014 08:12 AM
    • Replies: 0
    • Views: 77
    07-22-2014, 08:12 AM Go to last post
  7. Outreg2 - table with summary statistics

    I run the regression and then type: outreg2 using myfile, sum word seeout replace In Stata the table is seen with obs, mean, std.dev, min and...

    Started by Eric_B‎, 06-15-2014 02:15 AM
    • Replies: 1
    • Views: 206
    07-22-2014, 02:19 AM Go to last post
  8. Volatility of abnormal returns.

    Hi all, When employing raw returns, one defines performance volatility as the standard deviation of these raw returns over some prior period (say...

    Started by Man‎, 07-21-2014 11:04 AM
    • Replies: 0
    • Views: 61
    07-21-2014, 11:04 AM Go to last post
  9. How to save constant terms (_cons) as a new variable in STATA.

    Hello, I have an unbalanced panel data. I examine 850 mutual funds during the period of 2000-2013. I ran regressions to estimate performance by...

    Started by Man‎, 07-15-2014 03:45 AM
    constant, intercept, new variable, save, stata
    • Replies: 3
    • Views: 171
    07-21-2014, 02:30 AM Go to last post
  10. Power analysis for a 4x2 Experimental Design

    Hi everyone, I am trying to run a power analysis for a 4x2 design based on a 6x2 design. So far, the examples I've found online are for simpler...

    Started by g2007‎, 07-20-2014 12:29 PM
    • Replies: 0
    • Views: 92
    07-20-2014, 12:29 PM Go to last post
  11. merging the same number two datasets into one, but does not work

    deleted, no long available

    Started by colstat‎, 07-20-2014 12:34 AM
    • Replies: 0
    • Views: 72
    07-20-2014, 12:34 AM Go to last post
  12. Why are the predicted values similar and the regression coefficients dissimilar?

    Hello, Have searched the boards for an answer to this question to no avail, any help would be greatly appreciated. I'm running two regressions...

    Started by deesiel‎, 07-17-2014 10:21 AM
    • Replies: 7
    • Views: 228
    07-17-2014, 02:50 PM Go to last post
  13. Smile Generate Variable "quarterly_rebalancing" if "date" < "rebalancing"

    Hi all, I have about 8 years daily stock returns that I would like to transform to cumulative returns over a quarters. I would like to create a...

    Started by amazon‎, 07-10-2014 12:13 AM
    rebalancing date quarter
    • Replies: 2
    • Views: 159
    07-16-2014, 09:32 PM Go to last post
  14. How to multiply observations within one variable in Stata

    I want to multiply observations within a variable in stata. Here's how my data looks like: ID Return 1 1.1...

    Started by Man‎, 07-16-2014 11:15 AM
    • Replies: 2
    • Views: 130
    07-16-2014, 07:18 PM Go to last post
  15. Multiplication of two variables one of which is lagged

    I have a panel data. Basically I need to generate a new variable for each id and year that will be the product of the following formula: new_var(t)...

    Started by Man‎, 07-16-2014 01:27 PM
    • Replies: 2
    • Views: 117
    07-16-2014, 07:17 PM Go to last post
  16. Creating a new variable from several existing ones

    Hello, I already have ID variable, DATE variable, and now I want to create a new variable that will assign a certain number (say new id) to each...

    Started by Man‎, 07-15-2014 07:02 AM
    new variable
    • Replies: 3
    • Views: 145
    07-16-2014, 07:16 PM Go to last post
  17. Getting alphas for each fund in each year and saving them

    :wave:Dear all, I have an unbalanced panel data of monthly returns on 200 funds over 10 years. I need to estimate Fama-French alphas (with HAC...

    Started by Aiko‎, 07-15-2014 07:56 AM
    • Replies: 0
    • Views: 64
    07-15-2014, 07:56 AM Go to last post
  18. Using .dat file on Stata

    Hello all, I need to use a .dat file in Stata. I have never used this type of file before and do not know how to convert it to a format which...

    Started by econlearner‎, 06-14-2014 02:52 PM
    • Replies: 3
    • Views: 239
    07-13-2014, 11:29 AM Go to last post
  19. Unhappy Help Needed :( - Problem Basic Reshape - Stata

    Hi everybody, I have the following data: date A AAP AAPL ABC ACN ACT ACXM 8/15/2006 9.3 0.4 3.9 0.3 1 1 0.9...

    Started by amazon‎, 07-12-2014 03:58 PM
    reshape long
    • Replies: 1
    • Views: 111
    07-13-2014, 12:27 AM Go to last post
  20. Unhappy Help Needed

    Hello everyone I am new to stata and have a question to all you Pro guys: I have two variables, disease A and B. If these two disease occur at...

    Started by Usman Khalid‎, 07-08-2014 01:18 PM
    • Replies: 1
    • Views: 154
    07-12-2014, 12:53 AM Go to last post
  21. stratifying a box plot for two variables

    Dear all, this is my problem: I have two depvar and I want to graph them over two different variables in a way to obtain a combination of the two....

    Started by Rerun‎, 07-09-2014 12:08 PM
    • Replies: 0
    • Views: 102
    07-09-2014, 12:08 PM Go to last post
  22. testing size difference between 2 groups

    Hi, I am trying to compare the proportion of spending (all values except those in the percent column are in dollars) on Policy between each YC. The...

    Started by winnie1825‎, 07-07-2014 01:39 PM
    • Replies: 0
    • Views: 138
    07-07-2014, 01:39 PM Go to last post
  23. limited dependet variables : xtreg ,fe or probit / predict yhat or ..... . ??

    Dear Sir, I am having a dependent variable Credit Rating and it is a limited dependent variable. Independent variables are profibitability, firm...

    Started by ivobaren‎, 07-04-2014 05:06 PM
    • Replies: 0
    • Views: 192
    07-04-2014, 05:06 PM Go to last post
  24. STATA panel regression with fixed effects : xtreg dependent independent,fe

    Dear Sir, My professor told me to use stata with the following commands: 1 Encode Cusip,gen(Cusip1) 2 xtset Year Cusip1 3 xtreg dependent...

    Started by ivobaren‎, 07-03-2014 07:09 PM
    • Replies: 1
    • Views: 122
    07-04-2014, 02:19 AM Go to last post
  25. problem merging 1:1

    Hello all, I'm trying to merge two data sets. Data 1 contains the following variables: interview date, household longitude and latitude,...

    Started by Keily‎, 07-01-2014 11:57 AM
    1:1, merge, merging, stata
    • Replies: 2
    • Views: 170
    07-02-2014, 02:46 PM Go to last post
  26. How to interpret log independent variable in a fixed effects model

    Hi, I'm currently doing an fixed effects analysis with vaccine incidence as the dependent variable and log non-hospital healthcare spending as the...

    Started by samiam9508‎, 07-02-2014 09:05 AM
    • Replies: 1
    • Views: 170
    07-02-2014, 01:20 PM Go to last post
  27. Recode all variables missings

    How can I recode -99=. for all my variables? I think there is something that represent all variables maybe *? Or foreach X? I am not so familiar...

    Started by Marvin85‎, 06-30-2014 10:30 AM
    recode all
    • Replies: 4
    • Views: 175
    07-02-2014, 08:44 AM Go to last post
  28. Merging three files, building panel data and regression

    I'm not a complete newbie in Stata, but I think I'm probably newbie by the standards of the forum, I think. The thing is, I'm trying to build a...

    Started by Daeiooo‎, 07-01-2014 09:29 PM
    merge variables, panel data, stata
    • Replies: 1
    • Views: 118
    07-02-2014, 02:29 AM Go to last post
  29. graphing an interaction in Stata

    Hello, I am trying to find the correct way to graph an interaction effect between two continuous variables in Stata. My regression, the code is ...

    Started by jesse‎, 11-19-2012 02:31 AM
    • Replies: 2
    • Views: 3,773
    06-30-2014, 08:43 AM Go to last post
  30. Question 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,...

    Started by xiaoyanhuang‎, 11-10-2011 02:10 PM
    • Replies: 11
    • Views: 5,487
    06-26-2014, 03:26 AM Go to last post
  31. How to construct industry portfolio?

    Good afternoon, all! My problem is constructing weights of industry portfolio properly in STATA. I have panel data of market capitalization,...

    Started by Onlyvictory‎, 11-21-2012 10:57 AM
    • Replies: 6
    • Views: 887
    06-25-2014, 10:27 AM Go to last post
  32. Basic t-test question

    Hi everyone, I have to conduct a t-test for a proportion in Stata and was going to use the command prtest. However, this command calculates a z...

    Started by takemeaway‎, 06-25-2014 07:30 AM
    • Replies: 1
    • Views: 232
    06-25-2014, 08:22 AM Go to last post
  33. loop regression based on variable

    Dear statisticians, I'm trying to loop a regression on a panel data set. I have the following variables: iden1: cross sectional variable...

    Started by CPJR‎, 06-17-2014 03:17 PM
    forvalues, loops, panel data
    • Replies: 1
    • Views: 202
    06-22-2014, 05:47 AM Go to last post
  34. Modeling ARCH effects in Vector Autoregression

    Hi all, I have constructed a VAR(p) model with 3 time series in Stata. When I predict the residuals and run an AR(p) model (with p=1, 2, 3, and 4)...

    Started by claimed101‎, 06-21-2014 07:04 AM
    arch, heteroskedasticity, var
    • Replies: 0
    • Views: 234
    06-21-2014, 07:04 AM Go to last post
  35. Ratio as an independent variable

    Hi, I am planning to use ratio of the type of ownership as the independent variable in one of my Tobit models. I am considering three ratios;...

    Started by Fernando1981‎, 06-20-2014 12:56 AM
    • Replies: 0
    • Views: 187
    06-20-2014, 12:56 AM Go to last post
  36. How can I extract 10th occurrences in panel data Today

    Hi All I have panel data which consist of stock prices of 1000 stocks over 20 years. I want to get the stock price of the 1st & the 10th trading...

    Started by Sam J‎, 06-19-2014 01:31 AM
    • Replies: 1
    • Views: 169
    06-19-2014, 10:33 PM Go to last post
  37. Exclamation What is the stata command for two way repeated measures ANOVA??!!

    Hi :wave: I was hoping if anyone can clear up this minor confusion with regards to stata (im a beginner) and it would be great if someone can...

    Started by Emma121‎, 06-17-2014 03:57 AM
    anova, commands, repeated measure anova, stata, stata 12
    • Replies: 1
    • Views: 149
    06-19-2014, 07:08 AM Go to last post
  38. Margins with vce(unconditional)

    Hello Stats, In Stata I'm using the following logit-command: logit vary varx1 varx2 varx3 i.varx4 i.varx5, cluster(varx5) or the output shows...

    Started by lund_kasper‎, 06-19-2014 04:34 AM
    • Replies: 0
    • Views: 135
    06-19-2014, 04:34 AM Go to last post
  39. Looping in Stata

    Hi everyone, This is the problem I am dealing with. I have this data from the a book publishing site. It looks something like this: Author ...

    Started by sreten‎, 06-16-2014 10:56 AM
    • Replies: 2
    • Views: 222
    06-17-2014, 04:53 AM Go to last post
  40. Code for finding correlation between observations within separate categories

    Hi All, Let me provide an example of the problem I am working with (this is not the data I am actually dealing with, but it should make it easier...

    Started by Salohcin‎, 06-15-2014 09:32 AM
    • Replies: 0
    • Views: 197
    06-15-2014, 09:32 AM Go to last post
  41. Nonnumeric characters: "," and "%"

    The data on one of my variables is in percentage format with commas instead of dots. It seems like I need to get rid of them both. I try to destring,...

    Started by Eric_B‎, 06-14-2014 03:10 PM
    • Replies: 2
    • Views: 240
    06-15-2014, 02:00 AM Go to last post
  42. Stata output to Excel

    Is there a way to export Stata outputs into Excel? For example, log using Demo, replace text But instead of exporting the output in a text...

    Started by Marvin85‎, 06-13-2014 02:58 PM
    export, log, stata output
    • Replies: 1
    • Views: 181
    06-13-2014, 07:34 PM Go to last post
  43. Unit Root tests with panel data

    Hello all! For researchers etc. out there, is it correct to use a Dickey-Fuller Test to test for stationairty when you're using cross country...

    Started by seanyshuffler‎, 06-13-2014 08:29 AM
    • Replies: 1
    • Views: 176
    06-13-2014, 01:08 PM Go to last post
  44. Smile Stata Query - counting no. of obs - simple problem?

    Hi everyone, I am really struggling with the command/program required to solve the STATA problem below and I really hope someone is able to help...

    Started by kittubaba‎, 06-12-2014 09:09 AM
    • Replies: 0
    • Views: 173
    06-12-2014, 09:09 AM Go to last post
  45. Rewrite SAS code to STATA code!

    Can someone rewrite me SAS code to STATA code. (simple 5 lines sas code)

    Started by Vlajkony‎, 06-09-2014 03:00 PM
    • Replies: 6
    • Views: 257
    06-12-2014, 08:52 AM Go to last post
  46. Spatial autocorrelation

    Does anyone know how to use spatial autocorrelation for a single variable in STATA. In my case, for variable-marketable surplus of wheat, I need to...

    Started by nitish‎, 06-11-2014 03:25 AM
    • Replies: 0
    • Views: 279
    06-11-2014, 03:25 AM Go to last post
  47. Lightbulb problem with xtcsi and xtmg command

    Hi Everyone, I am trying cross sction depndence and slope homogenety test for my panel,when i use xtcd and xtcsd for testing cross-section...

    Started by eli ahmadpour‎, 06-10-2014 04:12 PM
    • Replies: 0
    • Views: 249
    06-10-2014, 04:12 PM Go to last post
  48. Dealing with Imputed data

    Hi guys! I was wondering could people give me a hand with some problems I'm encountering while working with panel data. I'm testing the effects a...

    Started by seanyshuffler‎, 06-10-2014 03:36 AM
    • Replies: 0
    • Views: 156
    06-10-2014, 03:36 AM Go to last post
  49. qreg with respect to the quantiles of the independent variable possible?

    hi, I'm using quantile regressions in Stata and was wondering, whether there is a way to run a qreg so, that it considers the quantiles of an...

    Started by Indigo‎, 06-09-2014 10:45 AM
    • Replies: 0
    • Views: 117
    06-09-2014, 10:45 AM Go to last post
  50. Question Interaction terms in logistic regression (help)

    Hi all, I'm in doubt with two models that I don't know if they are correct. I'm most interested in the second model that compares individuals...

    Started by Rafael‎, 06-06-2014 01:02 PM
    • Replies: 1
    • Views: 227
    06-06-2014, 01:07 PM Go to last post
  51. Buying computer for STATA12 project

    Hey all, I am a researcher working with large datasets (6-8 GB). I am looking to purchase a new computer mainly to handle this work. I am looking...

    Started by mzapf88‎, 06-05-2014 05:52 PM
    • Replies: 4
    • Views: 278
    06-06-2014, 02:49 AM Go to last post
  52. Ordinal variable difference between pre and post- age IV

    I have a self-efficacy scale ordinal 1 to 5. I ask this question in pre and post tests. I would like to know if age affect the change in...

    Started by Marvin85‎, 06-05-2014 10:27 AM
    ordinal, signrank
    • Replies: 3
    • Views: 171
    06-05-2014, 02:00 PM Go to last post
  53. How to list IDS that have multiple observations

    How do I list ids that have multiple observations Say I had Ids - some have multiple observations of pain scores at different days. I want to...

    Started by therookie‎, 06-05-2014 06:26 AM
    • Replies: 0
    • Views: 108
    06-05-2014, 06:26 AM Go to last post
  54. Beginner's question on replace command

    I have a string variable called Region. Right now, it's identical to another variable I have called Country. I want to change the Region column so...

    Started by solarium‎, 05-29-2014 01:25 AM
    • Replies: 3
    • Views: 233
    06-04-2014, 08:28 PM Go to last post
  55. Time fixed effects

    What is the interpretation of the coefficient of the year dummies (in a fixed effects model)? What do they tell me? Why are the negative? Is the...

    Started by Pvunderink‎, 06-04-2014 06:22 AM
    • Replies: 0
    • Views: 149
    06-04-2014, 06:22 AM Go to last post
  56. NBER Patent Data Project in Stata

    Hello, I am trying to match compustat data with patent data by following this guideline: http://users.nber.org/~jbessen/matchdoc.pdf Anyone did...

    Started by Benno‎, 06-03-2014 07:32 AM
    • Replies: 2
    • Views: 281
    06-03-2014, 07:55 PM Go to last post
  57. Lightbulb Moving Window Principal Component Analysis

    Hi, I'm finishing my thesis we're I'm forming currency-hedge investment portfolios out of the PCA on the currencies. I need to do a PCA using a...

    Started by JBM_1990‎, 06-02-2014 07:06 AM
    moving window, pca, r studio, rolling, stata
    • Replies: 1
    • Views: 242
    06-03-2014, 07:39 PM Go to last post
  58. help :: how make a column of the sum total of a dummy

    please helpp i dont know how to make the last column: the las column is the sum total of the dummy=year i mean the sum of the people how have the...

    Started by varevalo89‎, 06-02-2014 05:50 PM
    • Replies: 1
    • Views: 165
    06-03-2014, 07:17 PM Go to last post
  59. Table structure of basic stats

    Running the tabstat command with several variables gives me a table with variable names as columns, and the stats I specify as rows. For example: ...

    Started by grreee12‎, 04-22-2014 11:37 AM
    • Replies: 1
    • Views: 261
    05-29-2014, 09:35 PM Go to last post
  60. Exclamation Searching for accurate specification - panel data

    Hello Everyone, I am about to find best specification for my dataset. To begin with - I am trying to probe the effectivenes of the special...

    Started by charlie9207‎, 05-29-2014 03:35 AM
    correlated errors, distribution tests, fixed effects, stata
    • Replies: 0
    • Views: 178
    05-29-2014, 03:35 AM Go to last post

+ Post New Thread
Page 1 of 28 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... LastLast

Thread Display Options

Use this control to limit the display of threads to those newer than the specified time frame.

Allows you to choose the data by which the thread list will be sorted.

Order threads in...

Note: when sorting by date, 'descending order' will show the newest results first.

Icon Legend

Contains unread posts
Contains unread posts
Contains no unread posts
Contains no unread posts
More than 15 replies or 300 views
Hot thread with unread posts
More than 15 replies or 300 views
Hot thread with no unread posts
Closed Thread
Thread is closed
Thread Contains a Message Written By You
You have posted in this thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Advertise on Talk Stats