Question about log function

Hi guys,

I'm trying to do an ANOVA analysis with a variable (called: CA) that don't fit in the normal distribuition second the saphiro (p-value = 0.00877) and bartlett test (p-value = 0.0003191).

But how I'm familiarized with this variable and i know that it have a normal distribution, I decided to use the log function to do a transformation and fit the variable in the normal distribution.

First i used the cas::boxCox funtion to know the ideal lambda number to fit in the log function, and the plot showed me an ideal lambda of -0.55.

After I used this code to make a transformed model:

modeloCaTrans<-aov(log(CA^(-0.5)~TRAT, data=dadosCA)

However when I run this code, the console show me this message:

"+ modeloCaTrans<-aov(log(CA^(-0.5)~TRAT, data=dadosCA)
Erro: unexpected symbol in:
"modeloCaTrans<-aov(log(CA^(-0.5)~TRAT, data=dadosCA)

And consequentely I can't run the codes for boxCox and anova using this model.

Someone could help me to figure it out what is happenning?

Thank you very much!

The call to aov() has a missing closing parenthesis. Try

modeloCaTrans <- aov(log(CA^(-0.5)) ~ TRAT, data=dadosCA)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.