Re: [R] p-value for fixed effect in generalized linear mixed model

2008-02-20 Thread Douglas Bates
The lme4 package is still in development. I can't guarantee the evaluation of the deviance for the quasipoisson family. There is a certain amount of mystery about the role of the dispersion parameter and the null deviance in families like quasipoisson and quasibinomial. For the time being don't

Re: [R] Kenward-Roger correction in lme

2008-02-26 Thread Douglas Bates
On Mon, Feb 25, 2008 at 1:46 PM, Peter Dalgaard [EMAIL PROTECTED] wrote: Ben Bolker wrote: stian at mail.rockefeller.edu stian at mail.rockefeller.edu writes: Hi,I am wondering how to conduct Kenward-Roger correction in the linear mixed model using R. Any idea? Thanks a lot,

Re: [R] unbalanced one-way ANOVA

2008-02-28 Thread Douglas Bates
On Thu, Feb 28, 2008 at 7:52 AM, Nauta, A.L. [EMAIL PROTECTED] wrote: Hi, I have an unbalanced dataset on which I would like to perform a one-way anova test using R (aov). According to Wannacott and Wannacott (1990) p. 333, one-way anova with unbalanced data is possible with a few

Re: [R] unbalanced one-way ANOVA

2008-02-29 Thread Douglas Bates
. If in doubt about which sum of squares to use, the general rule is that you should only pay attention to the F ratio and p-value for the last term in the model. From: [EMAIL PROTECTED] on behalf of Douglas Bates Sent: Fri 29-2-2008 0:39 To: Nauta, A.L. Cc: r-help@r

Re: [R] unbalanced one-way ANOVA

2008-02-29 Thread Douglas Bates
. From: [EMAIL PROTECTED] on behalf of Douglas Bates Sent: Fri 29-2-2008 15:38 To: Nauta, A.L. Cc: R Help Subject: Re: [R] unbalanced one-way ANOVA On Fri, Feb 29, 2008 at 4:47 AM, Nauta, A.L. [EMAIL PROTECTED] wrote: Thank you for your reply, is your answer (that the approach

Re: [R] [OT] normal (as in Guassian)

2008-03-03 Thread Douglas Bates
On Mon, Mar 3, 2008 at 8:25 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 3/3/2008 9:10 AM, Rogers, James A [PGRD Groton] wrote: As someone of partly French heritage, I would also ask how this distribution came to be called Gaussian. It seems very unfair to de Moivre, who discovered the

Re: [R] Problem with lme4 use and installation

2008-03-03 Thread Douglas Bates
On Mon, Mar 3, 2008 at 9:57 AM, Charilaos Skiadas [EMAIL PROTECTED] wrote: Nothing's wrong. It just means that the package or one of its dependencies, has its own xtabs function, which hides the default xtabs function, since it comes first in the search path. So when you next write

Re: [R] problem

2008-03-04 Thread Douglas Bates
On Tue, Mar 4, 2008 at 10:35 AM, Erika Frigo [EMAIL PROTECTED] wrote: Good evening to everybody, I have problems to import in R a really big dataset (more than 100 values). Which is the best package to install? Is there someone who works with this kind of dataset and can help me,

Re: [R] package for repeated measures ANOVA with various link functions

2008-03-04 Thread Douglas Bates
On Tue, Mar 4, 2008 at 10:52 AM, John Sorkin [EMAIL PROTECTED] wrote: R 2.6.0 Windows XP At the risk of raising the ire of the R gods . . . I am looking for a package that will allow me to perform a poisson, quasipoisson, or negative binomial regression with adjustment for repeated

Re: [R] matrix inversion using solve() and matrices containing large/small values

2008-03-05 Thread Douglas Bates
On Wed, Mar 5, 2008 at 7:43 AM, Duncan Murdoch [EMAIL PROTECTED] wrote: On 3/5/2008 8:21 AM, gerardus vanneste wrote: Hello I've stumbled upon a problem for inversion of a matrix with large values, and I haven't found a solution yet... Someone with experience in numerical linear

Re: [R] package for repeated measures ANOVA with various link functions REDUX

2008-03-05 Thread Douglas Bates
) Douglas Bates [EMAIL PROTECTED] 3/4/2008 5:13 PM On Tue, Mar 4, 2008 at 10:52 AM, John Sorkin [EMAIL PROTECTED] wrote: R 2.6.0 Windows XP At the risk of raising the ire of the R gods . . . I am looking for a package that will allow me to perform a poisson, quasipoisson

Re: [R] analysing mixed effects/poisson/correlated data

2008-03-08 Thread Douglas Bates
On Sat, Mar 8, 2008 at 2:57 AM, Alexandra Bremner [EMAIL PROTECTED] wrote: I am attempting to model data with the following variables: timepoint - n=48, monthly over 4 years hospital - n=3 opsn1 - no of outcomes total.patients skillmixpc - skill mix percentage nurse.hours.per.day

Re: [R] analysing mixed effects/poisson/correlated data

2008-03-10 Thread Douglas Bates
On Sat, Mar 8, 2008 at 11:00 AM, Manuel Morales [EMAIL PROTECTED] wrote: On Sat, 2008-03-08 at 08:07 -0600, Douglas Bates wrote: On Sat, Mar 8, 2008 at 2:57 AM, Alexandra Bremner [EMAIL PROTECTED] wrote: I am attempting to model data with the following variables: timepoint

Re: [R] Anova

2008-03-17 Thread Douglas Bates
On Sun, Mar 16, 2008 at 6:39 AM, Gavin Simpson [EMAIL PROTECTED] wrote: On Sat, 2008-03-15 at 12:48 -0500, daniel jupiter wrote: Hi all, I apologize for what might be a silly question. I am interested in doing a one way anova. This is not too hard in and of itself, either with

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects wi

2008-03-18 Thread Douglas Bates
Usually a captcha is used to prevent creation of email accounts for use by spammers. (There was an interesting article recently on whether the Gmail captcha scheme had been broken so that spammers could create masses of gmail accounts. The general conclusion is that the capcha scheme is intact

Re: [R] analyzing binomial data with spatially correlated errors

2008-03-20 Thread Douglas Bates
On Wed, Mar 19, 2008 at 3:02 PM, Ben Bolker [EMAIL PROTECTED] wrote: Jean-Baptiste Ferdy Jean-Baptiste.Ferdy at univ-montp2.fr writes: Dear R users, I want to explain binomial data by a serie of fixed effects. My problem is that my binomial data are spatially correlated. Naively,

Re: [R] colMeans in a data.frame with numeric and character data

2008-03-27 Thread Douglas Bates
On Thu, Mar 27, 2008 at 3:05 PM, Dimitris Rizopoulos [EMAIL PROTECTED] wrote: try this: dat - data.frame(x = rnorm(10), y = rexp(10), z = letters[1:10]) colMeans(data.matrix(dat[sapply(dat, is.numeric)])) Alternatively sapply(dat, mean) x y z -0.5260131

Re: [R] Covariates in LME?

2008-03-27 Thread Douglas Bates
On Thu, Mar 27, 2008 at 7:01 AM, Aberg Carl [EMAIL PROTECTED] wrote: Hi, Im using lme to calculate a mixed factors ANOVA according to: px_anova = anova(lme(dep~music*time*group, random = ~1|id, data = px_data)) where dep is a threshold, time is a repeated measures variable (2 levels)

Re: [R] lmer function.

2008-03-31 Thread Douglas Bates
On Mon, Mar 31, 2008 at 7:13 AM, Boikanyo Makubate [EMAIL PROTECTED] wrote: I am using the lmer function from the lme4 package. I wrote the following statement, specifying the method to be adaptive Gaussian quadrature. I am getting an error saying method = AGQ not yet implemented for

Re: [R] lmer function :method=AGQ

2008-04-01 Thread Douglas Bates
getting an error saying method = AGQ not yet BM implemented for supernodal representation. Please help. How can i BM implement AGQ. This has been answered yesterday by Douglas Bates who is the lme4 developer: http://www.nabble.com/lmer-function.-td16398022.html#a16398022 Why do you

Re: [R] Roxygen vs Sweave for S4 documentation

2009-06-22 Thread Douglas Bates
On Mon, Jun 22, 2009 at 7:12 AM, Martin Maechlermaech...@stat.math.ethz.ch wrote: TobiasV == Tobias Verbeke tobias.verb...@openanalytics.be     on Sun, 21 Jun 2009 08:25:07 +0200 writes:    TobiasV Hi Ken,     I have been using R for a while.  Recently, I have begun converting my     package

Re: [R] Matrix multiplication precision

2009-07-15 Thread Douglas Bates
On Wed, Jul 15, 2009 at 3:42 AM, Nair, Murlidharan Tmn...@iusb.edu wrote: Hi!! I am trying to multiply 5 matrices and then using the inverse of that matrix for further computation. I read about precision problems from the archives and the suggestion was to use as.numeric while computing the

Re: [R] Remembering a value in multiple calls of a function

2009-07-17 Thread Douglas Bates
On Fri, Jul 17, 2009 at 9:15 AM, Saptarshi Guhasaptarshi.g...@gmail.com wrote: Hello, I tried this pseudo-generator style experiment (see below). The - operator assigns to in the calling environment which would be the environment of  getN. Yes. Yet when the function incr is returned, isn't

Re: [R] Index and dummy

2009-07-20 Thread Douglas Bates
On Sun, Jul 19, 2009 at 11:32 PM, Marujo A.a.mar...@soton.ac.uk wrote: Dear R-helpers I have 2 variables x1=rgamma(6000, 2, 1) and x2=rgamma(6000, 3,2). I have to sort (descending) each one and split it into groups. After this each two groups must be merged into one until all population

Re: [R] what is meaning of the bubbles in boxplots?

2009-07-20 Thread Douglas Bates
On Mon, Jul 20, 2009 at 5:18 AM, Jie TANGtotang...@gmail.com wrote: Hi ,everyone ,  I draw some boxplot figure with the command boxplot.But in the figure,there are some bubbles at the top part of the figure.  Can anyone tell me what the correct meaning of these bubbles?and how to remove it?

Re: [R] How '.' is used?

2009-08-09 Thread Douglas Bates
On Sun, Aug 9, 2009 at 11:32 AM, Ted Hardingted.hard...@manchester.ac.uk wrote: On 09-Aug-09 16:06:52, Peng Yu wrote: Hi, I know '.' is not a separator in R as in C++. I am wondering where it discusses the detailed usage of '.' in R. Can somebody point me a webpage, a manual or a book that

Re: [R] lmer syntax, matrix of (grouped) covariates?

2008-08-18 Thread Douglas Bates
On Mon, Aug 18, 2008 at 11:20 AM, Aaron Mackey [EMAIL PROTECTED] wrote: I have a fairly large model: length(Y) [1] 3051 dim(covariates) [1] 3051 211 All of these 211 covariates need to be nested hierarchically within a grouping class, of which there are 8. I have an accessory vector,

Re: [R] lmer and scale parameter in glmm model

2008-08-18 Thread Douglas Bates
On Mon, Aug 18, 2008 at 9:27 AM, Ben Bolker [EMAIL PROTECTED] wrote: Fränzi Korner fraenzi.korner at oikostat.ch writes: Have you got an answer? I am now working with R 2.7.1.. This R-version does not give the scale parameter in the summary of an lmer-object. Therefore, I would like to

Re: [R] R vs Stata on generalized linear mixed models: glmer and xtmelogit

2008-08-19 Thread Douglas Bates
On Mon, Aug 18, 2008 at 7:55 PM, [EMAIL PROTECTED] wrote: Hello, I have compared the potentials of R and Stata about GLMM, analysing the dataset 'ohio' in the package 'faraway' (the same dataset is analysed with GEE in the book 'Extending the linear model with R' by Julian Faraway).

Re: [R] Sending ... to a C external

2008-08-23 Thread Douglas Bates
On Fri, Aug 22, 2008 at 2:16 PM, John Tillinghast [EMAIL PROTECTED] wrote: I'm trying to figure this out with Writing R Extensions but there's not a lot of detail on this issue. I want to write a (very simple really) C external that will be able to take ... as an argument. (It's for

Re: [R] Eliminating columns that sum to zero

2008-08-24 Thread Douglas Bates
On Sun, Aug 24, 2008 at 11:54 AM, Ben Bolker [EMAIL PROTECTED] wrote: Wade Wall wade.wall at gmail.com writes: I am trying to look for a way to eliminate columns that sum to zero. Any help would be appreciated. x_without_zero_cols - x[,colSums(x)!=0] Of course, depending on the nature of

Re: [R] Sending ... to a C external

2008-08-25 Thread Douglas Bates
On Mon, Aug 25, 2008 at 12:28 PM, John Tillinghast [EMAIL PROTECTED] wrote: On Sat, Aug 23, 2008 at 11:46 AM, Douglas Bates [EMAIL PROTECTED] wrote: I don't think it is necessary to go through the agonies of dealing with the argument list in a .External call., which is what I assume you

Re: [R] environments

2008-08-26 Thread Douglas Bates
On Tue, Aug 26, 2008 at 6:07 AM, Henrique Dallazuanna [EMAIL PROTECTED] wrote: I think you need assign, see ?assign for more details. On Tue, Aug 26, 2008 at 6:02 AM, Antje [EMAIL PROTECTED] wrote: Hi there, I try to understand the usage of environments but I'm not sure if I get it. I wrote

Re: [R] Most common level of a factor by

2008-08-30 Thread Douglas Bates
On Fri, Aug 29, 2008 at 6:46 PM, David Huffer [EMAIL PROTECTED] wrote: I'm looking for something along the lines of which ( table ( x ) == max ( table ( x ) ) ) to find the most common level of one factor by several other factors. For instance, I've got X - data.frame ( + x = factor

Re: [R] Bug in is ?

2008-09-24 Thread Douglas Bates
On Wed, Sep 24, 2008 at 11:08 AM, [EMAIL PROTECTED] wrote: Thank you for all of you. Intuitively, 7 is an integer for people who live in this planet. It is just very difficult for me to believe that R does not think 7 is an integer but 7L is. is.integer(7) # R 2.7.2 [1] FALSE Thus, based

Re: [R] Bug in is ?

2008-09-24 Thread Douglas Bates
On Wed, Sep 24, 2008 at 4:30 PM, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: Douglas Bates wrote: On Wed, Sep 24, 2008 at 11:08 AM, [EMAIL PROTECTED] wrote: Thank you for all of you. Intuitively, 7 is an integer for people who live in this planet. It is just very difficult for me to believe

Re: [R] F-value and P-value for nonlinear regression ...

2008-09-24 Thread Douglas Bates
On Wed, Sep 24, 2008 at 2:54 PM, getulio coutinho figueiredo [EMAIL PROTECTED] wrote: Hello, everyone! I would like to know how to calculate the F-value and P-value for a non-linear regression: y ~ a * X^b * W^c ? Note: a, b and c are coefficients of adjustment of the equation and X and W

Re: [R] Exclusion of elements in a vector

2008-09-25 Thread Douglas Bates
On Thu, Sep 25, 2008 at 8:15 AM, Chuck Cleland [EMAIL PROTECTED] wrote: On 9/25/2008 7:43 AM, Stefan Fritsch wrote: Dear R Users, I want to exclude elements in a vector by: vector[-exclude] is it intended to cause an error if no elements are excluded? vector - 1:10 exclude - NULL

Re: [R] Bug in is ?

2008-09-25 Thread Douglas Bates
On Thu, Sep 25, 2008 at 4:23 PM, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: Rolf Turner wrote: On 26/09/2008, at 1:27 AM, Petr PIKAL wrote: Hi Sorry but I can not agree. If you measure something and your values in a vector are c(5.1, 5.4, 4.8, 5.0) do you think the first three numbers

Re: [R] Bug in is ?

2008-09-25 Thread Douglas Bates
On Thu, Sep 25, 2008 at 5:07 PM, Douglas Bates [EMAIL PROTECTED] wrote: On Thu, Sep 25, 2008 at 4:23 PM, Wacek Kusnierczyk [EMAIL PROTECTED] wrote: Rolf Turner wrote: On 26/09/2008, at 1:27 AM, Petr PIKAL wrote: Hi Sorry but I can not agree. If you measure something and your values

Re: [R] Basic Question on Keys/Values

2008-06-09 Thread Douglas Bates
, check ?which I can use lists now, and stop thrashing :) Thx again for the assistance! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Bates Sent: Monday, June 09, 2008 1:08 PM To: Dumblauskas, Jerry Cc: r-help@r-project.org Subject: Re

Re: [R] difference between nlm and nlminb

2008-06-11 Thread Douglas Bates
nlminb provides unconstrained optimization and optimization subject to box constraints (i.e. upper and/or lower constraints on individual elements of the parameter vector). The nlm function provides unconstrained optimization. I created the nlminb function because I was unable to get reliable

Re: [R] R vs SAS and HLM on multilevel analysis- basic question

2008-06-16 Thread Douglas Bates
We may want to move this discussion to the R-SIG-Mixed-Models list, which I have cc:'d on this reply. On Sun, Jun 15, 2008 at 6:16 PM, eugen pircalabelu [EMAIL PROTECTED] wrote: Hi R users! I am trying to learn some multilevel analysis, but unfortunately i am now very confused. The reason:

Re: [R] The Green Book and its relevance to R

2008-06-20 Thread Douglas Bates
On Fri, Jun 20, 2008 at 11:33 AM, Ben Fairbank [EMAIL PROTECTED] wrote: I bogged down about half way through reading the Green Book, in part because it became increasingly difficult to understand how some of the ideas related to R, as opposed to S (which I have not used). Does any reader know

[R] Dynamically switching lattice device characteristics in Sweave under Makefile control

2008-06-24 Thread Douglas Bates
I am indebted to Deepayan Sarkar for lattice graphics, Fritz Leisch for Sweave and the authors of the beamer package for LaTeX. For me these are a killer app combination. I wouldn't want to go back to creating presentations in any other way. When I create a presentation I use a Makefile that

Re: [R] Dynamically switching lattice device characteristics in Sweave under Makefile control

2008-06-25 Thread Douglas Bates
On Tue, Jun 24, 2008 at 7:43 PM, Deepayan Sarkar [EMAIL PROTECTED] wrote: On 6/24/08, Douglas Bates [EMAIL PROTECTED] wrote: I am indebted to Deepayan Sarkar for lattice graphics, Fritz Leisch for Sweave and the authors of the beamer package for LaTeX. For me these are a killer app

Re: [R] Question regarding lu in package Matrix

2008-07-09 Thread Douglas Bates
On Wed, Jul 9, 2008 at 12:01 PM, Ulrike Grömping [EMAIL PROTECTED] wrote: Dear R-helpers, I have a question regarding LU-decomposition with function lu in package Matrix. The following simple example confuses me: Why is as.matrix(elu$U) not an upper triangular matrix? u3 -

Re: [R] a warning message from lmer

2008-07-12 Thread Douglas Bates
On Sat, Jul 12, 2008 at 6:23 AM, Lan Wei [EMAIL PROTECTED] wrote: Hi all, I have a problem when running lmer. In my data set, Agree is a binary(0/1) response. WalkerID and ObsID is the identification number of the subjects. the description of the other variables are as follows:

Re: [R] a warning message from lmer

2008-07-12 Thread Douglas Bates
By the way, did you notice that the levels of Emotion include both joy and joy . You may want to correct that. On Sat, Jul 12, 2008 at 7:47 AM, Douglas Bates [EMAIL PROTECTED] wrote: On Sat, Jul 12, 2008 at 6:23 AM, Lan Wei [EMAIL PROTECTED] wrote: Hi all, I have a problem when running lmer

Re: [R] Regression problem

2008-07-15 Thread Douglas Bates
On Tue, Jul 15, 2008 at 10:25 AM, Patrick Burns [EMAIL PROTECTED] wrote: That can be accomplished with 8 keystrokes. A hint is to do the 4 keystrokes: ?lm Umm - unless you are counting the implicit Enter, that's only 3 keystrokes isn't it? Angila Albaros wrote: Hello all,

Re: [R] Likelihood ratio test between glm and glmer fits

2008-07-17 Thread Douglas Bates
On Thu, Jul 17, 2008 at 2:50 AM, Rune Haubo [EMAIL PROTECTED] wrote: 2008/7/16 Dimitris Rizopoulos [EMAIL PROTECTED]: well, for computing the p-value you need to use pchisq() and dchisq() (check ?dchisq for more info). For model fits with a logLik method you can directly use the following

Re: [R] Large number of dummy variables

2008-07-21 Thread Douglas Bates
effects for thousands of levels of a factor. -- Bert Gunter Genentech, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold Sent: Monday, July 21, 2008 3:16 PM To: [EMAIL PROTECTED]; r-help@r-project.org Cc: Douglas Bates Subject: Re: [R

Re: [R] glht after lmer with $S4class- and missing model.matrix- errors

2008-07-25 Thread Douglas Bates
You have a mismatch between glht and the model fit by lmer. A model fit by lmer is an object of an S4 class (that's what the 4 in the package name lme4 is to indicate). The glht function, or possibly a default method for that generic, is treating the model as an S3 class object. Also, you

Re: [R] Mixed model question.

2008-07-28 Thread Douglas Bates
On Sun, Jul 27, 2008 at 9:06 PM, Rolf Turner [EMAIL PROTECTED] wrote: I continue to struggle with mixed models. The square zero version of the problem that I am trying to deal with is as follows: A number (240) of students are measured (tested; for reading comprehension) on 6 separate

Re: [R] [R-sig-ME] Major difference in the outcome between SPSS and R statisticalprograms

2008-08-01 Thread Douglas Bates
On Fri, Aug 1, 2008 at 10:56 AM, Doran, Harold [EMAIL PROTECTED] wrote: First off, Marc Schwartz posted this link earlier today, read it. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-are-p_002dvalues-not-di splayed-when-using-lmer_0028_0029_003f Second, your email is not really

Re: [R] New Special Interest Groups?

2008-04-10 Thread Douglas Bates
Martin Maechler [EMAIL PROTECTED], who oversees the mailing lists, would be the best person to start with. On 4/10/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear list, After some extensive searching, I have drawn a blank on this. So ... Who is the best contact for questions

Re: [R] Equivalent of intervals() in lmer

2008-04-21 Thread Douglas Bates
On 4/21/08, Michael Kubovy [EMAIL PROTECTED] wrote: To help Kedar a bit: Here is one way: recall - c(10, 13, 13, 6, 8, 8, 11, 14, 14, 22, 23, 25, 16, 18, 20, 15, 17, 17, 1, 1, 4, 12, 15, 17, 9, 12, 12, 8, 9, 12) fr - data.frame(rcl = recall, time = factor(rep(c(1, 2, 5), 10)), subj =

Re: [R] Ubuntu vs. Windows

2008-04-23 Thread Douglas Bates
On 4/22/08, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Tue, 22 Apr 2008, Peter Dalgaard wrote: Doran, Harold wrote: Dear List: I am very much a unix neophyte, but recently had a Ubuntu box installed in my office. I commonly use Windows XP with 3 GB RAM on my machine and the

Re: [R] lmer model building--include random effects?

2008-04-23 Thread Douglas Bates
On 4/22/08, Ista Zahn [EMAIL PROTECTED] wrote: Hello, This is a follow up question to my previous one http://tolstoy.newcastle.edu.au/R/e4/help/08/02/3600.html I am attempting to model relationship satisfaction (MAT) scores (measurements at 5 time points), using participant (spouseID)

Re: [R] fix variance parameter values for lmer estimation

2008-04-25 Thread Douglas Bates
On 4/25/08, Wilfried Cools [EMAIL PROTECTED] wrote: Dear list-members, a model is fit with lmer, but I want to force the variance parameter values to be as defined by me I thought, use 'start' to specify initial values and only allow for one iteration ? my question is how to do that ?

Re: [R] Why R is 200 times slower than Matlab ?

2008-05-01 Thread Douglas Bates
On 5/1/08, Shige Song [EMAIL PROTECTED] wrote: Will the use of jit improve performance of use contributed packages such as lme4? Thanks. A technology like a byte-compiler or a just-in-time compiler will change the performance of interpreted code. It will not change the performance of compiled

Re: [R] Compact Indicator Matrices

2008-05-11 Thread Douglas Bates
On Sat, May 10, 2008 at 5:27 AM, amarkos [EMAIL PROTECTED] wrote: An indicator matrix is a binary matrix with orthogonal columns whose rows sum to 1. A row of this matrix could be [0 1 0 0]. My problem is to group the similar rows (profiles) so that to create a compact form of the matrix. I'm

Re: [R] Compact Indicator Matrices

2008-05-12 Thread Douglas Bates
On Sun, May 11, 2008 at 9:49 AM, amarkos [EMAIL PROTECTED] wrote: On May 11, 4:47 pm, Douglas Bates [EMAIL PROTECTED] wrote: Do you mean that you want to collapse similar rows into a single row and perhaps a count of the number of times that this row occurs? Let me rephrase the problem

Re: [R] [R-sig-ME] lme nesting/interaction advice

2008-05-12 Thread Douglas Bates
I'm entering this discussion late so I may be discussing issues that have already been addressed. As I understand it, Federico, you began by describing a model for data in which two factors have a fixed set of levels and one factor has an extensible, or random, set of levels and you wanted to fit

Re: [R] Compact Indicator Matrices

2008-05-12 Thread Douglas Bates
suggest that you continue to cc: the R-help list on the discussion. I can't always respond rapidly to requests and there are many who read the list that can. On May 12, 4:30 pm, Douglas Bates [EMAIL PROTECTED] wrote: On Sun, May 11, 2008 at 9:49 AM, amarkos [EMAIL PROTECTED] wrote: On May 11, 4:47

Re: [R] [R-sig-ME] lme nesting/interaction advice

2008-05-12 Thread Douglas Bates
On Mon, May 12, 2008 at 11:22 AM, Federico Calboli [EMAIL PROTECTED] wrote: On 12 May 2008, at 17:09, Douglas Bates wrote: I'm entering this discussion late so I may be discussing issues that have already been addressed. As I understand it, Federico, you began by describing a model for data

Re: [R] Repeated measures on a split-plot experiment

2008-05-13 Thread Douglas Bates
On Tue, May 13, 2008 at 1:40 PM, James Hudson [EMAIL PROTECTED] wrote: Please advise the proper format for coding the random effects of a split-plot experiment WITH repeated measures. I have been unable to figure out how to use either lme or lmer's grouping to properly assign the error terms.

Re: [R] Inconsistent linear model calculations

2008-05-15 Thread Douglas Bates
Did you happen to notice the part at the bottom of every message about provide commented, minimal, self-contained, reproducible code? Considering that the result you quote from 251 has 2 coefficients and the result from 171 has 3 coefficients one might contemplate the possibility that you are

Re: [R] mixed effects models with nested factors

2008-05-15 Thread Douglas Bates
On Thu, May 15, 2008 at 9:22 AM, Luis Cayuela [EMAIL PROTECTED] wrote: Hi everybody, I am trying to fit a model with the lmer function for mixed effects. I have an experimental design consisting of 5 field plots. Each plot is divided in 12 subplots where the influence of three factors on

Re: [R] R reference Books

2008-05-28 Thread Douglas Bates
There is a very good book called Data Manipulation with R by Phil Spector that just became available. It is brief and concise. I would recommend that book for learning about manipulating data in tables. For anyone interested in data exploration and graphics I would also recommend Deepayan

Re: [R] How do you exit a function in R?

2008-05-29 Thread Douglas Bates
It looks like you want to stop the function execution on detecting an error condition, in which case the appropriate function to call is stop(), as in if (nAssetPositions != nAssetPrices) stop(Different number of assets!) An alternative, if you don't want to write the error messages for each

Re: [R] mean

2008-06-06 Thread Douglas Bates
See also ?rowMeans On Fri, Jun 6, 2008 at 1:56 PM, [EMAIL PROTECTED] wrote: TABLE-matrix(data=c(12,13,14,15,24,10),byrow=T,nrow=2,ncol=3) TABLE [,1] [,2] [,3] [1,] 12 13 14 [2,] 15 24 10 apply(TABLE,1,mean) [1] 13.0 16.3 Chunhao Quoting Marco Chiapello

Re: [R] R + Linux

2008-06-06 Thread Douglas Bates
On Fri, Jun 6, 2008 at 1:13 PM, steven wilson [EMAIL PROTECTED] wrote: Dear all; I'm planning to install Linux on my computer to run R (I'm bored of W..XP). However, I haven't used Linux before and I would appreciate, if possible, suggestions/comments about what could be the best option

Re: [R] lsmeans

2008-06-08 Thread Douglas Bates
-matrix to compute the effects; you could also get standard errors by using the covariance matrix for the fixed effects. Douglas Bates: https://stat.ethz.ch/pipermail/r-sig-mixed-models/2007q2/000222.html My big problem with lsmeans is that I have never been able

Re: [R] re fit with binomial model (lme4)

2009-04-28 Thread Douglas Bates
Thanks for sending that, Ben. I have incorporated a slightly modified version, with attribution, in the lme4 sources. On Tue, Apr 28, 2009 at 8:03 AM, Ben Bolker bol...@ufl.edu wrote: I think the following works, but use with caution -- I just wrote it last night. setMethod(refit,

Re: [R] A potential bug for paste() ?

2009-05-07 Thread Douglas Bates
On Thu, May 7, 2009 at 9:56 AM, Sarah Goslee sarah.gos...@gmail.com wrote: It probably has less to do with paste() than with Theoph, but since we have no idea what that might be, it's hard to tell. See the bit about reproducible example, please. Well, actually Theoph is one of the datasets in

Re: [R] ADAPTIVE QUADRATURE WEIGHTS AND NODES

2009-05-08 Thread Douglas Bates
On Fri, May 8, 2009 at 7:07 AM, Boikanyo Makubate boika...@stats.gla.ac.uk wrote: Can anyone help me on how to get the nodes and weights of the adaptive quadrature using R. You need to be more specific about which quadrature formula. I'm guessing that you probably have Gauss-Hermite

Re: [R] Optimization algorithm to be applied to S4 classes - specifically sparse matrices

2009-05-15 Thread Douglas Bates
On Wed, May 13, 2009 at 5:21 PM, avraham.ad...@guycarp.com wrote: Hello. I am trying to optimize a set of parameters using /optim/ in which the actual function to be minimized contains matrix multiplication and is of the form: SUM ((A%*%X - B)^2) where A is a matrix and X and B are

Re: [R] How to save R clean sessions in BATCH mode?

2009-05-16 Thread Douglas Bates
On Sat, May 16, 2009 at 10:21 AM, mcnda...@mncn.csic.es wrote: Thanks a lot for all of you that have reply me about opening and ending R workspaces in BATCH mode. However replies were a king general and I’m afraid I could not take the entire message from them. Therefore I chose to expose here

Re: [R] (no subject)

2009-05-19 Thread Douglas Bates
On Mon, May 18, 2009 at 9:22 AM, Thomas Lumley tlum...@u.washington.edu wrote: On Mon, 18 May 2009, Debbie Zhang wrote: Based on a set of binomial sample data, how would you utilize the nlm function in R to estimate the true proportion of the population? I can't see why anyone would want to

Re: [R] S data sets in R?

2009-05-19 Thread Douglas Bates
On Tue, May 19, 2009 at 2:01 PM, Michael Hannon jm_han...@yahoo.com wrote: Greetings.  I'm trying to learn to program in R.  (I'm definitely NOT new to programming, just to R.)  A colleague suggested that I have a look at the book:    An Introduction to S and S-Plus by:    Phil Spector

Re: [R] Naming a random effect in lmer

2009-05-24 Thread Douglas Bates
Hi Bill, I'm about to take a look at this. If I understand the issue, very long expressions for what I call the grouping factor of a random effects term (the expressions on the right hand side of the vertical bar) are encountering problems with deparse. I should have realized that, any time one

Re: [R] Hierarchical glm with binomial family

2009-05-27 Thread Douglas Bates
On Wed, May 27, 2009 at 9:17 AM, Ben Bolker bol...@ufl.edu wrote: Johan Stenberg-2 wrote: Dear members of the R help list, I want to do a hierarchical glm with binomial family but am unsure about how to write the syntax which involves nesting. I want to test whether the risk of being

Re: [R] Nested variables

2009-05-29 Thread Douglas Bates
On Fri, May 29, 2009 at 7:50 AM, DanielWC daniel.carsten...@gmail.com wrote: Hello I am working with a biological data including variables called Habitat and Site, example: Habitat     Site Forest      Low Forest      Low Forest      High Forest      High I want to tell R that the

Re: [R] Matrix inversion-different answers from LAPACK and LINPACK

2009-06-17 Thread Douglas Bates
On Wed, Jun 17, 2009 at 2:02 PM, Albyn Jonesjo...@reed.edu wrote: As you seem to be aware, the matrix is poorly conditioned: kappa(PLLH,exact=TRUE) [1] 115868900869 It might be worth your while to think about reparametrizing. Also, if it is to be a variance-covariance matrix then it must be

Re: [R] Use and misuse of update function for non-models. Any views/recommendations??

2007-11-20 Thread Douglas Bates
On Nov 20, 2007 10:29 AM, Gabor Grothendieck [EMAIL PROTECTED] wrote: update already has formula and packageStatus methods so its being extended beyond models already even within core packages. Also, update methods are extensively used for the other kind of graphs in the lattice package.

Re: [R] lmer and method call

2007-12-01 Thread Douglas Bates
On Nov 29, 2007 8:09 PM, M-J Milloy [EMAIL PROTECTED] wrote: Hello all, I'm attempting to fit a generalized linear mixed-effects model using lmer (R v 2.6.0, lmer 0.99875-9, Mac OS X 10.4.10) using the call: vidusLMER1 - lmer(jail ~ visit + gender + house + cokefreq + cracfreq + herofreq +

Re: [R] lmer and method call

2007-12-01 Thread Douglas Bates
On Dec 1, 2007 9:26 AM, Douglas Bates [EMAIL PROTECTED] wrote: On Nov 29, 2007 8:09 PM, M-J Milloy [EMAIL PROTECTED] wrote: Hello all, I'm attempting to fit a generalized linear mixed-effects model using lmer (R v 2.6.0, lmer 0.99875-9, Mac OS X 10.4.10) using the call: vidusLMER1

Re: [R] difficulties getting coef() to work in some lmer() calls

2007-12-12 Thread Douglas Bates
On Dec 3, 2007 1:45 PM, David Park [EMAIL PROTECTED] wrote: I'm working with Andrew Gelman on a book project and we're having some difficulties getting coef() to work in some lmer() calls. Some versions of the model work and some do not. For example, this works (in that we can run the model

Re: [R] convergence error code in mixed effects models

2007-12-13 Thread Douglas Bates
On Dec 13, 2007 4:15 PM, Ilona Leyer [EMAIL PROTECTED] wrote: Dear All, I want to analyse treatment effects with time series data: I measured e.g. leaf number (five replicate plants) in relation to two soil pH - after 2,4,6,8 weeks. I used mixed effects models, but some analyses didn´t

Re: [R] logistic mixed effects models with lmer

2007-12-28 Thread Douglas Bates
On Dec 28, 2007 9:35 AM, Sharon Goldwater [EMAIL PROTECTED] wrote: I have a question about some strange results I get when using lmer to build a logistic mixed effects model. I have a data set of about 30k points, and I'm trying to do backwards selection to reduce the number of fixed effects

Re: [R] GLMMs fitted with lmer (R) glimmix (SAS

2008-01-06 Thread Douglas Bates
On Jan 4, 2008 6:21 PM, Andrea Previtali [EMAIL PROTECTED] wrote: Sorry, I realized that somehow the message got truncated. Here is the remaining part of the SAS output: Solutions for Fixed Effects: Effect DIST DW ELI SEX SEAS Estimate Std. Error DF t Value Pr

Re: [R] correlation matrix - large dataset

2008-01-08 Thread Douglas Bates
On Jan 8, 2008 12:34 AM, suman Duvvuru [EMAIL PROTECTED] wrote: Hello, I have a dataset with 20,000 variables.and I would like to compute a pearson correlation matrix which will be 2*2. The cor() function doesnt work in this case due to memory problem. If you have any ideas regarding

Re: [R] compile under Ubuntu 8.10 (Ibex)

2009-03-11 Thread Douglas Bates
On Wed, Mar 11, 2009 at 11:11 AM, Terry Therneau thern...@mayo.edu wrote:  I fired up a new machine last night and loaded Ubuntu 8.10 on it.  I then had to add in the usual compiler stuff which is not loaded by default: make, emacs, fortran, c++, etc.  I'm having trouble compiling R 2.8

Re: [R] Mixed model help!

2009-03-14 Thread Douglas Bates
On Fri, Mar 13, 2009 at 2:39 PM, Martín Quiroga mquir...@ssdfe.com.ar wrote: Hi everyone! I am a biologist from Argentina and have to solve this problem. I have an insect population obtained from 10 different nests and need to know its sex ratio. But as I cannot ensure insects independence I

Re: [R] Extracting SD of random effects from lme object

2009-03-23 Thread Douglas Bates
On Mon, Mar 23, 2009 at 2:18 PM, Kingsford Jones kingsfordjo...@gmail.com wrote: On Mon, Mar 23, 2009 at 11:26 AM, Ben Domingue ben.domin...@gmail.com wrote: Hello, How do I get the standard deviations for the random effects out of the lme object?  I feel like there's probably a simple way of

Re: [R] specifying repeated measures model in lmer

2009-03-23 Thread Douglas Bates
On Mon, Mar 23, 2009 at 2:35 PM, Lawrence Hanser lhan...@gmail.com wrote: Dear Colleagues, I have what Roger Kirk (Experimental Design: Procedures for the Behavioral Sciences, 1968) refers to as a randomized block factorial design.  The anova table would look like this:                      

Re: [R] CONFIDENCE INTERVAL FOR GLMER MODEL

2009-03-24 Thread Douglas Bates
On Tue, Mar 24, 2009 at 5:25 AM, LiatL liat.lam...@gmail.com wrote: I've built a poisson regression model for multiple subjects by using the GLMER function. I've also developed some curves for defining its limits but I did not succeed in developing confidence interval for the model's curve

Re: [R] Error in R??

2009-03-28 Thread Douglas Bates
On Sat, Mar 28, 2009 at 2:33 AM, Jim Silverton jim.silver...@gmail.com wrote:  Can someone explain why I am getting the following error: in the r code below? Are you asking what the error message means or how you are getting a computationally singular system? (My guess is that currvar is very

Re: [R] very fast OLS regression?

2009-03-28 Thread Douglas Bates
, which compares timings of various methods for least squares computations. Douglas Bates. Least squares calculations in R. R News, 4(1):17-20, June 2004. A Cholesky decomposition solution proved fastest in base R code, with an even faster version developed using sparse matrices and the Matrix

<    1   2   3   >