fitted: Extract Polygonal Linear Model Fitted Values

Description Usage Arguments Value Examples

Description

The function is used to calculate the fitted center and radius or fitted polygos from polygonal linear regression model.

Usage

1
2
## S3 method for class 'plr'
fitted(object, ..., polygon = FALSE, vertices)

Arguments

object

an object of the class "plr".

...

further arguments special methods could require.

polygon

logical. If FALSE the function returns the center and radius predicted for polygon. If TRUE the function returns an object of the class "Polygonal" representing the fitted polygons.

vertices

If polygon is TRUE a number of vertices should be defined. Besides, the number of vertices should be greater than 2 and equal to number of vertices chosen in symbolic polygonal variables.

Value

ans the fitted values for polygonal linear regression.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
yp <- psim(10, 10) #simulate 10 polygons of 10 sides
xp1 <- psim(10, 10) #simulate 10 polygons of 10 sides
xp2 <- psim(10, 10) #simulate 10 polygons of 10 sides
e <- new.env()
e$yp <- yp
e$xp1 <- xp1
e$xp2 <- xp2
fit <- plr(yp~xp1+xp2-1, e)
fitted(fit) #shows the center and radius fitted from plr
fitted(fit, polygon = TRUE, vertices = 10) #Shows the polygon fitted from plr 

psda documentation built on July 1, 2020, 6:10 p.m.