[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.


[R] vector w/o arithmetic addition for boxplot

2012-05-15 Thread rl269
Hello,

I am having trouble  asking R to read individual numeric vectors for a box
plot of the residuals of a linear regression.  It is performing arithmetic
addition on the 16 individual variables that I want individual box plots
for.

I have 16 race*treatment variables that were created from cleaned
data.frames for race and treatment independently: t1W, t1B.t4W, t4B,
t4H, t4O.

class(t1W) produces numeric (1000 observations of 1's and 0's)

To create the box plot I am using
boxplot(residuals(IRR)~ treatRace_clean)

where I have tried treatRace_clean as both of the following
treatRace_clean - as.factor(as.vector(t1W + t1B + t1H + t1O + t2W + t2B +
t2H + t2O + t3W + t3B + 
t3H + t3O + t4W + t4B + t4H + t4O))
treatRace_clean - as.vector(c(t1W, t1B ,t1H ,t1O, t2W , t2B ,t2H ,t2O ,t3W
, t3B, 
t3H + t3O , t4W , t4B , t4H , t4O))

However, I continue to get this error code:
Error: $ operator is invalid for atomic vectors

Thoughts?

--
View this message in context: 
http://r.789695.n4.nabble.com/vector-w-o-arithmetic-addition-for-boxplot-tp4630190.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.