When you create a factor, use this form:

gender <- factor(gender, levels=c(1,2), labels=c("Women","Men))
or if they were coded "f" and "m" use this:
gender <- factor(gender, levels=c("f","m"), labels=c("Women","Men))
Cheers,
Bob

When using facet plot, how can we change the label of each fact?

e.g. change ‘female’ label here to ‘women’; and ‘male’ to ‘men’

R often boasts about its number of libraries available, but curiously there seems lack of R package for Bayesian. There is MCMCpack but it is very basic. R users as you said typically depend on other softwares such as OpenBUGS, JAGS, Stan for fitting Bayesian models. This means yet another software to install and another language to learn (some such as BUGS is similar to R but some may not).

I have not got a copy of Stata 14 yet but I found the PROC MCMC in SAS is very good and is my choice for Bayesian modelling at the moment.

]]>I’ll have to admit to being a bit lazy this year. Previous years I tried several growth curve models & quadratic fit it best. This year I did quadratic first & when I saw it explained 99.5% of the variance in growth, I figured that was enough.

Cheers,

Bob

I ask because I love to reproduce your figures when I talk about R.

]]>I’m glad you found it useful. Your comment reminds me to update it to mention that mutate is also in Hadley’s newer (and much better) dplyr package.

Cheers,

Bob

Here’s the latest on reading & writing Excel files.

http://www.mango-solutions.com/wp/2015/05/r-the-excel-connection/

http://www.milanor.net/blog/steps-connect-r-excel-xlconnect/

Cheers,

Bob