[R] R

(Ted Harding) Ted.Harding at manchester.ac.uk
Thu Sep 20 11:50:27 CEST 2007


On 20-Sep-07 08:45:43, mohammad sahebhonar wrote:
> I am going to fit my model with R-2.5.1.tar
> my model is y=fixed effect+b(x) and I have three column in my
> data file (y a x) and about 200000 observation(y) 
> but I had some problems. I was wondering If you could help me
> the error massage is:
>> res <- read.table("pro.sdf")
>> fm <- glm(y=A+x,data=res)
> Error: NA/NaN/Inf in foreign function call (arg 4)
> In addition: Warning messages:
> 1: - not meaningful for factors in: Ops.factor(y, mu)
> 2: - not meaningful for factors in: Ops.factor(eta, offset)
> 3: - not meaningful for factors in: Ops.factor(y, mu)
> thank you
> sincerely
> M.Sahebhonar
> 
>  Send instant messages to your online friends
> http://uk.messenger.yahoo.com 
>       [[alternative HTML version deleted]]

There are two points to investigate in your description above.

1. You describe your datafile as having three columns "y", "a", "x",
   but in your formular you wrote "A+x". If the column-name is "a"
   then "A+x" will not work since "a" and "A" are different names.
   Either the column name in the datafile really is "A", and
   there is no problem (you simply typed it wrong above),
   or it is really "a" and you should use "y ~ a+x" (see below).

2. The way to specify a model formula to glm (also lm, etc.)
   is to write the formula as

      y ~ A+x  (or y ~ a+x, depending on which one is correct)

   Do not use "y = a+x"!

Best woishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 20-Sep-07                                       Time: 10:50:24
------------------------------ XFMail ------------------------------



More information about the R-help mailing list