Re: [R] fast rowCumsums wanted for calculating the cdf

2010-10-15 Thread Douglas Bates
Although I know there is another message in this thread I am replying to this message to be able to include the whole discussion to this point. Gregor mentioned the possibility of extending the compiled code for cumsum so that it would handle the matrix case. The work by Dirk Eddelbuettel and

Re: [R] how fit linear model with fixed slope?

2010-10-22 Thread Douglas Bates
On Fri, Oct 22, 2010 at 9:13 AM, Czerminski, Ryszard ryszard.czermin...@astrazeneca.com wrote: I want to fit a linear model with fixed slope e.g. y = x + b (instead of general: y = a*x + b) Is it possible to do with lm()? Yes. The simplest way is to fit lm(y - a*x ~ 1) which will give you

Re: [R] Big data (over 2GB) and lmer

2010-10-23 Thread Douglas Bates
On Thu, Oct 21, 2010 at 2:00 PM, Ben Bolker bbol...@gmail.com wrote: Michal Figurski figurski at mail.med.upenn.edu writes: I have a data set of roughly 10 million records, 7 columns. It has only about 500MB as a csv, so it fits in the memory. It's painfully slow to do anything with it, but

Re: [R] lme vs. lmer results

2010-10-26 Thread Douglas Bates
On Tue, Oct 26, 2010 at 12:27 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello, and sorry for asking a question without the data - hope it can still be answered: I've run two things on the same data: # Using lme: mix.lme - lme(DV ~a+b+c+d+e+f+h+i, random = random = ~

Re: [R] Need help with lmer model specification syntax for nested mixed model

2010-10-31 Thread Douglas Bates
On Sun, Oct 31, 2010 at 2:35 AM, Carabiniero ja...@troutnut.com wrote: I haven't been able to fully make sense of the conflicting online information about whether and how to specify nesting structure for a nested, mixed model.  I'll describe my experiment and hopefully somebody who knows lme4

Re: [R] Using R for Production - Discussion

2010-11-02 Thread Douglas Bates
On Mon, Nov 1, 2010 at 11:04 PM, Santosh Srinivas santosh.srini...@gmail.com wrote: Hello Group, This is an open-ended question. Quite fascinated by the things I can do and the control I have on my activities since I started using R. I basically have been using this for analytical related

Re: [R] Integrate to 1? (gauss.quad)

2010-11-14 Thread Douglas Bates
I don't know about the statmod package and the gauss.quad function but generally the definition of Gauss-Hermite quadrature is with respect to the function that is multiplied by exp(-x^2) in the integrand. So your example would reduce to summing the weights. On Sun, Nov 14, 2010 at 11:18 AM,

Re: [R] how to do linear regression when dimension is high

2010-11-16 Thread Douglas Bates
On Tue, Nov 16, 2010 at 10:30 AM, poko2000 quan.poko2...@gmail.com wrote: Hi I am a newbie in R. I have data with dim of 20. How to use lm if i want to do regression with the whole design matrix? My y is the first column. the left are xs. Thanks a lot. Do you have the data stored in a

Re: [R] plot vs print ??

2010-11-16 Thread Douglas Bates
On Tue, Nov 16, 2010 at 11:09 AM, skan juanp...@gmail.com wrote: What's the differente betwen using plot and using print  in order to plot a graph? For example in order to plot the result of a histogram. Could you give an example? It seems that you are referring to graphics functions in

Re: [R] glmer, Error: Downdated X'X is not positive definite,49

2010-11-16 Thread Douglas Bates
It is often more effective to send questions about lmer or glmer to the r-sig-mixed-mod...@r-project.org mailing list, which I am cc:ing on this response. On Tue, Nov 16, 2010 at 3:25 AM, Annika annika.opperb...@jyu.fi wrote: Dear list, I am new to this list and I am new to the world of R.

Re: [R] Question about GLMER

2010-11-16 Thread Douglas Bates
I am cc:ing the r-sig-mixed-mod...@r-project.org mailing list on this reply as such questions are often answered more quickly on that list. On Tue, Nov 16, 2010 at 2:00 PM, Daniel Jeske daniel.je...@ucr.edu wrote: Dear R Help, I believe the glmer() function in lme4 automatically fits an

Re: [R] Matrix Size

2010-07-14 Thread Douglas Bates
On Wed, Jul 14, 2010 at 4:23 PM, paul s r-project@queuemail.com wrote: hi - i just started using R as i am trying to figure out how perform a linear regression on a huge matrix. i am sure this topic has passed through the email list before but could not find anything in the archives.

Re: [R] Passing the name of a variable to a function

2010-08-04 Thread Douglas Bates
On Wed, Aug 4, 2010 at 2:09 PM, Erik Iverson er...@ccbr.umn.edu wrote: Hello, I have a problem which has bitten me occasionally. I often need to prepare graphs for many variables in a data set, but seldom for all. or for any large number of sequential or sequentially named variables. Often

Re: [R] Help installation lme4a, Error Message: lme4a is not a valid installed library

2010-08-05 Thread Douglas Bates
On Thu, Aug 5, 2010 at 9:31 AM, rod84 ngueye...@hotmail.com wrote: Dear R users, I recently downloaded the library lme4a by svn checkout svn://svn.r-forge.r-project.org/svnroot/lme4. I tried to install the library lme4a by copying the downloaded document in the location where all the R

Re: [R] lapack in R 2.11.1 (Ubuntu 10.04.1)

2010-09-15 Thread Douglas Bates
On Wed, Sep 15, 2010 at 3:48 PM, Matias Salibian-Barrera msalib...@yahoo.ca wrote: Hi there, I'm trying to install the package RcppArmadillo in my R 2.11.1 which I installed and regularly update via Ubuntu's repositories. When I try to install RcppArmadillo from CRAN I get:

Re: [R] lmer() vs. lme() gave different variance component estimates

2010-09-21 Thread Douglas Bates
I haven't had the time to keep up with this discussion, or many of the other discussions on the R-SIG-Mixed-Models email list. I swamped with other duties at present. It is important to remember that the nlme and lme4 packages take a model specification and provide code to evaluate the deviance.

Re: [R] lmer() vs. lme() gave different variance component estimates

2010-09-21 Thread Douglas Bates
On Tue, Sep 21, 2010 at 1:39 PM, Douglas Bates ba...@stat.wisc.edu wrote: I haven't had the time to keep up with this discussion, or many of the other discussions on the R-SIG-Mixed-Models email list.  I swamped with other duties at present. It is important to remember that the nlme and lme4

Re: [R] lmer() vs. lme() gave different variance component estimates

2010-09-21 Thread Douglas Bates
On Tue, Sep 21, 2010 at 4:21 PM, Peter Dalgaard pda...@gmail.com wrote: On 09/21/2010 09:02 PM, Douglas Bates wrote: On Tue, Sep 21, 2010 at 1:39 PM, Douglas Bates ba...@stat.wisc.edu wrote: I haven't had the time to keep up with this discussion, or many of the other discussions on the R-SIG

Re: [R] Odp: Object Browser

2010-09-28 Thread Douglas Bates
On Mon, Sep 27, 2010 at 3:04 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi I noticed that nobody answered your question yet so here is my try. If you want to see what objects are in your environment you can use ls() but its output is only names of objects. Here is a function I use a long

[R] Data source for American college football rankings?

2009-09-29 Thread Douglas Bates
An interesting, and topical, example of multivariate data for classroom illustrations are the American college football rankings. Starting at the end of October (or week 8, the 8th week of the football season) a set of rankings called the BCS (Bowl Championship Series) will be published. This is

Re: [R] Data source for American college football rankings?

2009-09-29 Thread Douglas Bates
On Tue, Sep 29, 2009 at 7:56 AM, Douglas Bates ba...@stat.wisc.edu wrote: An interesting, and topical, example of multivariate data for classroom illustrations are the American college football rankings. Starting at the end of October (or week 8, the 8th week of the football season) a set

Re: [R] Condition to factor (easy to remember)

2009-09-30 Thread Douglas Bates
On Wed, Sep 30, 2009 at 2:42 PM, Douglas Bates ba...@stat.wisc.edu wrote: On Wed, Sep 30, 2009 at 2:43 AM, Dieter Menne dieter.me...@menne-biomed.de wrote: Dear List, creating factors in a given non-default orders is notoriously difficult to explain in a course. Students love the ifelse

Re: [R] Rounding error in seq(...)

2009-09-30 Thread Douglas Bates
On Wed, Sep 30, 2009 at 2:32 PM, Peter Dalgaardp.dalga...@biostat.ku.dk wrote: Martin Batholdy wrote: hum, can you explain that a little more detailed? Perhaps I miss the background knowledge - but it seems just absurd to me. 0.1+0.1+0.1 is 0.3 - there is no rounding involved, is there?

Re: [R] Plotting 1 covariate, 3 factors

2009-10-07 Thread Douglas Bates
I'm not sure if this is exactly what you are looking for but I would generally create an interaction plot using the lattice 'dotplot' with type = c(p,a) so I get both the original data and the lines joining the averages for the different factor levels. I also prefer the horizontal orientation to

Re: [R] custom selfStart model works with getInitial but not nls

2009-10-17 Thread Douglas Bates
On Fri, Oct 16, 2009 at 7:09 PM, Michael A. Gilchrist mi...@utk.edu wrote: Hello, I'm having problems creating and using a selfStart model with nlme.  Briefly, I've defined the model, a selfStart object, and then combined them to make a selfStart.default model. If I apply getInitial to the

Re: [R] Cairo package, png files within for loop are black?

2009-10-22 Thread Douglas Bates
On Thu, Oct 22, 2009 at 12:46 PM, Douglas M. Hultstrand dmhul...@metstat.com wrote: Hello, I am generating .png images using the Cairo package in a for loop (looping on the number of zones, number of zones equals the number of plots to create based on different zone data).   When  I run the R

Re: [R] What happen for Negative binomial link in Lmer fonction?

2009-10-22 Thread Douglas Bates
On Thu, Oct 22, 2009 at 1:39 PM, Ben Bolker bol...@ufl.edu wrote: ROBARDET Emmanuelle wrote: Dear R users, I'm performing some GLMMs analysis with a negative binomial link. I already performed such analysis some months ago with the lmer() function but when I tried it today I encountered

Re: [R] Automatization of non-linear regression

2009-10-22 Thread Douglas Bates
Alternatively you could install the NRAIA package and collapse the construction of the plot to a call to plotfit as shown in the enclosed. Note that this is a poor fit of a logistic growth model. There are no data values beyond the inflection point so the Asym parameter (the asymptote) is poorly

Re: [R] glm.fit to use LAPACK instead of LINPACK

2009-10-22 Thread Douglas Bates
On Thu, Oct 22, 2009 at 10:26 AM, Ravi Varadhan rvarad...@jhmi.edu wrote: Ted, LAPACK is newer and is supposed to contain better algorithms than LINPACK.   It is not true that LAPACK cannot handle rank-deficient problems.  It can. It's not just a question of handling rank-deficiency. It's

Re: [R] inspect s4 methods

2009-10-22 Thread Douglas Bates
On Thu, Oct 22, 2009 at 8:11 PM, Ista Zahn iz...@psych.rochester.edu wrote: Hi everyone, I'm sure this has been asked before, but I could not find the right search terms to find it. If I want to see what summarizing a model fit with lm() does, I can write summary.lm. But what if I want to

Re: [R] package lme4

2009-11-02 Thread Douglas Bates
On Sun, Nov 1, 2009 at 9:01 AM, wenjun zheng wjzhen...@gmail.com wrote: Hi R Users,     When I use package lme4 for mixed model analysis, I can't distinguish the significant and insignificant variables from all random independent variables.     Here is my data and result: Data:  

Re: [R] package lme4

2009-11-03 Thread Douglas Bates
, groups: Variety:Stand, 9; Variety, 3; Stand, 3 Fixed effects:             Estimate Std. Error t value (Intercept)   7.1852     0.6919   10.38 2009/11/2 Douglas Bates ba...@stat.wisc.edu On Sun, Nov 1, 2009 at 9:01 AM, wenjun zheng wjzhen...@gmail.com wrote: Hi R Users,     When I use

Re: [R] package lme4

2009-11-03 Thread Douglas Bates
-values from the likelihood ratio tests in that transcript I sent. The point of those tests is that a p-value can only be calculated when you know both the null hypothesis and the alternative, which is why those p-values are the result of comparing two nested model fits. 2009/11/2 Douglas Bates ba

Re: [R] LINEAR MIXED EFFECT

2009-11-12 Thread Douglas Bates
On Thu, Nov 12, 2009 at 10:14 AM, milton ruser milton.ru...@gmail.com wrote: Hi Ana, I am not quite sure if it is the problem, but if you call your data.frame as exp, you will crash exp() function... try use another name for your data.frame. By the way, I suggest you not use attach(). Try

Re: [R] lme model specification

2009-11-15 Thread Douglas Bates
On Sun, Nov 15, 2009 at 7:19 AM, Green, Gerwyn (greeng6) g.gre...@lancaster.ac.uk wrote: Dear all this is a question of model specification in lme which I'd for which I'd greatly appreciate some guidance. Suppose I have data in long format gene treatment rep Y 1        1      1  4.32 1  

Re: [R] function which saves an image of a dgtMatrix as png

2010-04-28 Thread Douglas Bates
image applied to a sparseMatrix object uses lattice functions to create the image. As described in R FAQ 7.22 you must use print(image(x)) or show(image(x)) or even plot(image(x)) when a lattice function is called from within another function. On Wed, Apr 28, 2010 at 1:20 PM, Gildas Mazo

Re: [R] error in La.svd Lapack routine 'dgesdd'

2010-05-04 Thread Douglas Bates
Google the name dgesdd to get the documentation where you will find that the error code indicates that the SVD algorithm failed to converge. Evaluation of the singular values and vectors is done via an iterative optimization and on some occasions will fail to converge. Frequently this is

Re: [R] need help in understanding R code, and maybe some math

2010-05-23 Thread Douglas Bates
On Sun, May 23, 2010 at 5:09 AM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2010-05-23 0:56, john smith wrote: Hi, I am trying to implement Higham's algorithm for correcting a non positive definite covariance matrix. I found this code in R:

Re: [R] Regression with sparse matricies

2010-05-23 Thread Douglas Bates
As Frank mentioned in his reply, expecting to estimate tens of thousands of fixed-effects parameters in a logistic regression is optimistic. You could start with a generalized linear mixed model instead library(lme4) fm1 - glmer(resp ~ 1 + (1|f1) + (1|f2) + (1|f1:f2), mydata, binomial)) If you

Re: [R] sparse matrices in lme4

2010-05-24 Thread Douglas Bates
On Mon, May 24, 2010 at 6:24 PM, Robin Jeffries rjeffr...@ucla.edu wrote: I read somewhere (help list, documentation) that the random effects in lme4 uses sparse matrix technology. Yes. That is why there is such a close link between the Matrix and lme4 packages. The sparse matrix methods in

Re: [R] Best way to preallocate numeric NA array?

2009-11-26 Thread Douglas Bates
On Thu, Nov 26, 2009 at 10:03 AM, Rob Steele freenx.10.robste...@xoxy.net wrote: These are the ways that occur to me. ## This produces a logical vector, which will get converted to a numeric ## vector the first time a number is assigned to it.  That seems ## wasteful. x - rep(NA, n) ##

Re: [R] Multiple CHOLMOD errors when attempting poisson glmm

2009-12-25 Thread Douglas Bates
On Thu, Dec 24, 2009 at 1:03 PM, postava-davig.m postava-davi...@husky.neu.edu wrote: Hello, I have been attempting to run a poisson glmm using lme4 for some time now and have had a lot of trouble.  I would say 9 times out of 10 I receive the following warning: CHOLMOD warning:  %h Error

Re: [R] lmer: how to lmer with no intercept

2009-12-29 Thread Douglas Bates
On Tue, Dec 29, 2009 at 11:46 AM, Julia7 liujul...@yahoo.com wrote: Hello, How do I fit a mixed effect model with no intercept using lmer()? Is the following syntax correct? lmer(y ~ -1+x1+x2+(-1+x1+x2|id), data=dt) Yes. An alternative, which I prefer, is lmer(y ~ 0 + x1 + x2 + (0 + x1 +

[R] Fwd: glm error: cannot correct step size

2009-12-30 Thread Douglas Bates
I forgot to cc: the list on this response. -- Forwarded message -- From: Douglas Bates ba...@stat.wisc.edu Date: Wed, Dec 30, 2009 at 8:05 AM Subject: Re: [R] glm error: cannot correct step size To: John Sorkin jsor...@grecc.umaryland.edu On Wed, Dec 30, 2009 at 7:50 AM, John

Re: [R] Piecewise regression in lmer

2010-01-04 Thread Douglas Bates
On Mon, Jan 4, 2010 at 6:24 AM, Walmes Zeviani walmeszevi...@hotmail.com wrote: AD Hayward wrote: Dear all, I'm attempting to use a piecewise regression to model the trajectory of reproductive traits with age in a longitudinal data set using a mixed model framework. The aim is to find

Re: [R] glm output for binomial family

2010-06-08 Thread Douglas Bates
On Tue, Jun 8, 2010 at 7:10 AM, Enrico Colosimo enrico...@gmail.com wrote: Hello,  I am having some trouble running a very simple example. I am running a logistic regression entering the SAME data set in two different forms and getting different values for the deviance residual. Just look

Re: [R] do faster ANOVAS

2010-06-10 Thread Douglas Bates
The lm and aov functions can take a matrix response allowing you to fit all of the responses for a single attribute simultaneously. On Thu, Jun 10, 2010 at 8:47 AM, melissa mellep...@orange.fr wrote: Dear all R users, I want to realize 800 000 ANOVAS and to store Sum of Squares of the effects.

Re: [R] Compiling R with multi-threaded BLAS math libraries - why not actually ?

2010-06-12 Thread Douglas Bates
On Sat, Jun 12, 2010 at 6:18 AM, Tal Galili tal.gal...@gmail.com wrote: Hello Gabor, Matt, Dirk. Thank you all for clarifying the situation. So if I understand correctly then: 1) Changing the BLAST would require specific BLAST per computer configuration (OS/chipset). It's BLAS (Basic

Re: [R] Can one get a list of recommended packages?

2010-06-12 Thread Douglas Bates
On Sat, Jun 12, 2010 at 8:37 AM, Dr. David Kirkby david.kir...@onetel.net wrote: R 2.10.1 is used in the Sage maths project. Several recommended packages (Matrix, class, mgcv, nnet, rpart, spatial, and survival) are failing to build on Solaris 10 (SPARC). Have you checked the dependencies for

Re: [R] Pretty printing progress

2010-06-17 Thread Douglas Bates
On Thu, Jun 17, 2010 at 10:50 AM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Thu, Jun 17, 2010 at 3:33 PM, Doran, Harold hdo...@air.org wrote: I have a function that is an iterative process for estimating some MLEs. I want to print some progress to screen as the process iterates.

Re: [R] how to efficiently compute set unique?

2010-06-21 Thread Douglas Bates
On Mon, Jun 21, 2010 at 8:38 PM, David Winsemius dwinsem...@comcast.net wrote: On Jun 21, 2010, at 9:18 PM, Duncan Murdoch wrote: On 21/06/2010 9:06 PM, G FANG wrote: Hi, I want to get the unique set from a large numeric k by 1 vector, k is in tens of millions when I used the matlab

Re: [R] Lattice and Beamer

2010-06-28 Thread Douglas Bates
On Mon, Jun 28, 2010 at 12:28 PM, Doran, Harold hdo...@air.org wrote: Two things I think are some of the best developments in statistics and production are the lattice package and the beamer class for presentation in Latex. One thing I have not become very good at is properly sizing my

Re: [R] lme4

2010-07-06 Thread Douglas Bates
On OS X you need to install the source package for lme4 as the binary package fails one of the tests. We have been unable to reproduce this failure under other operating systems, which makes it hard to debug. On Tue, Jul 6, 2010 at 11:09 AM, Alex Foley alex_foley_...@yahoo.com wrote: Hi, I

Re: [R] advice/opinion on quot; lt; -quot; vs quot; =quot; in teaching R

2010-01-15 Thread Douglas Bates
On Fri, Jan 15, 2010 at 10:00 AM, Ben Bolker bol...@ufl.edu wrote: John Kane jrkrideau at yahoo.ca writes: I've only been using R for about 2.5 years but and I'm not all that good  but I vote for - . I think the deciding factor is in  RSiteSearch() and the various manuals. Almost

Re: [R] Hierarchical Linear Model using lme4's lmer

2010-01-16 Thread Douglas Bates
On Sat, Jan 16, 2010 at 8:20 AM, Walmes Zeviani walmeszevi...@hotmail.com wrote: Doug, It appears you are mixing nlme and lme4 formulation type. On nlme library you type lme(y~x, random=~1|subjetc) On lme4 library you type lmer(y~x+(1|subject)) You mixed them. At your disposal.

Re: [R] Symmetric Matrix classes

2010-01-19 Thread Douglas Bates
On Tue, Jan 19, 2010 at 9:26 AM, Martin Maechler maech...@stat.math.ethz.ch wrote: Scanning for 'Matrix' in old R-help e-mail, I found GA == Gad Abraham gabra...@csse.unimelb.edu.au     on Fri, 27 Nov 2009 13:45:00 +1100 writes:    GA Hi,    GA I'd like to store large covariance matrices

Re: [R] Hierarchical data sets: which software to use?

2010-02-05 Thread Douglas Bates
On Sun, Jan 31, 2010 at 10:24 PM, Anton du Toit atdutoitrh...@gmail.com wrote: Dear R-helpers, I’m writing for advice on whether I should use R or a different package or language. I’ve looked through the R-help archives, some manuals, and some other sites as well, and I haven’t done too well

Re: [R] lmer Error message

2010-02-06 Thread Douglas Bates
On Sat, Feb 6, 2010 at 4:45 AM, Martin Bulla bu...@centrum.cz wrote: Does anybody knows what this error message means: Error in object$terms : $ operator not defined for this S4 class The error message means what it says and it doesn't come from lmer, it comes from the drop1 function being

Re: [R] R-Help

2010-02-07 Thread Douglas Bates
On Sat, Feb 6, 2010 at 2:46 PM, David Winsemius dwinsem...@comcast.net wrote: On Feb 6, 2010, at 3:29 PM, Ravi Ramaswamy wrote: Hi - I am not familiar with R.  Could I ask you a quick question? When I read a file like this, I get an error.  Not sure what I am doing wrong.  I use a MAC.  How

Re: [R] Data views (Re: (Another) Bates fortune?)

2010-02-08 Thread Douglas Bates
On Sun, Feb 7, 2010 at 2:40 PM, Emmanuel Charpentier charp...@bacbuc.dyndns.org wrote: Note : this post has been motivated more by the hierarchical data subject than the aside joke of Douglas Bates, but might be of interest to its respondents. Le vendredi 05 février 2010 à 21:56 +0100, Peter

Re: [R] lmer

2010-02-09 Thread Douglas Bates
On Tue, Feb 9, 2010 at 4:38 AM, Demirtas, Hakan demir...@uic.edu wrote: Does lmer do three-level mixed-effects models? Yes. What forms of outcome variables can it handle (continuous, survival, binary)? I'd appreciate any help. Continuous outcomes for lmer. glmer can handle binary

Re: [R] Potential problem with subset !!!

2010-02-12 Thread Douglas Bates
On Fri, Feb 12, 2010 at 9:22 AM, Arnaud Mosnier a.mosn...@gmail.com wrote: Dear useRs, Just a little post to provide the answer of a problem that took me some time to resolve ! Hope that reading this will permit the others to avoid that error. When using the subset function, writing

Re: [R] Why double quote is preferred?

2010-02-13 Thread Douglas Bates
On Fri, Feb 12, 2010 at 4:25 PM, blue sky bluesky...@gmail.com wrote: ?'`' shows the following: Single and double quotes delimit character constants. They can be used interchangeably but double quotes are *preferred* (and character constants are printed using double quotes), so single quotes

Re: [R] lm function in R

2010-02-14 Thread Douglas Bates
On Sat, Feb 13, 2010 at 7:09 PM, Daniel Malter dan...@umd.edu wrote: It seems to me that your question is more about the econometrics than about R. Any introductory econometric textbook or compendium on econometrics will cover this as it is a basic. See, for example, Greene 2006 or Wooldridge

Re: [R] False convergence of a glmer model

2010-02-16 Thread Douglas Bates
On Tue, Feb 16, 2010 at 9:05 AM, Shige Song shiges...@gmail.com wrote: Dear All, I am trying to fit a 2-level random intercept logistic regression on a data set of 20,000 cases.  The model is specified as the following:  m1 - glmer(inftmort ~ as.factor(cohort) + (1|code), family=binomial,

Re: [R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Douglas Bates
This is similar to another question on the list today. On Tue, Feb 16, 2010 at 4:39 AM, Luisa Carvalheiro lgcarvalhe...@gmail.com wrote: Dear R users, I  am having problems using package lme4. I am trying to analyse the effect of a continuous variable (Dist_NV) on a count data response

Re: [R] lmer - error asMethod(object) : matrix is not symmetric

2010-02-16 Thread Douglas Bates
, Luisa On Tue, Feb 16, 2010 at 5:35 PM, Douglas Bates ba...@stat.wisc.edu wrote: This is similar to another question on the list today. On Tue, Feb 16, 2010 at 4:39 AM, Luisa Carvalheiro lgcarvalhe...@gmail.com wrote: Dear R users, I  am having problems using package lme4. I am trying

Re: [R] False convergence of a glmer model

2010-02-16 Thread Douglas Bates
feel that I might get some very basic specification wrong in my R model... Best, Shige On Tue, Feb 16, 2010 at 10:29 AM, Douglas Bates ba...@stat.wisc.edu wrote: On Tue, Feb 16, 2010 at 9:05 AM, Shige Song shiges...@gmail.com wrote: Dear All, I am trying to fit a 2-level random intercept

Re: [R] Use of R in clinical trials

2010-02-18 Thread Douglas Bates
On Thu, Feb 18, 2010 at 12:36 PM, Bert Gunter gunter.ber...@gene.com wrote: The key dates are 1938 and 1962. The FDC act of 1938 essentially mandated (demonstration of) safety. The tox testing infrastructure grew from that.At that time, there were no computers, little data, little statistics

Re: [R] Print table in lme

2010-02-20 Thread Douglas Bates
On Sat, Feb 20, 2010 at 4:28 AM, Dieter Menne dieter.me...@menne-biomed.de wrote: Daniel-6 wrote: Hello, I'm trying to add lme results in a table with lm coef results, but as I know, estout or xtabel cannot  support lme objects. I'm a new in R and I'll appreciate some helpful comments.

Re: [R] Print table in lme

2010-02-20 Thread Douglas Bates
On Sat, Feb 20, 2010 at 10:27 AM, Dieter Menne dieter.me...@menne-biomed.de wrote: Douglas Bates-2 wrote: On Sat, Feb 20, 2010 at 4:28 AM, Dieter Menne For most other model fitting functions the sequence coef(summary(mymodel)) works.  Unfortunately, in the nlme package we assigned

Re: [R] get problem

2010-02-24 Thread Douglas Bates
On Wed, Feb 24, 2010 at 3:56 PM, Duncan Murdoch murd...@stats.uwo.ca wrote: On 24/02/2010 4:31 PM, Georg Ehret wrote: Dear R communtiy,   I do not understand why this does not work...: betaS$SBP [1]  0.03274 -0.04216 -0.08986 -0.45980  0.60320 -0.63070 -0.05682  0.20130 t-c(betaS$SBP)

Re: [R] Cross Compiling

2007-09-14 Thread Douglas Bates
An alternative to cross-compiling when you have a source package is to use the Win-builder facility at win-builder.R-project.org Thanks to Uwe for providing this facility. I find it much, much easier than trying to cross-compile or to set up a Windows computer for compiling R packages. On

Re: [R] Accessing the fixed- and random-effects variance-covariance matrices of an nlme model

2007-09-27 Thread Douglas Bates
On 9/26/07, Rob Forsyth [EMAIL PROTECTED] wrote: I would appreciate confirmation that the function vcov(model.nlme) gives the var-cov matrix of the fixed effects in an nlme model. It gives the approximate variance-covariance matrix for the fixed-effects parameters in the model. (Exact

Re: [R] fitted values in LMER for the fixed-effects only

2007-09-28 Thread Douglas Bates
not sure it give the fitted values both for the fixed and random or only the fixed. I looked in the r help and the r list and I haven't not found much details about it excepted this comments from Douglas Bates in January 2006 : Would it help if there were an option in the fitted method to allow

Re: [R] fitted values in LMER for the fixed-effects only

2007-10-02 Thread Douglas Bates
outpm or outp in SAS). .. Quoting Douglas Bates bates at stat.wisc.edu The calculation of the level = 0 fitted values in the new representation of the fitted model is quite easy. It is [EMAIL PROTECTED] %*% fixef(fm1) Douglas Bates replied Yes. Mmm.. If I consider a few

Re: [R] lme (or lmer) question

2007-10-05 Thread Douglas Bates
On 10/5/07, Bert Gunter [EMAIL PROTECTED] wrote: Folks: In the following mixed effect model, the x and residual variance components are nonidentifiable. Yet lme() (or the equivalent in lmer()) happily produces an answer in which the sum of the variance components is the correct estimate of

Re: [R] estfun d

2007-10-08 Thread Douglas Bates
On 10/8/07, Abdus Sattar [EMAIL PROTECTED] wrote: Hello EVERYONE, I need an URGENT help from you please! How can I see the estfun (empirical estimating function) and df (degree of freedom) from the following mixed-model please? (fm1 - lmer2(Reaction ~ Days + (Days|Subject), sleepstudy))

Re: [R] estfun df

2007-10-08 Thread Douglas Bates
On 10/8/07, Achim Zeileis [EMAIL PROTECTED] wrote: On Mon, 8 Oct 2007, Abdus Sattar wrote: Hello EVERYONE, I need an URGENT help from you please! This type of requests is not considered to be very polite, please have a look at the posting guide. How can I see the estfun (empirical

Re: [R] lme4 install trouble

2007-10-11 Thread Douglas Bates
On 10/11/07, David Reitter [EMAIL PROTECTED] wrote: After upgrading to R 2.6.0, I'm having trouble running lmer: model - lmer(primed ~ log(dist.time)*role + 1|target.utt, data=data.utts) Error in UseMethod(as.logical) : no applicable method for as.logical That problem originates in the

Re: [R] rearrange data columns

2007-10-11 Thread Douglas Bates
On 10/11/07, Martin Ivanov [EMAIL PROTECTED] wrote: Dear R users, I need to to the the following. Let a= 1 2 3 4 5 6 and b= -1 -2 -3 be (2x3) matrices. -4 -5 -6 I need to combine the two matrices into a new (2x6) matrix like this: ab =

Re: [R] reference for logistic regression

2007-10-11 Thread Douglas Bates
On 10/11/07, Douglas Bates [EMAIL PROTECTED] wrote: On 10/11/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dear list, first accept my apologies for asking a non-R question. Can anyone point me to a good reference on logistic regression? web or book references would be great. I am

Re: [R] Basic plot question: Figure 1.1 Pinheiro Bates

2007-10-12 Thread Douglas Bates
On 10/12/07, David Afshartous [EMAIL PROTECTED] wrote: All, Sorry for overly simplistic question, but I can't seem to remember how to create the basic plot shown in Figure 1.1 of Pinheiro Bates (2004; p.4). The y-axis delineates a factor (Rail) while the x-axis displays the distribution of a

Re: [R] coef se in lme

2007-10-17 Thread Douglas Bates
On 10/15/07, Doran, Harold [EMAIL PROTECTED] wrote: ?vcov The vcov method returns the estimated variance-covariance matrix of the fixed-effects only. I think Irene's question is about the combination of the fixed-effects parameters and the BLUPs of the random effects that is returned by the

[R] Appropriate measure of correlation with 'zero-inflated' data?

2007-10-25 Thread Douglas Bates
I have reached the correlation section in a course that I teach and I hit upon the idea of using data from the weekly Bowl Championship Series (BCS) rankings to illustrate different techniques for assessing correlation. For those not familiar with college football in the United States (where

Re: [R] R routines vs. MATLAB/SPSS Routines

2007-10-26 Thread Douglas Bates
On 10/26/07, Frank Thomas [EMAIL PROTECTED] wrote: ... BTW: Contrary to some ideas both R SPSS can be programmed and the algorithms for both have been published. So, no matter whether open source or private property you know what you do (if you want). This is off the point of Matt's original

Re: [R] is there a similar function to perform repeated statements asin SAS PROC MIXED?

2007-10-28 Thread Douglas Bates
On 10/24/07, Dimitris Rizopoulos [EMAIL PROTECTED] wrote: you can wave a look at the gls() function in package nlme, and specifically at the `weights' and `correlation' arguments; the same arguments are also available in the lme() function. That is certainly a way of fitting a correlation

Re: [R] Appropriate measure of correlation with'zero-inflated' data?

2007-10-29 Thread Douglas Bates
I have created some slides on the Bowl Championship series data for my class. Copies of just that part are available in http://www.stat.wisc.edu/~bates/BCS.zip Two interesting things about the analysis are that a parallel coordinate plot shows the differences in agreement quite clearly and that

Re: [R] Confidence Intervals for Random Effect BLUP's

2007-11-10 Thread Douglas Bates
On Nov 9, 2007 1:15 PM, Rick Bilonick [EMAIL PROTECTED] wrote: On Fri, 2007-11-09 at 18:55 +, Prof Brian Ripley wrote: I think Bert's point is important: I picked up a student on it in a case study presentation on this week because I could think of three interpretations, none strictly

Re: [R] Using lme (nlme) to find the conditional variance of therandom effects

2007-11-13 Thread Douglas Bates
On Nov 13, 2007 1:02 AM, Rick Bilonick [EMAIL PROTECTED] wrote: On Tue, 2007-11-13 at 01:03 -0500, Rick Bilonick wrote: Is there some way to get ranef with postVar=TRUE to show what the variances are, or what the lower and upper bounds are? qqmath makes nice plots but I need to obtain

Re: [R] box plot

2008-01-31 Thread Douglas Bates
2008/1/31 stephen sefick [EMAIL PROTECTED]: the data is attached Thanks. I want to boxplot this data y-read.table(afdmmgs.txt, header=T) boxplot(y) At this point you should use str(y) to examine the structure of the data. str(y) 'data.frame': 4 obs. of 12 variables: $ X215: num

Re: [R] Is it possible with two random effects in lme()?

2008-02-03 Thread Douglas Bates
On Feb 1, 2008 7:30 AM, Falco tinnunculus [EMAIL PROTECTED] wrote: Dear all, Is it possible with two random effects in lme()? lmefit1- lme(Handling ~ Mass + factor(Prey)+ Mass*factor(Prey), random = ~ 1 |Place+Age) I assume that Place and Age are not nested. If so, it's possible to fit

Re: [R] Maximum number of variables allowed in a multiple linearregression model

2008-02-06 Thread Douglas Bates
On Feb 6, 2008 11:28 AM, Tony Plate [EMAIL PROTECTED] wrote: Bert Gunter wrote: I strongly suggest you collaborate with a local statistician. I can think of no circumstance where multiple regression on hundreds of thousands of variables is anything more than a fancy random number generator.

Re: [R] ANOVA and lmer

2008-02-08 Thread Douglas Bates
On Feb 7, 2008 3:43 PM, Eric Imbert [EMAIL PROTECTED] wrote: I am analyzing from a very simple experiment. I have measured plants of two different colours (yellow and purple) in 9 different populations. So, I have two different factors : a fixed effect (Colour with two levels) and a random

Re: [R] [OT] good reference for mixed models and EM algorithm

2008-02-11 Thread Douglas Bates
On Feb 10, 2008 2:32 PM, Spencer Graves [EMAIL PROTECTED] wrote: Hi, Erin: Have you looked at Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer)? As far as I know, Doug Bates has been the leading innovator in this area for the past 20 years. Pinheiro was

Re: [R] Newbie HLM with lme4 questions

2008-02-13 Thread Douglas Bates
On Feb 13, 2008 9:53 AM, Ista Zahn [EMAIL PROTECTED] wrote: Dear R listers, I know I'm breaking the rules by asking a homework related question-- I hope you'll forgive me. I am a social psychology graduate student, and the only one in my department who uses R. I successfully completed my

Re: [R] Cholmod error `matrix not positive definite'

2008-02-14 Thread Douglas Bates
Could you tell us which version of the lme4 package you are using? You can just send the output produced by sessionInfo() If you can make your data available so we can test it then please do so. If the data set is large you could send it to me in private email and I will make it available on a

Re: [R] LMER

2008-02-15 Thread Douglas Bates
Could you send us the output of sessionInfo() please so we can see which version of the lme4 package you are using? In recent versions, especially the development version available as install.packages(lme4, repos = http://r-forge.r-project.org;) the PQL algorithm is no longer used. The Laplace

Re: [R] History of R

2008-02-15 Thread Douglas Bates
On Fri, Feb 15, 2008 at 1:53 PM, Kathy Gerber [EMAIL PROTECTED] wrote: Earlier today I sent a question to Frank Harrell as an R developer with whom I am most familiar. He suggested also that I put my questions to the list for additional responses. Next month I'll be giving a talk on R as

Re: [R] Error 'singular gradient' in nonlinear model fitting

2008-02-16 Thread Douglas Bates
On Feb 15, 2008 11:50 AM, Gabor Grothendieck [EMAIL PROTECTED] wrote: Try fitting regressing log(WEIGHT) against log(TOTAL) using lm and then transform the results into starting values for nls (or possibly that is sufficient and you don't need the nls results). Also, set the trace argument to

  1   2   3   >