Skip to content

Missing values with lm

3 messages · Jan Hackenberg, Roger Bivand, piero campa

#
On Wed, 2 Mar 2011, Jan Hackenberg wrote:

            
Don't always trust the internet, but yes, use -1 or equivalently + 0, see:

?formula

or for more detail:

      Chambers, J. M. and Hastie, T. J. (1992) _Statistical models._
      Chapter 2 of _Statistical Models in S_ eds J. M. Chambers and T.
      J. Hastie, Wadsworth & Brooks/Cole.

which is the authoritative source for where formula and data.frame objects 
came from.

Roger

  
    
#
Hi,
Jan also wrote:
"so i expect to get 36 s values and 480 t values. Instead for the first cell
and the first timestep the value is missing, the lm result is only 35 s
values and 479 t values ( + one intercept coefficient ). Is there a reason
behind this and some way to fix it?"

Any clue about this?
I encountered a similar problem and worked it out by filling the (very small
percentage) of NAs with a simple inverse distance interpolation
(?gstat::krige).

Piero

--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Missing-values-with-lm-tp6080805p6084753.html
Sent from the R-sig-geo mailing list archive at Nabble.com.