Recent content by Marvin85

  1. M

    Modeling number of days in a clinic

    Thank you Smith. It is the first time I am modeling length of stay. I will take a closer look at log of LOS. Thank you again!
  2. M

    Modeling number of days in a clinic

    What do you mean? subtract discharged date/time minus admission date/time? I have this variable as the dependent variable? I did this by round to days. ex. some patients have 3, 6, 90 days in the clinic. Can you elaborate?
  3. M

    Modeling number of days in a clinic

    Hello guys, I wish to model the number of days patients stayed in a clinic. Some of my predictors included: type of injury/disease, age, insurance, etc. Since days are count data and my data is over-dispersed, negative binomial models seem to be the appropriate technique. However, I know that...
  4. M

    logistic regression or survival analysis?

    Hello, I have two main questions that I hope you help me answer. Let me give you the scenario first. Let’s say that some students in a school are assigned to 3 different programs after being involved in a fight. The aim of the program is to prevent students from fighting with each other. My...
  5. M

    Generating rates: individual level or aggregate??

    Using approach 1; the average number of infraction per 100 days is 0.7 and option 2 ((7/175)*100)=0.9
  6. M

    Regression: Independent variable (proportions) with missing values

    Hello, My dependent variable is counts of fights in schools. My independent variable is the schools’ proportion of students with a single parent. I hypothesized that schools with higher proportion of students with only one parent will have more fights. I used a negative binomial regression...
  7. M

    String: Pull characters before "-"

    Hi guys, I have a string variable that looks something like this: MMDC-6MA. I need to extract the first letters before the sign "-", So I need GMDC. Any ideas? Thank you, Marvin
  8. M

    Census data: Should I worry about sample size and pvalues?

    Hi all, I have a questions regarding statistical power and sample size. (1) Do I have to worry about sample size in a multiple logistic regression if I am using all the individuals in a population (census) and not a sample? Let’s say that I want to see how many tourists in a resort report a...
  9. M

    Pre and post with control: Difference in median

    I created the difference between pre and post UOF counts and then generate a variable that represents the median for each group. base on my calculations the median difference in pre is 2 UOF and post 2. Thank you, Marvin
  10. M

    Pre and Post with Treatment group - ANOVA , ANCOVA, Regress differences???

    Hello friends, My main task is to "test" if staff member who participated in the counseling sessions had fewer "Use of Force (UOF)" incidents in the 6 moths after the counseling session. I have a data set with the number of UOF incidents for the staff member in the 6 months before (pre) and...
  11. M

    What model should I use? Mixed-effect model?

    Hello guys, I really hope you can help me with this. Any ideas/suggestions are welcome. My main goal is to create a model that predicts which staff member is more likely to use force (UOF) in a mental health center. The goal is to detect these officer and prevent them from using force. To...
  12. M

    Save graph vs saving

    Hello guys, What is the different between the "saving" options at the end of the command and the new command save graph filename? I have a do file with a serious of command including charts. When I use the command below and run the file multiple times I got the following error message...
  13. M

    Do I have a non-linear regression?

    Hello everyone, I want to start by saying that I don't have too much experience working with continuous dependent variables. I have worked more with Logistic regressions. I want to test if the numbers of Use of Force (UOF) a staff member of a mental clinic had in year 2014 predicts the...
  14. M

    New ID variable using date variable

    I have a ID# for all my teachers but I noticed that there are some instances that an 2 or more teachers can have the same ID#. I want to create another unique ID# for teachers using my old ID # plus the month and date of their birthday. I have a day of birth variables which is storage as date...
  15. M

    String date to date variable

    I have a string variable containing dates (1/28/15) (DAateToday) and would like to make it a real date variable. I tried: gen RealDate=date(DateToday, "MDY") But it didnt work. After I have my date variabel I would like to create a variable that only includes the month and year...