Re: [R] Variable name as string

2010-10-17 Thread Peter Dalgaard
On 10/17/2010 11:25 AM, Jan private wrote: > So here is the next version. > > Why does the intercept needs lower.tail=TRUE to give the same result as > summary() for value=0? It doesn't. Or rather: For all coefficients, lower/upper tail depends on the _sign_ of t, so presumably you have a negati

Re: [R] Variable name as string

2010-10-17 Thread Jan private
So here is the next version. Why does the intercept needs lower.tail=TRUE to give the same result as summary() for value=0? # See Verzani, simpleR (pdf), p. 80 coeff.test <- function(lm.result, idx, value) { # idx = 1 is the intercept, idx>1 the other coefficients # null hypothesis: coeff = v

Re: [R] Variable name as string

2010-10-17 Thread Peter Dalgaard
On 10/17/2010 05:41 AM, Jan private wrote: > Also, as a non-professional, I would like to know whether the function > is valid for all coefficients of lm(), e.g. coeff.test(lm(N ~ D + H), H, > "H", 70). I am aware that Verzani gives a different formula for testing > the intercept. In a word, no,

Re: [R] Variable name as string

2010-10-16 Thread Jan private
> coeffname <- deparse(substitute(var)) > > Is that what you wanted? > Yes! That gets rid of the extra parameter. Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-p

Re: [R] Variable name as string

2010-10-16 Thread Greg Snow
You can get the name of var by doing coeffname <- deparse(substitute(var)) Is that what you wanted? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-he