-2

Possible Duplicate:
How should I transform non-negative data including zeros?
Error in boxcox.default(y ~ x) : response variable must be positive

I want to perform box cox transformation on data using R tool .If anybody can help me with examples or commands to show how it is done in R tool. Thank you in advance.

My main problem is I want to take log of data but if data entries contain 0 then log 0 becomes infinite .To handle this situation I am searching for the past 3 days .I found one solution to use boxcox transformation..but again it is giving this error.

Komal
  • 61
  • 1
  • 3
  • 11
  • As stated, this question asks no more than a pointer to the on-line help for `boxcox`. If you provide more details (available data, research question, reason to apply a Box-Cox transformation), it might be of interest to the statistical community. Otherwise, it will be closed as off-topic (see our [FAQ](http://stats.stackexchange.com/faq) for more information). – chl Jan 09 '13 at 10:33
  • I have added the relevant information. – Komal Jan 09 '13 at 11:25
  • 1
    You may want to try reading these threads: [how should I transform non-negative data including zeros](http://stats.stackexchange.com/questions/1444/), & [how small a quantity should be added to x to avoid taking the log of zero](http://stats.stackexchange.com/questions/30728/). – gung - Reinstate Monica Jan 09 '13 at 13:18
  • So I do not see how this question differs from your other one: http://stats.stackexchange.com/q/47296/930. – chl Jan 09 '13 at 13:23

1 Answers1

0

Have a look at the boxcox function (documentation here).

ThePawn
  • 1,091
  • 6
  • 7
  • I have seen this link earlier..I am getting this "Error in boxcox.default(y ~ x) : response variable must be positive" error when I am using boxcox.. – Komal Jan 09 '13 at 07:44
  • My main problem is I want to take log of data but if data entries contain 0 then log 0 becomes infinite .To handle this situation I am searching for the past 3 days .I found one solution to use boxcox transformation..but again it is giving this error. – Komal Jan 09 '13 at 07:46