Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Comparing hospital length of stay between laboratory-confirmed respiratory virus admissions

    Hello,
    I want to compare hospital length of stay between children who were admitted with a confirmed influenza virus infection and children who were admitted with respiratory syncytial virus infection, adjusted for some other factors. Length of stay is a positive integer and the independent variable, and overdispersed to low values. Infection is a binary categorical variable (0/1) and the dependent variable. How would I best do this? Many thanks for your help. Minda Sarna

  • #2
    In your study, you're interested in comparing hospital length of stay between two groups of children with different infections, adjusting for other factors. In STATA, this can be approached using regression models that are suitable for count data. Given that your outcome variable (length of stay) is a count variable (positive integers) and is overdispersed, a negative binomial regression would be a good choice.

    Here are the steps and corresponding STATA code you would use:

    Load your data into STATA. This step depends on the format of your data file.

    Exploratory Data Analysis: Before running the regression, it's always good practice to explore your data. This can include checking for missing values, understanding the distribution of your variables, and looking for outliers.

    Code:
    summarize
    tabulate infection
    histogram length_of_stay
    Negative Binomial Regression: Use the nbreg command to run a negative binomial regression. Here, length_of_stay is your dependent variable, infection is your key independent variable, and you should include other covariates (covariate1, covariate2, etc.) that you want to adjust for.

    Code:
    nbreg length_of_stay infection covariate1 covariate2 ..., robust
    The robust option is used to get robust standard errors, which can be helpful if you have concerns about violations of model assumptions.

    The ... represents other covariates you might include, such as age, gender, severity of the condition, or any other relevant factors.

    Interpreting the Results: The output will give you incidence rate ratios (IRRs). An IRR greater than 1 suggests a longer length of stay for the group with an infection value of 1 (assuming this represents one of the infections, like influenza) compared to the reference group, after adjusting for other factors.

    Model Diagnostics: After running the model, it's important to check if the model is a good fit. You can use post-estimation commands to assess this.

    Code:
    estat gof
    estat ic
    Additional Analysis: Depending on your research question and data, you might also want to conduct subgroup analyses or interaction tests to see if the effect of infection varies by other factors (e.g., age group).

    Remember, the success of your analysis depends on the quality and appropriateness of your data for the chosen statistical method. Ensure that the assumptions underlying the negative binomial regression are met in your data. If you have any doubts, consulting with a statistician or a data analyst familiar with count data models would be beneficial.

    Comment


    • #3
      My reading of #1 is, as said there, that the response is binary. That being so I'd start with logit. In fact I might start with an exploratory smooth of the response versus length of stay or its logarithm.

      Comment


      • #4
        Thank you, both. Yes, I'm not using length of stay as the dep variable to predict something else, or estimate the risk of something else, so I wondered whether negative binomial regr was necessary. I will try both approaches and see how I go. Thank you again. Minda

        Comment

        Working...
        X