[R] Linear Regression Warning after plot: NaNs produced in

William Dunlap wdunlap at tibco.com
Sun Jun 29 18:43:37 CEST 2014


One way to see where the first warning comes from is to turn warnings
into errors with options(warn=2) and when the error happens call
traceback().
Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Sun, Jun 29, 2014 at 4:12 AM, wat tele <wattele at hotmail.de> wrote:
>
>
>
> Hello,
>
> I'm a R beginner and I want to make a Multiple Regression about birds. My data is stord in a .csv file.
> I tried to do this with the following code:
>
> reg.data <- read.table(file.choose(),header=T, sep=";",dec=",")
> attach(reg.data)
> names(reg.data)
> model <- lm(Flights ~ Age + Gender + weight +  CountryGermany + CountryItaly + CountrySpain + CountryAustria + CountrySwiss + CountryGB + CountryFrance + CountryIreland + CountryNL + CountryBelgium + CountrySweden + CountryNorway + CountryUSA + CountryBrasil)
> plot(model)
>
> After the function plot(model), I get the two Warnings:
> 1: NaNs produced in: In sqrt(crit * p * (1 - hh)/hh)
> 2: NaNs produced in: In sqrt(crit * p * (1 - hh)/hh)
>
> Can anybody tell me:
>  - How can I interpret this warnings?
>  - How I can find out at which point this warning apears?
>  - How I can find out which column is responsible for the error?
>  - And if there is a possiblity to avoid this warnings?
>
> Thanks
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list