Hello,
I am writing regarding log transformation of data in a single matrix column, and subsequent use of these data in a glm model fit. I have a data matrix in which I am using the log function to transform the values. This transformation results in -Inf values in some places, though. I then receive an error when this matrix is used in the glm function, and would like to know this can be avoided. I have attempted several methods already including the use of na.exclue commands in the glm statement:

DistributionT<-glm(EarlyLn$yoyras~EarlyLn$temp,family=gaussian(link = "identity"),na.exclude)

I have also attempted to use the is.finite command:

EarlyLn$yoyras<-EarlyLn[is.finite(EarlyLn$yoyras)==T,]

I know another option would be to use a type of find and replace command to remove entire rows of the matrix that contain 0's (before log transformation) or -Inf (after transformation), but I do not know how this is done.

Thank you for any advice or tips regarding conducting this transformation and feeding the data matrix into glm.

Sincerely,
Paul S.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to