Re: [R] gamm design matrices

2014-03-03 Thread Jarrod Hadfield
look ok. If you mimic gamm by calling smoothCon rather than smooth.construct and asking for constraints to be absorbed, and then add the model matrix column for the intercept back in, then it should be possible to get the model matrices to match. best, Simon On 02/03/14 17:16, Jarrod

Re: [R] gamm design matrices

2014-03-03 Thread Jarrod Hadfield
for constraints to be absorbed, and then add the model matrix column for the intercept back in, then it should be possible to get the model matrices to match. best, Simon On 02/03/14 17:16, Jarrod Hadfield wrote: Hi All, I would like to fit a varying coefficient model using MCMCglmm. To do

[R] gamm design matrices

2014-03-02 Thread Jarrod Hadfield
Hi All, I would like to fit a varying coefficient model using MCMCglmm. To do this it is possible to reparameterise the smooth terms as a mixed model as Simon Wood neatly explains in his book. Given the original design matrix W and penalisation matrix S, I would like to find the fixed

[R] Swaeve, Beamer and \alt

2013-02-09 Thread Jarrod Hadfield
Hi, I am having trouble getting \alt (or \altenv) to work with Schunk/Sinput and was wondering if anybody had had success? With the slide \begin{frame}[fragile]\frametitle{Basic R} \alt2{ echo=TRUE= 2+2 @ }{ echo=TRUE, eval=FALSE= 2+2 @ } \end{frame} I get the error message: ! FancyVerb

Re: [R] Swaeve, Beamer and \alt

2013-02-09 Thread Jarrod Hadfield
Hi, Unfortunately not, nor \begin{frame}[fragile], which does work with the uncover environment. Cheers, Jarrod Quoting Uwe Ligges lig...@statistik.tu-dortmund.de on Sat, 09 Feb 2013 18:45:39 +0100: On 09.02.2013 17:00, Jarrod Hadfield wrote: Hi, I am having trouble getting \alt

Re: [R] [R-sig-ME] Question on overdispersion

2010-11-19 Thread Jarrod Hadfield
Hi Thierry + nameless, It is not necessary to expand the binomial into Bernoulli trials (nor advisable if n and/or the binomial size are large). You can just fit observation-level random effects: dataset$resid-as.factor(1:dim(dataset)[1]) fit3 - glmer(cbind(male_chick_no, female_chick_no)

[R] unexpected behaviour with sparse.model.matrix

2010-08-15 Thread Jarrod Hadfield
Hi, I'm trying to get sparse.model.matrix to retain unused levels. I can't seem to get this working through the most obvious routes such as specifying drop.unused.levels = FALSE in the model.frame or trying to pass all levels in xlev,which is an argument to sparse.model.matrix (see code

Re: [R] [Rd] R CMD build wiped my computer

2010-07-28 Thread Jarrod Hadfield
. Perhaps Fedora should not use ~ as its back up file suffixes? Cheers, Jarrod On 28 Jul 2010, at 11:41, Martin Maechler wrote: Jarrod Hadfield j.hadfi...@ed.ac.uk on Tue, 27 Jul 2010 21:37:09 +0100 writes: Hi, I ran R (version 2.9.0) CMD build under root in Fedora (9). When it tried

Re: [R] [Rd] R CMD build wiped my computer

2010-07-28 Thread Jarrod Hadfield
quite anal retentive about having backups, which I have done for some time on my systems, hourly. HTH, Marc Schwartz On Jul 28, 2010, at 5:55 AM, Jarrod Hadfield wrote: Hi Martin, I think this is the most likely reason given that the name in the DESCRIPTION file does NOT have

[R] R CMD build wiped my computer

2010-07-27 Thread Jarrod Hadfield
Hi, I ran R (version 2.9.0) CMD build under root in Fedora (9). When it tried to remove junk files it removed EVERYTHING in my local account! (See below). Can anyone tell me what happened, and even more importantly if I can I restore what was lost. Panickingly, Jarrod [jar...@localhost

Re: [R] R CMD build wiped my computer

2010-07-27 Thread Jarrod Hadfield
, Jarrod Hadfield wrote: Hi, I ran R (version 2.9.0) CMD build under root in Fedora (9). When it tried to remove junk files it removed EVERYTHING in my local account! (See below). Can anyone tell me what happened, and even more importantly if I can I restore what was lost. You did several

Re: [R] mcmcglmm starting value example

2010-04-02 Thread Jarrod Hadfield
Dear Ping, It is not possible to pass starting values for the fixed effects. It doesn't make much sense to give starting values for the fixed effects because they can be Gibbs sampled in a single pass conditional on the latent variables and the (co)variance components - after a single

[R] plotmath

2009-09-21 Thread Jarrod Hadfield
Hi, I want to have a legend that is a mixture of numbers and symbols, and have found no way of achieving this. For example, if I want theta=x or theta=2 this is easily achieved. plot(0, xlab=expression(paste(theta, = x))) plot(0, xlab=expression(paste(theta, = 2))) However, if x is some

Re: [R] change attributes of all data.frame elements

2009-02-23 Thread Jarrod Hadfield
Hi Philipp, # Sorry - perhaps I wasn't being very clear. For example, creating the data frame: df-data.frame(y=rnorm(100), x=array(1:100)) # gives 2 elements, the last of which has a dim attribute lapply(df, dim) # I would like some way of changing the dim attribute to NULL for all

[R] change attributes of all data.frame elements

2009-02-20 Thread Jarrod Hadfield
Hi, I was wondering whether there was an easy way to change the attributes of all elements in a data.frame (rather than looping through elements)? Specifically, I would like to set the dim attributes to NULL Thanks for any help, Jarrod -- The University of Edinburgh is a charitable

Re: [R] generalized mixed model + mcmcsamp

2009-02-12 Thread Jarrod Hadfield
Hi Thomas/Ben, This model ca be MCMCed using MCMCglmm by specifying multinomial2 (i.e. binomial) in the family argument. MCMCglmm by default, fits a residual in the linear model to soak up extra-binomial variation, which is similar in motivation to quasi models. Cheers, Jarrod

[R] model.matrix and missing values

2008-12-28 Thread Jarrod Hadfield
Hi, Does anyone know an easy way of retaining rows in a model.matrix where missing values are present in the predictors. Ideally I'd be able to retain these rows as zeros. Thanks, Jarrod -- The University of Edinburgh is a charitable body, registered in Scotland, with registration

[R] uppercase greek and plotmath

2008-06-30 Thread Jarrod Hadfield
Hi, I cant seem to get some uppercase greek symbols (e.g. Delta) using plotmath. I'm on version R 2.7.0 (2008-04-22) Fedora Core 7 (34 bit). I have installed a whole heap of fonts, but still no luck, and any help would be appreciated. Cheers, Jarrod -- The University of Edinburgh

[R] linking C/C++ external libraries.

2007-12-03 Thread Jarrod Hadfield
Hi Everyone, I'm trying to load some C++ code using dyn.load but I'm getting unresolved symbols associated with some external libraries (CSparse). I gather this is something to do with linking as the the code compiles fine. However, I've passed

Re: [R] linking C/C++ external libraries.

2007-12-03 Thread Jarrod Hadfield
: _Z10cs_spalloci Error: package/namespace load failed for 'AManal' On 3 Dec 2007, at 16:57, Dirk Eddelbuettel wrote: On 3 December 2007 at 14:54, Jarrod Hadfield wrote: | I'm trying to load some C++ code using dyn.load but I'm getting | unresolved symbols associated with some external libraries