odebug: Debugging ovariables

Description Usage Arguments Details Value Author(s) Examples

View source: R/odebug.R

Description

Check shared indices, dropped locations and some statistical metrics

Usage

1
odebug(x, variance = FALSE)

Arguments

x

ovariable to be debugged

variance

If TRUE runs variance analysis between indices of the given ovariable.

Details

Checks output lengths, number of NAs, common and matching marginals, missing locations in common marginals and performs variance analysis if required. Variance analysis is only performed up to second order, the intended use is to quantify overlap between indices.

Value

List of outputs.

Author(s)

T. Rintala teemu.rintala.a@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
test <- data.frame(
  A = c("x","y","z"), 
  B = rep(c("a","b","c"), each = 3), 
  C = rep(c("1","2","3"), each = 3*3), 
  testResult = runif(1*3*3*3)
)
test <- Ovariable(
  name = "test", 
  output = test, 
  marginal = c(TRUE, TRUE, TRUE, FALSE)
)
odebug(test, variance = TRUE)

Example output

$output_rows
$output_rows$test
[1] 27


$NAs
$NAs$test
$NAs$test$total
[1] 0



$marginals
$marginals$test
[1] "A" "B" "C"


$variance_analysis
            Df Sum Sq Mean Sq F value Pr(>F)  
A            2 0.1139 0.05695   1.028 0.4005  
B            2 0.5251 0.26256   4.741 0.0438 *
C            2 0.5952 0.29760   5.374 0.0332 *
A:B          4 0.5448 0.13620   2.459 0.1297  
A:C          4 0.2351 0.05877   1.061 0.4348  
B:C          4 0.0361 0.00902   0.163 0.9513  
Residuals    8 0.4430 0.05538                 
---
Signif. codes:  0***0.001**0.01*0.05.’ 0.1 ‘ ’ 1

OpasnetUtils documentation built on May 2, 2019, 12:39 p.m.