Re: [R] error code trying to extract second column from coeftest output

2012-05-17 Thread Petr PIKAL
Hi

 
 I want to use the standard error values in the summary that is produced 
using
 coeftest, but I am getting an error code- any ideas?

See what is structure of coeftest object by

str(coeftest(lmodT_WBHO))

and from this you shall deduct how to select second column.

Regards
Petr


 
  library(lmtest)
  coeftest(lmodT_WBHO)
 
 t test of coefficients:
 
 Estimate Std. Error t value  Pr(|t|) 
 t1W  5.948190.17072 34.8410  2.2e-16 ***
 t2W  6.562160.17438 37.6322  2.2e-16 ***
 t3W  6.082520.16525 36.8082  2.2e-16 ***
 t4W  6.180410.17028 36.2949  2.2e-16 ***
 t1B  5.50.50566 10.8768  2.2e-16 ***
 t2B  5.650000.53034 10.6535  2.2e-16 ***
 t3B  4.523810.51756  8.7406  2.2e-16 ***
 t4B  4.380950.51756  8.4646  2.2e-16 ***
 t1H  5.050000.53034  9.5221  2.2e-16 ***
 t2H  4.80.55903  8.5465  2.2e-16 ***
 t3H  5.526320.54412 10.1564  2.2e-16 ***
 t4H  4.714290.63388  7.4372 2.236e-13 ***
 t1O  5.176470.57524  8.9988  2.2e-16 ***
 t2O  5.818180.50566 11.5060  2.2e-16 ***
 t3O  6.50.63388 10.2543  2.2e-16 ***
 t4O  5.714290.63388  9.0147  2.2e-16 ***
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
 
  se1 - coeftest(lmodT_WBHO)$coef[,2]
 Error in coeftest(lmodT_WBHO)$coef : 
   $ operator is invalid for atomic vectors
  
 
 
 --
 View this message in context: http://r.789695.n4.nabble.com/error-code-
 trying-to-extract-second-column-from-coeftest-output-tp4630298.html
 Sent from the R help mailing list archive at Nabble.com.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] error code trying to extract second column from coeftest output

2012-05-16 Thread rl269
I want to use the standard error values in the summary that is produced using
coeftest, but I am getting an error code- any ideas?

 library(lmtest)
 coeftest(lmodT_WBHO)

t test of coefficients:

Estimate Std. Error t value  Pr(|t|)
t1W  5.948190.17072 34.8410  2.2e-16 ***
t2W  6.562160.17438 37.6322  2.2e-16 ***
t3W  6.082520.16525 36.8082  2.2e-16 ***
t4W  6.180410.17028 36.2949  2.2e-16 ***
t1B  5.50.50566 10.8768  2.2e-16 ***
t2B  5.650000.53034 10.6535  2.2e-16 ***
t3B  4.523810.51756  8.7406  2.2e-16 ***
t4B  4.380950.51756  8.4646  2.2e-16 ***
t1H  5.050000.53034  9.5221  2.2e-16 ***
t2H  4.80.55903  8.5465  2.2e-16 ***
t3H  5.526320.54412 10.1564  2.2e-16 ***
t4H  4.714290.63388  7.4372 2.236e-13 ***
t1O  5.176470.57524  8.9988  2.2e-16 ***
t2O  5.818180.50566 11.5060  2.2e-16 ***
t3O  6.50.63388 10.2543  2.2e-16 ***
t4O  5.714290.63388  9.0147  2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

 se1 - coeftest(lmodT_WBHO)$coef[,2]
Error in coeftest(lmodT_WBHO)$coef : 
  $ operator is invalid for atomic vectors
 


--
View this message in context: 
http://r.789695.n4.nabble.com/error-code-trying-to-extract-second-column-from-coeftest-output-tp4630298.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] error code trying to extract second column from coeftest output

2012-05-16 Thread Jeff Newmiller
I recommend that you troubleshoot your own problem using the str function... 
for example, str( coeftest(lmodT_WBHO)). The error message is not a code... 
it is perfectly readable English, and it is telling you that the result of 
calling coeftest is not a list with parts that can be pulled out using the $ 
operator.
---
Jeff NewmillerThe .   .  Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.



rl269 rl...@acad.umass.edu wrote:

I want to use the standard error values in the summary that is produced
using
coeftest, but I am getting an error code- any ideas?

 library(lmtest)
 coeftest(lmodT_WBHO)

t test of coefficients:

Estimate Std. Error t value  Pr(|t|)
t1W  5.948190.17072 34.8410  2.2e-16 ***
t2W  6.562160.17438 37.6322  2.2e-16 ***
t3W  6.082520.16525 36.8082  2.2e-16 ***
t4W  6.180410.17028 36.2949  2.2e-16 ***
t1B  5.50.50566 10.8768  2.2e-16 ***
t2B  5.650000.53034 10.6535  2.2e-16 ***
t3B  4.523810.51756  8.7406  2.2e-16 ***
t4B  4.380950.51756  8.4646  2.2e-16 ***
t1H  5.050000.53034  9.5221  2.2e-16 ***
t2H  4.80.55903  8.5465  2.2e-16 ***
t3H  5.526320.54412 10.1564  2.2e-16 ***
t4H  4.714290.63388  7.4372 2.236e-13 ***
t1O  5.176470.57524  8.9988  2.2e-16 ***
t2O  5.818180.50566 11.5060  2.2e-16 ***
t3O  6.50.63388 10.2543  2.2e-16 ***
t4O  5.714290.63388  9.0147  2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

 se1 - coeftest(lmodT_WBHO)$coef[,2]
Error in coeftest(lmodT_WBHO)$coef : 
  $ operator is invalid for atomic vectors
 


--
View this message in context:
http://r.789695.n4.nabble.com/error-code-trying-to-extract-second-column-from-coeftest-output-tp4630298.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.