Learn R Programming

psda (version 1.4.0)

plr: Polygonal linear regression

Description

plr is used to fit polygonal linear models.

Usage

plr(formula, data, model = TRUE, ...)

Arguments

formula

an object of class "formula": a symbolic description of the model to be fitted.

data

a environment that contains the variables of the study.

model

logicals. If TRUE the corresponding components of the fit are returned.

...

additional arguments to be passed to the low level polygonal linear regression fitting functions.

Value

residuals is calculated as the response variable minus the fitted values.

rank the numeric rank of the fitted polygonal linear model.

call the matched call.

fitted.values the fitted mean values.

terms the terms.

coefficients a named vector of coefficients.

model the matrix model for center and radius.

Details

Polygonal linear regression is the first model to explain the behavior of a symbolic polygonal variable in furnction to other polygonal variables, dependent and regressors, respectively. PLR is based on the least squares and uses the center and radius of polygons as representation them. The model is given by \(y = X\beta + \epsilon\), where \(y, X, \beta\), and \(\epsilon\) is the dependent variable, matrix model, unknown parameters, and non-observed errors. In the model, the vector \(y = (y_c^T, y_r)^T\), where \(y_c\) and \(y_r\) is the center and radius of center and radius. The matrix model \(X = diag(X_c, X_r)\) for \(X_c\) and \(X_r\) describing the center and radius of regressors variables and finally, \(\beta = (\beta_c^T, \beta_r^T)^T\). A detailed study about the model can be found in Silva et al.(2019).

References

Silva, W.J.F, Souza, R.M.C.R, Cysneiros, F.J.A. (2019) https://www.sciencedirect.com/science/article/pii/S0950705118304052.

Examples

Run this code
# NOT RUN {
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, e)
# }

Run the code above in your browser using DataLab