027 Optimal Lambda for Box Cox transformation in Excel & R

Поділитися
Вставка
  • Опубліковано 6 лют 2025
  • I would like to share how to find a lambda, which is from log likelihood method, for box cox transformation in Excel and R.
    Reference : stats.stackexc...
    Reference : grodri.github....

КОМЕНТАРІ • 25

  • @GloatingPenguin
    @GloatingPenguin 10 місяців тому +1

    Great video thaks!

  • @АлександрЕгоров-з6н

    thank you so much for your video. It is very useful

  • @fatrizaarfiah15
    @fatrizaarfiah15 2 роки тому +2

    hello may i ask something. i have a data that Y variable (Air passanger) is minus, why does the Lambda_Passanger result become NUM?

    • @sangwoo.statistics
      @sangwoo.statistics  2 роки тому

      Hi, Fatriza, Could you elaborate more about your situation? or could you send me the file you are working on via my gmail?

  • @nadiag.3577
    @nadiag.3577 3 роки тому +1

    why is it recommended to anchor the variable to be transformed at 1 before performing a Box-Cox transformation?

  • @diogo.jeronimo
    @diogo.jeronimo 2 роки тому +1

    Dear teacher, morning!!! Do you think to make some material like BoxCox, but about Johnson transformation? Thanks!!!

    • @sangwoo.statistics
      @sangwoo.statistics  2 роки тому

      Hi, Diogo. Thank you for suggesting new contents. I will have a look to understand Johnson transformation and will post it when I am ready. Have a nice day~

    • @diogo.jeronimo
      @diogo.jeronimo 2 роки тому +1

      @@sangwoo.statistics thank you again!!! I'm brazilian statistician, and you help me about the apply Box Cox transformation in my job!!! God bless you!!!

  • @ErikTremblay-zu7fw
    @ErikTremblay-zu7fw 2 роки тому +1

    Where did you get this log likelihood equation?

    • @sangwoo.statistics
      @sangwoo.statistics  2 роки тому +1

      Hi, Erik.
      Please refer to the following links.
      stats.stackexchange.com/questions/337527/parameter-lambda-of-box-cox-transformation-and-likelihood
      stats.stackexchange.com/questions/261380/how-do-i-get-the-box-cox-log-likelihood-using-the-jacobian

    • @eriktremblay5072
      @eriktremblay5072 2 роки тому +1

      @@sangwoo.statistics thank you, I very much appreciated this video. I was able to successfully transform my data from a DoE and improve my R value all the way up to 99.42% using this method . Extremely helpful

    • @sangwoo.statistics
      @sangwoo.statistics  2 роки тому

      @@eriktremblay5072 It is my pleasure. :) I hope you share my youtube contents or a link to help other people. Many thanks, Sangwoo.

  • @nafassaadat8326
    @nafassaadat8326 3 роки тому +1

    how we can find lambda without using the solver function ???

    • @sangwoo.statistics
      @sangwoo.statistics  3 роки тому +1

      Hi, Nafas. You can specify certain lambda value, based on data shape. The following lambda value would be helpful for your understanding.
      λ = 1.00: no transformation needed; produces results identical to original data
      λ = 0.50: square root transformation
      λ = 0.33: cube root transformation
      λ = 0.25: fourth root transformation
      λ = 0.00: natural log transformation
      λ = -0.50: reciprocal square root transformation
      λ = -1.00: reciprocal (inverse) transformation
      Please refer to the following site : www.css.cornell.edu/faculty/dgr2/_static/files/R_html/Transformations.html

    • @nafassaadat8326
      @nafassaadat8326 3 роки тому

      @@sangwoo.statistics okkk, thank you so much

  • @salwasyahira5183
    @salwasyahira5183 2 роки тому +1

    hello may i know the source of log [L( )] formula? thank you in advance

    • @sangwoo.statistics
      @sangwoo.statistics  2 роки тому

      I hope the following link is what you are asking for.
      stats.stackexchange.com/questions/337527/parameter-lambda-of-box-cox-transformation-and-likelihood
      Many thanks, Sangwoo.

  • @krishnaiyer2556
    @krishnaiyer2556 3 роки тому

    how to get in excel the air passengers data from R to excel?

    • @sangwoo.statistics
      @sangwoo.statistics  3 роки тому

      > write.csv(AirPassengers, "c:/temp/AirPassengers.csv")
      > AP

  • @muhammadsaufiothman7740
    @muhammadsaufiothman7740 2 роки тому +1

    Hello, 1st of all thank you for the knowledge sharing. i am still beginner in statistical but your videos help me alot. may i ask 2 question?
    1. i see some cox box transformation qeuation use log base 10 will other use nat. log. is there any difeerence? i saw ur 2ns equation you use nat log instead of log10.
    2. i try replicating your work using my data but the result i got is lambda = 0 which resulting y(lambda) variable error divide by zero

    • @sangwoo.statistics
      @sangwoo.statistics  2 роки тому +1

      Hi, Muhammad. Thanks for contacting me. The following comments are my personal opinion for your questions.
      1. There are many statistical distributions, which include "exponential" form (e.g. normal distribution). When we try to use mle to find optimal estimated parameter, we consider log likelihood form for fast calculation. So, that's why we typically use natural log.
      2. Please send me your data vai my gmail, then I will have a look.
      Many thanks, Sangwoo.

    • @l8870
      @l8870 2 роки тому +1

      @@sangwoo.statistics hello, i also have the same problem. can i have your gmail please so i could also send my excel data? thank you

    • @sangwoo.statistics
      @sangwoo.statistics  2 роки тому

      @@l8870 Hi, L. I don't leave my email address here due to many spam emails. You can check and get my gmail address when a video starts.

  • @Miniclausen1995
    @Miniclausen1995 2 роки тому

    How come you are using y and x as the same values? Shouldn't x be the date?

    • @sangwoo.statistics
      @sangwoo.statistics  2 роки тому

      Hi, Benjamin.
      I intended to mention the original variable as X.
      So, it is right.
      But, if it isn't understandable, please treat X as an original data.
      Please refer to the following link to get more info in page6.
      ir.lib.uwo.ca/cgi/viewcontent.cgi?article=7276&context=etd
      Many thanks, Sangwoo.