Skip to contents

Generate Table for Coefficients, Std. Errors, t-values and P-values.

Usage

coefTable( coef, stdErr, df = NULL )

Arguments

coef

vector that contains the coefficients.

stdErr

vector that contains the standard errors of the coefficients.

df

degrees of freedom of the t-test used to calculate P-values.

Value

a matrix with 4 columns: coefficients, standard errors, t-values and P-values. If argument df is not provided, the last column (P-values) is filled with NAs.

Author

Arne Henningsen

Examples

   coefTable( rnorm( 10 ), 0.5 * abs( rnorm( 10 ) ), 20 )
#>           Estimate Std. Error      t value     Pr(>|t|)
#>  [1,]  0.255317055 0.31449102  0.811842112 4.264397e-01
#>  [2,] -2.437263611 1.03251245 -2.360517412 2.851682e-02
#>  [3,] -0.005571287 0.81549470 -0.006831788 9.946168e-01
#>  [4,]  0.621552721 0.25621347  2.425917378 2.485250e-02
#>  [5,]  1.148411606 0.93150575  1.232855096 2.319254e-01
#>  [6,] -1.821817661 0.26100626 -6.979976953 8.961132e-07
#>  [7,] -0.247325302 0.02630095 -9.403662426 8.805606e-09
#>  [8,] -0.244199607 0.27149817 -0.899452124 3.791143e-01
#>  [9,] -0.282705449 0.45703741 -0.618560845 5.431870e-01
#> [10,] -0.553699384 0.23407721 -2.365456181 2.822351e-02