yai_r2: Compute R2 values from yaImpute::yai() object or data frame...

yai_r2R Documentation

Compute R2 values from yaImpute::yai() object or data frame returned by yaImpute::impute(...)

Description

Compute R2 values from yaImpute::yai() object or data frame returned by yaImpute::impute(...)

Usage

yai_r2(x, vars = NULL, ...)

Arguments

x

yaImpute::yai() object or data frame returned by yaImpute::impute(...)

vars

subset of variables

...

additional arguments to impute() if yaImpute::yai() object is provided

Details

This function is a repurposing of the yaImpute::rmsd() function to compute R.squared instead.

This program is free software but it is provided WITHOUT WARRANTY and with ABSOLUTELY NO GUARANTEE of fitness or functionality for any purpose; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.


Revision History

1.0 5/27/2020 Created

Value

Data.frame with 1 column of R2 values

Author(s)

Jacob Strunk <Jacob.strunk@usda.gov>

See Also

yaImpute::yai
yaImpute::impute

Examples


 #fit model using one set of responses
 yaimod1 = yaImpute::yai( x = dat6[,c(vEnvironment1)	], y = dat6[,vBA1] , method = "gnn" )

 #impute a second set
 imp1 = impute(yaimod3,dat6[,vResp3])

 #compute R2
 yai_r2(imp1)



jstrunk001/RSForInvt documentation built on April 18, 2022, 11:03 p.m.