stata

  1. J

    Constraints on Partial Derivative of Function

    1) Let's say I have the following function: Y = b0 + b1(L) + b2(L)^2 + b3(L)*(K) where b# are coefficients. I want to run a regression with the following constraint: dY/dL = 0.2 I could use the cnsreg command, but how would I define this constraint in Stata? 2) I want to do the same thing...
  2. N

    Panel data graphs in STATA using by command

    Hi i am trying to make graphs using stata of panel data, with alot of stocks. The by variable i have to use is stock name, so that i get a two way line plot of a stock price and date for every stock in the panel data. The problem is when i use stock as the by variable, stata produces 400...
  3. G

    Time-Varying Coefficient Model

    I would like to estime a Time-Varying coefficient model, presented in Chow (1984). This model can be modeled in a state space representation using the Kalman Filter I regress the yield bond spread (Y_t) on several independent variables (X_t). The betas follow a random walk path...
  4. B

    Help please, maximizing function w/respect to one x variable

    OK, so I'm working on this hw assignment (I'm a grad student, and for this class this is for knowledge, not points). We were given a large data set to regress in Stata. I've got the regression and first several questions done. Now, they want us to find the optimal x4 value (I have about 8 x...
  5. L

    missing values for repeated measures ANOVA

    Is it okay to do repeated measures ANOVA if I have missing values (using STATA 11.2)? Here's my study design: 2 groups (control and treatment). Control group gets measured at 2 timepoints, treatment group has 3 timepoints (different n at each time point). For example treatment group has n=9...
  6. M

    Need quick reply

    If I have three categories (yes, no and don't know) for a single variable (say Effective_policies_in_hospital) with 50% 25% and 25% respectively... I am only interested to test whether this 50% is significant... Can I run prtest from stata by coding these three categories 1 0 0 and testing it...
  7. F

    Comparing ln(y) =bX vs. OLS and other count data models

    My data is a balanced panel. 12 years X 600 ids/year X 12 months = 864,000 observations. For about 150 of my 600 ids, at a certain point in this 12 year period a treatment is applied switching them to the "treated" or "on" state. A dummy variable AFTER indicates when this is true. My...
  8. L

    Problems with predicted probability logit/probit

    Hi I have to process a probit regression with 10 variables, 2 continuous, 6 dummies and 2 categorical. So I process xi: probit y x1 x2 x3 x4 x5 x6 x7 x8 i.x9 i.x10 After I want to have the predected probability for the variables' coefficients. Which command shall I use? Margins (but it...
  9. Z

    How to generate a table with weighted values and percentages of the variables used?

    Hi all, I've been looking all over the web for a solution to this but to avail! So, I'm turning to this forum for a solution, if it exists! I want to generate a cross tabulation (between 2 variables) in Stata and have the resulting table to show both the weighted values and the percentages...
  10. L

    xtprobit regression with a cluster

    Hello everybody, I have a huge problem that I hope you can help me to solve, since I have not found anything helpful in the web. I have a WIDE dataset, made of: - a variabile called "people" (with 660names) - 32 variables, called "action1".."action32", with value = 1 or = 0 (in order to...
  11. H

    Hello!

    Hi all, I recently discovered an interest in statistics and playing with Stata a lot. I just want to play around with more datasets from different industries with different perculiarities to get a deeper understanding of the concepts and commands. Please send some my way and would be nice...
  12. A

    Panel Data: Vary in time but constant for all individuals

    Dear all, we are using a standard panel model like Y_it = a_i + b*X_it + e_it. For one additional variable (prices=P) we only have observations through time, but not across individuals, i.e. prices are the same for all individuals (think of "i" being the districts and prices are given for...
  13. A

    Repeated weeks in time series

    Hello! I came across the following error when I tried to run the command xtset : repeated time values within panel. I guess the problem is the repetition of week 52 in the sample below. What do you think is most appropriate to do in this case? I would prefer not to loose any of the weekly...
  14. L

    ANOVA - one-way vs repeated measures? or both?

    What is the best way to analyze this data please? I have 2 groups (treatment group, control group) and 2 time points for each group (day 0, day 1, day 30). I want to (a) compare the treatment group to the control group at each time point, ideally to show that they are not different at day 0...
  15. M

    TSLS in STATA 11

    Hi all, How can I use Two Stage Least Squares estimation method in STATA 11? Thanks a lot
  16. O

    Plot matrix

    Hi, I'm running a regression in order to produce a housing index which works as follows: I have 94 dummy variables representing months during which apartments have been sold. If apartment "k" was sold during month "i" then month`i' will have value 1 and all other dummys will be equal to...
  17. Q

    Question about dealing with missing values in regression

    Hey guys, I have a dataset with ~50 variables, but my dataset is incomplete. For some of these variables (e.g. those for gender) i have created dummy variables to compensate for this so that when i run a regression with these problem variables, i include the variable and the newly created...
  18. M

    I reshaped long and now there are more categories in my encoded variables!

    Hi :) I reshaped my dataset and now my encoded variables have more categories than they had. What may be the cause? (PERS_ID is the identifier for the person while STU_ID identifies the identification number and then change if the student switches between majors in the university system of my...
  19. S

    Any way to read in a SAS dataset WITH an external format/catalog library?

    Hi, I posted this to the SAS forum as well. I have a large SAS dataset (v9.3) that carries a SAS format catalog/library (as a separate file). Is there any way to import the dataset with the formats (which is the SAS term for value labels here)? I am using Stata (v11/MP). The data moves...
  20. A

    ROC Specify Cut - Offs

    Hi, I am conducting a couple of ROC's to compare our sample with the results from other analyses and am a little stuck Basically other papers have looked at specific cut offs (e.g 50) however whenever I run the analysis in SPSS my cut offs are all varied, for example 50.5, or 48.5, which...