Skip to contents

Function to provide an overview of fitted linear models for objects of class facDesign.c.

Usage

summaryFits(fdo, lmFit = TRUE, curvTest = TRUE)

Arguments

fdo

An object of class facDesign.c.

lmFit

A logical value deciding whether the fits from the object fdo should be included or not. By default, lmFit is set to TRUE.

curvTest

A logical value deciding whether curvature tests should be performed or not. By default, curvTest is set to TRUE.

Value

A summary output of the fitted linear models, which may include the linear fits, curvature tests, and original fit values, depending on the input parameters.

Examples

dfac <- facDesign(k = 3)
dfac$.response(data.frame(y = rnorm(8), y2 = rnorm(8)))
dfac$set.fits(lm(y ~ A + B , data = dfac$as.data.frame()))
dfac$set.fits(lm(y2 ~ A + C, data = dfac$as.data.frame()))
summaryFits(dfac)
#> ----------- Summary for response 'y' -----------
#> 
#> Call:
#> lm(formula = y ~ A + B, data = dfac$as.data.frame())
#> 
#> Residuals:
#>        7        2        6        1        4        3        8        5 
#>  0.72766 -0.31377  1.00181  1.02305 -0.39692 -0.03961 -0.29113 -1.71109 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)
#> (Intercept)  -0.1326     0.3824  -0.347    0.743
#> A             0.2332     0.3824   0.610    0.569
#> B            -0.3261     0.3824  -0.853    0.433
#> 
#> Residual standard error: 1.082 on 5 degrees of freedom
#> Multiple R-squared:  0.1802,	Adjusted R-squared:  -0.1477 
#> F-statistic: 0.5496 on 2 and 5 DF,  p-value: 0.6085
#> 
#> -----------
#> 
#> Regression in non coded form:
#> 
#>    y  =  -0.1326 + 0.2332*A - 0.3261*B
#> 
#> -----------
#> curvTest: not enough centerPoints for a test for curvature
#> 
#> Test for Curvature:  p = NA
#> 
#> 
#> ----------- Summary for response 'y2' -----------
#> 
#> Call:
#> lm(formula = y2 ~ A + C, data = dfac$as.data.frame())
#> 
#> Residuals:
#>         7         2         6         1         4         3         8         5 
#>  0.680105  1.349991 -1.194298 -1.340484 -0.001703 -0.007804 -0.153990  0.668182 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)
#> (Intercept)   0.1100     0.3866   0.285    0.787
#> A            -0.3465     0.3866  -0.896    0.411
#> C            -0.2565     0.3866  -0.664    0.536
#> 
#> Residual standard error: 1.093 on 5 degrees of freedom
#> Multiple R-squared:  0.1992,	Adjusted R-squared:  -0.1211 
#> F-statistic: 0.6218 on 2 and 5 DF,  p-value: 0.5739
#> 
#> -----------
#> 
#> Regression in non coded form:
#> 
#>    y2  =  0.11 - 0.3465*A - 0.2565*C
#> 
#> -----------
#> curvTest: not enough centerPoints for a test for curvature
#> 
#> Test for Curvature:  p = NA
#> 
#>