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)
modeloCaTrans""
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!