PVA.matrix | R Documentation |

Principal Variable Analysis (PVA) (Cumming and Wooff, 2007) selects a subset from a set of the variables such that the variables in the subset are as uncorrelated as possible, in an effort to ensure that all aspects of the variation in the data are covered.

```
## S3 method for class 'matrix'
PVA(obj, responses, nvarselect = NULL, p.variance = 1, include = NULL,
plot = TRUE, ...)
```

`obj` |
A |

`responses` |
A |

`nvarselect` |
A |

`p.variance` |
A |

`include` |
A |

`plot` |
A |

`...` |
allows passing of arguments to other functions |

The variable that is most correlated with the other variables is selected first for inclusion. The partial correlation for each of the remaining variables, given the first selected variable, is calculated and the most correlated of these variables is selects for inclusion next. Then the partial correlations are adjust for the second included variables. This process is repeated until the specified criteria have been satisfied. The possibilities are:

the default (

`nvarselect = NULL`

and`p.variance = 1`

), which selects all variables in increasing order of amount of information they provide;to select exactly

`nvarselect`

variables;to select just enough variables, up to a maximum of

`nvarselect`

variables, to explain at least`p.variance`

*100 per cent of the total variance.

A `data.frame`

giving the results of the variable selection.
It will contain the columns `Variable`

, `Selected`

,
`h.partial`

, `Added.Propn`

and `Cumulative.Propn`

.

Chris Brien

Cumming, J. A. and D. A. Wooff (2007) Dimension reduction via principal variables. *Computational Statistics
and Data Analysis*, **52**, 550–565.

`PVA`

, `PVA.data.frame`

, `intervalPVA.data.frame`

, `rcontrib`

```
data(exampleData)
longi.dat <- prepImageData(data=raw.dat, smarthouse.lev=1)
longi.dat <- within(longi.dat,
{
Max.Height <- pmax(Max.Dist.Above.Horizon.Line.SV1,
Max.Dist.Above.Horizon.Line.SV2)
Density <- PSA/Max.Height
PSA.SV = (PSA.SV1 + PSA.SV2) / 2
Image.Biomass = PSA.SV * (PSA.TV^0.5)
Centre.Mass <- (Center.Of.Mass.Y.SV1 + Center.Of.Mass.Y.SV2) / 2
Compactness.SV = (Compactness.SV1 + Compactness.SV2) / 2
})
responses <- c("PSA","PSA.SV","PSA.TV", "Image.Biomass", "Max.Height","Centre.Mass",
"Density", "Compactness.TV", "Compactness.SV")
R <- Hmisc::rcorr(as.matrix(longi.dat[responses]))$r
results <- PVA(R, responses, p.variance=0.9, plot = FALSE)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.