Announcement

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

  • Conditional mean and median

    Hi eveyone,
    I am trying to find the command for conditional mean and median using duration of childcare activities by sex only among highly educated individuals my data set is on the attachment.
    Thank you in advance,
    Ceyda
    Attached Files
    Last edited by Ceyda Akdogan; 28 Oct 2018, 16:17.

  • #2
    Please read the Forum FAQ. There you will find excellent advice on how to post questions in the clearest and most informative ways that help people who want to help you understand your problem and what you are working with.

    In particular, screenshots are the least useful way to show example data. For example, we do not know if your sex and education variables are stored as strings or as value labeled numeric variables. The code would be somewhat different depending on that. The most useful way is with the -dataex- command, which provides all the necessary information, and also makes it possible to import the data into Stata to try out code solutions if need be. FAQ #12 will explain how to find or get, and use, the -dataex- command.

    That said, the solution to your problem is going to be something like this:
    Code:
    tabstat CHILDDUR if something_about_variable_EDUC, statistics(mean p50) by(SEX)
    The exact code that goes where it says something_about_variable_EDUC depends on the storage type of that variable, how it is coded, and exactly what you mean by "highly educated."

    Comment


    • #3
      God bless you. You saved my assignment. Thank you!!

      Comment

      Working...
      X