[R] mcmcsamp shortening variable names; how can i turn this feature off?

From: Andrew Gelman <gelman_at_stat.columbia.edu>
Date: Fri 10 Feb 2006 - 23:32:58 EST


I have written a function called mcsamp() that is a wrapper that runs mcmcsamp() and automatically monitors convergence and structures the inferences into vectors and arrays as appropriate.

But I have run into a very little problem, which is that mcmcsamp() shortens the variable names. For example:

> set.seed (1)
> group <- rep (1:5,10)
> a <- rnorm (5,-3,3)
> y <- rnorm (50, a[group], 2)
> fit <- lmer (y ~ 1 + (1 | group))
> mcmcsamp(fit)

     (Intercept) log(sigma^2) log(grop.(In))
[1,]   -2.771979    0.6909418       1.750876
attr(,"mcpar")
[1] 1 1 1
attr(,"class")
[1] "mcmc"

I want "grop" in the above output to be "group", and I want "(In)" to be "(Intercept)". For my purposes (fitting models in general settings) it is important to have descriptive variable names, and I gain nothing by restricting names to 14 characters.

Is there a way to turn this feature off? Thanks.

-- 
Andrew Gelman
Professor, Department of Statistics
Professor, Department of Political Science
gelman@stat.columbia.edu
www.stat.columbia.edu/~gelman

Statistics department office:
  Social Work Bldg (Amsterdam Ave at 122 St), Room 1016
  212-851-2142
Political Science department office:
  International Affairs Bldg (Amsterdam Ave at 118 St), Room 731
  212-854-7075

Mailing address:
  1255 Amsterdam Ave, Room 1016
  Columbia University
  New York, NY 10027-5904
  212-851-2142
  (fax) 212-851-2164

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Feb 10 23:36:18 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:27 EST