Function for extracting components from a lm object

Description

Extract the standard error and t-stat of the a-th parameter estimate of a lm object

Usage

1
contts(lm, a)

Arguments

lm

lm object

a

The a-th parameter estimate of a linear model regression

Value

se.coef

The standard error of the selected coefficient

t.stat

The t-stat of the selected coefficient

Author(s)

Ho Tsungwu <tsungwu@cc.shu.edu.tw>, modifed from Javier Lopez-de-Lacalle

References

Javier Lopez-de-Lacalle in https://github.com/cran/uroot/blob/master/R/hegy.R

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
x=rnorm(100)
y=1+0.2*x+rnorm(100)
LMout=lm(y~x)
contts(LMout,1)

#$se.coef
#[1] 0.1081023

#$t.stat
#(Intercept) 
#   10.60401 

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.