how to use the Box-Cox power transformation in R

0 votes
I've read that Box-Cox can help determine the appropriate exponent to use when transforming data, and I need to convert some data into a "normal shape."

From what I can tell

In linear models, the response variables are represented by car::boxCoxVariable(y), and

For a formula or fitted model object, use MASS::boxcox(object). In light of the fact that my data are variables in a dataframe, the only function I could find to utilise is:

dataframe$variable, family="bcPower", car::powerTransform
Is that accurate? Or have I overlooked something?

The second query concerns what to do following the acquisition of

Parameters for the estimated transformation dataframe$variable 0.6394806
Should I just multiply this by the variable? I did this:

Dataframe$variable2 = (dataframe$variable)*aaa; aaa = 0.6394806
the Shapiro-Wilks test for normalcy is next performed, but once more, my data don't appear to be
Jul 6 in Data Analytics by avinash
• 1,840 points
9 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Data Analytics

0 votes
0 answers

How to use the where clause in R programming?

I'm trying to implement a where clause ...READ MORE

Dec 24, 2018 in Data Analytics by Sophie may
• 10,590 points
3,059 views
0 votes
1 answer

How to use the switch statement in R functions?

Switch definitely wasn't intended to operate this ...READ MORE

answered Jun 24 in Data Analytics by Sohail
• 2,960 points
17 views
0 votes
2 answers

How to use group by for multiple columns in dplyr, using string vector input in R?

data = data.frame(   zzz11def = sample(LETTERS[1:3], 100, replace=TRUE),   zbc123qws1 ...READ MORE

answered Aug 6, 2019 in Data Analytics by anonymous
11,745 views
0 votes
1 answer

How to find out the sum/mean for multiple variables per group in R?

You can use the reshape2 package for ...READ MORE

answered Apr 12, 2018 in Data Analytics by DataKing99
• 8,240 points
2,611 views
+1 vote
2 answers

Which function can I use to clear the console in R and RStudio ?

Description                   Windows & Linux           Mac Clear console                      Ctrl+L ...READ MORE

answered Apr 17, 2018 in Data Analytics by anonymous
48,659 views
0 votes
1 answer

How to find out the package version which is loaded in R?

You can use sessionInfo() to accomplish that. > ...READ MORE

answered Apr 18, 2018 in Data Analytics by zombie
• 3,790 points
233 views
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,610 points
434 views
0 votes
2 answers

Transforming a key/value string into distinct rows in R

We would start off by loading the ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
478 views
0 votes
1 answer

Finding frequency of observations in R

You can use the "dplyr" package to ...READ MORE

answered Mar 26, 2018 in Data Analytics by Bharani
• 4,660 points
4,345 views
0 votes
1 answer

Left Join and Right Join using "dplyr"

The below is the code to perform ...READ MORE

answered Mar 27, 2018 in Data Analytics by Bharani
• 4,660 points
502 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP