Announcement

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

  • tendency analysis in stata

    I do experiments with parasites and would like to know how to analyze the data in stata.

    I have the initial amount of parasites, put a drug of interest, and check the concentration of parasites and each time points.
    Thus, I want to analyze what is the concentration of different drugs when 50% of the parasites die (survival analysis) and if there is statistical difference between the concentration of that drugs. Preferably in the same graph with p value.

  • #2
    You'll increase your chances of a quick answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex. Knowing exactly what Stata responded it essential to helping you.

    You need to tell us what analysis you want to run. Use generally accepted terms for statistical procedures. With that information, we can help you more.

    Comment


    • #3
      Gabriel, it sounds more like you're trying to find the median lethal dose (LD50) of various drugs. Is that correct? I am not at all familiar with how to calculate this, but perhaps someone here is.

      I don't think survival analysis is applicable to your problem. Survival analysis is about individual survival time. Doing survival analysis in this context would require you to measure each parasite's survival time. I don't quite see that being practical, but maybe I am wrong.
      Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

      When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

      Comment


      • #4
        If you were indeed trying to find LD50, this is how you would do it, with acknowledgements to Steve Samuels and Joseph Conevey.
        Last edited by Weiwen Ng; 19 Apr 2018, 11:37. Reason: Corrected formatting.
        Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

        When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

        Comment


        • #5
          0 2 4 6 12 25
          strain 1 504 446 369 124 128 121
          strain 2 633 566 452 129 138 129
          strain 3 459 457 406 134 140 130
          strain 4 519 471 387 124 131 122
          In that theoretical model; strains (1, 2, 3, 4) were exposed to different drug concentrations. The numbers inside are the parasite count.

          In that case I would like to know in what concentration 50% of the parasites died for each strain. Also, if there is difference between the strains,

          I tryed "probit" command, but it demands binary outcomes. In a twoway graph is possible to see the tendency, but it did`t give to me a value.


          Comment


          • #6
            Looks like I posted a bad link earlier. Go to the one below.

            https://www.statalist.org/forums/for...r-logit-probit

            Second, your data are unclear. What do the columns (we strongly prefer to say variables in Stata, but people say columns in other programs) represent? Is it time, is it concentration, is it something else?

            I also wonder if this experiment was done according to procedures acceptable in the discipline. I am not in environmental health or toxicology. However, my impression is that usually, you give each group of animals a certain dose. You estimate the proportion of each group that died by a certain time (e.g. 24 hours). You extrapolate the LD50 using statistics (as demonstrated in the link).

            Here, it looks like you had 4 groups. You exposed them to one concentration, recorded the number of organisms still present, then you increased the dose. Is that an acceptable way to estimate LD50?

            If it is, then you can likely modify the approach given in the link I posted, but I think you would have to set it up as a GLM of the binomial family, with the number of trials given by the baseline number of parasites in each group. I am pretty sure you would want to transpose the data as well.

            Do use the -dataex- command to present sample data. It creates an extract of your data that can be copy-pasted into the forum, and that someone else can copy from the forum and paste into Stata. It makes things much easier for all.
            Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

            When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

            Comment


            • #7
              Originally posted by Gabriel Reis Ferreira View Post
              The numbers inside are the parasite count.
              Are the numbers at dose levels of 6 and above really parasite counts or are they background values (i.e., measurement error when there are zero parasites in the field of view)?

              In a twoway graph is possible to see the tendency, but it did`t give to me a value.
              It looks like the graph actually does give you the answers you're looking for to the precision that the data justify.
              Code:
              version 15.1
              
              clear *
              
              input byte strain int(count0 count2 count4 count6 count12 count25)
              1 504 446 369 124 128 121
              2 633 566 452 129 138 129
              3 459 457 406 134 140 130
              4 519 471 387 124 131 122
              end
              
              *
              * Begin here
              *
              quietly reshape long count, i(strain) j(dose)
              
              tempname max min
              summarize count if !dose, meanonly
              scalar define `max' = r(mean)
              
              summarize count if dose >= 6, meanonly
              scalar define `min' = r(mean)
              
              local Count50A = `max' / 2
              local Count50B = (`max' - `min') / 2
              
              graph twoway ///
                  line count dose if strain == 1, lcolor(red) lpattern(solid) || ///
                  line count dose if strain == 2, lcolor(blue) lpattern(solid) || ///
                  line count dose if strain == 3, lcolor(red) lpattern(dash) || ///
                  line count dose if strain == 4, lcolor(blue) lpattern(dash) ///
                  xtitle(Dose (Unknown Units)) yline(`Count50A' `Count50B', lcolor(black) lpattern(dash)) ///
                  ytitle(Parasite Count) ylabel(0(100)600, angle(horizontal) nogrid) ///
                  legend(off)
              
              exit

              Comment


              • #8
                Thank you all for your help.

                In that study I used parasite culture of different strains (same parasite genetically modified to 3 strains plus the wild type). The four cultures were exposed to different concentrations of the same drug and parasites were counted by a method extensively used for this purpose. Generally, the studies use optical density (OD) of the samples and normalize to a control. Therefore, 50% of OD means that half of parasites are dead. However, I want to do with number of live counted parasites, which I imagine is more accurate. In that way, I have number of parasites instead percentual. Futhermore, I dont have binary outcome for each individual. The main goal, at this moment, is to verify is there is difference of resistance between the strains.















                Attached Files
                Last edited by Gabriel Reis Ferreira; 20 Apr 2018, 12:23.

                Comment


                • #9
                  Originally posted by Gabriel Reis Ferreira View Post
                  The main goal, at this moment, is to verify is there is difference of resistance between the strains.
                  Are you sure? It's entirely possible that about a quarter of the population of parasites (all four strains) is genetically impervious to the actions of the drug, but your dose response curve is a little uncommon for a poison in that the asymptote isn't at total mortality. You're using a novel method of measurement. If you haven't done so already, I'd recommend to consider measurement validation as the first order of business.

                  Comment

                  Working...
                  X