[R] surf.ls
Roger Bivand
Roger.Bivand at nhh.no
Thu Dec 9 19:24:13 CET 2004
On Thu, 9 Dec 2004, m p wrote:
> Hello,
> I am looking into description of surf.ls(spatial)
> and see under value $beta - the coefficients.
> When I use polynomial of degree 2 to fit surface
> I expect to get 4 coefficients:
>
> z = a_1 x^2 + a_2 xy + a_3 y^2 + a_4
>
> What do beta really stand for and why do I get
> $beta vector of length 6?
No, z = a_1 x^2 + a_2 xy + a_3 y^2 + a_4 + a_5 x + a_6 y,
if you like, order 2 is linear + quadratic, see p. 420 in MASS (4th
edition), eq. 15.1:
f((x,y)) = \sum_{r+s \leq p} a_{rs} x^r y^s,
with P = (p+1)(p+2)/2 coefficients for order p; for p=2, P=6.
>
> Thakns,
> Mark
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no
More information about the R-help
mailing list