Announcement

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

  • ttesti: using se as input instead of sd

    Hi everyone,
    I am trying to calculate the independent t-test using ttesti which requires mean, sd, and sample size. Given that I do not have sd but semean, I need to convert the semean to sd using semean*(10^1.5) formula. My question is how can I specify the multiplication noted above within the ttesti command. I have tried the below code but I got an error: "'31.41644 0.181502' found where number expected". Obviously, one non-efficient solution could be using the display command to obtain the result for the multiplication, but I wonder if there is any way to do the job within the ttesti command itself.
    Thanks,
    NM

    Code:
    ttesti 1000 31.41644 0.181502*(10^1.5) 1000 28.6431 0.3995219*(10^1.5)
    Last edited by Nader Mehri; 30 Jul 2021, 23:46.

  • #2
    ttesti does not evaluate its' input argument, thus, you will have to evaluate first. Try

    Code:
    local sd1 = 0.181502*(10^1.5)
    local sd2 = 0.3995219*(10^1.5)
    ttesti 1000 31.41644 `sd1' 1000 28.6431 `sd2'

    Comment


    • #3
      Great! Thanks.
      Last edited by Nader Mehri; 31 Jul 2021, 09:06.

      Comment

      Working...
      X