powered by
Extract the standard error and t-stat of the a-th parameter estimate of a lm object
contts(lm, a)
The standard error of the selected coefficient
The t-stat of the selected coefficient
lm object
The a-th parameter estimate of a linear model regression
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, modifed from Javier Lopez-de-Lacalle.
Javier Lopez-de-Lacalle in https://github.com/cran/uroot/blob/master/R/hegy.R
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
Run the code above in your browser using DataLab