4
I have a continuous variable whose n=15000
comments and 451 Als. When rotating the qqnorm
For the evaluation of normality, I verified that it does not present normality and therefore I applied a logarithmic transformation. However, when rotating the qqnorm
with the log-transformed variable, the graph was not plotted and the following error message appeared:
Error in plot.window(...) : need finite 'ylim' values
Below the script in the order explained above:
> summary(data1$microalb)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.0000 0.3474 0.5042 1.3220 0.8426 308.0000 451
> qqnorm(data1$microalb) # inspecionando a normalidade
> log.microalb=log(data1$microalb) # aplicando transformação logarítmica
> qqnorm(log.microalb, main="Q-Q Plot - Log microalb", xlab="Quantis Teóricos", ylab= "Quantis Observados")
I deleted the Als from the variable, but the error persisted, so the problem is probably not in the missings. What could be preventing qqnorm generation with log-transformed data?
OBS.: I applied the same transformation in other variables and there was no problem, only in this one.
Hey, Marcus, thanks for the suggestion. However I tried to run the two suggested ways and this time the following error message appears: Error in qqnorm.default(log.microalb[! is.Infinite(log.microalb)]) : y is Empty or has only Nas Error in qqnorm.default(log.microalb + 1, main = "Q-Q Plot - Log microalb", : y is Empty or has only Nas
– Naomi
log.microalb
exists? What is the output ofsummary(log.microalb)
?– Marcus Nunes
Yes, there is: > Summary(log.microalb) Min. 1st Qu. Median Mean 3rd Qu. Max. NA’s -Inf -1.0570 -0.6847 -Inf -0.1713 5.7300 451
– Naomi
Marcus, o seguinte plot funcionou: qqnorm(log.microalb[!is.infinite(log.microalb)]) Entretanto, o seguinte plot apresentou uma mensagem de erro: > qqnorm(log.microalb.mgdl+1, main="Q-Q Plot - Log microalb.mgdl", 
+ xlab="Quantis Teóricos", ylab= "Quantis Observados") Error in Plot.window(...) : need Finite 'ylim' values Anyway, thanks for the suggestions, the second one worked.
– Naomi