Re: [R] lme ->Error in getGroups.data.frame(dataMix, groups)

2018-11-24 Thread Bert Gunter
In brief, your random effects formula syntax is wrong. You need to (re) study ?lme or suitable tutorials for details of how to do what you want -- if you can with lme (e.g. crossed random effects are very difficult in lme, much easier in lmer). However, you should probably re-post on the r-sig-mix

[R] lme ->Error in getGroups.data.frame(dataMix, groups)

2018-11-24 Thread Boy Possen
The basic idea is to create a linear model in R such that FinH is explained by SoilNkh, dDDSP, dDDSP2, Provenance, Site, Genotype and Block, where SoilNkh, dDDSP and dDDSP2 are continuous covariates, Provenance, Site, Genotype and Block are factors, Site and Provenance are fixed and Genotype and Bl

Re: [R] lme to determine if there is a group effect

2016-08-25 Thread Thierry Onkelinx
Dear John, lme() not longer requires a GroupedData object. You can directly use a data.frame which is easier to specify different models. You want something like lme(value ~ time * group, random = ~ time|SS, data = data1) PS Note that the R-Sig-mixedmodels is more suited for this kind of questi

Re: [R] lme to determine if there is a group effect

2016-08-24 Thread Bert Gunter
I never used the groupedData structure, precisely because I found it confusing, but I think: 1. group is *not* a (random) grouping variable; it's a fixed effect covariate. 2. so I believe your groupedData call should be: GD<- groupedData(value~time|SS,data=data1,outer = group) Of course, as you

[R] lme to determine if there is a group effect

2016-08-24 Thread John Sorkin
I apologize for sending this message again. The last time I sent it, the subject line was not correct. I have corrected the subject line. I am trying to run a repeated measures analysis of data in which each subject (identified by SS) has 3 observations at three different times (0, 3, and 6).

Re: [R] lme() - MEEM error (singularity in Backsolve) due to user-specified contrasts amount

2016-02-23 Thread Bert Gunter
You are probably overfitting. This *IS* a statistical and not an R issue, and so does not belong here. You MAY get useful help by posting on the R-SIG-mixed-models list, however. But PLEASE post in *plain text*, not HTML, as the posting guide asks. Cheers, Bert Bert Gunter "The trouble with havi

Re: [R] lme function to obtain pvalue for fixed effect

2015-05-26 Thread Ben Bolker
li li gmail.com> writes: > > Hi all, > I am using the lme function to run a random coefficient model. > Please see > output (mod1) as below. Please don't cross-post to different R lists (this is explicitly deprecated by the list policy: , "cross-posting

[R] lme function to obtain pvalue for fixed effect

2015-05-26 Thread li li
Hi all, I am using the lme function to run a random coefficient model. Please see output (mod1) as below. I need to obtain the pvalue for the fixed effect. As you can see, the pvalues given using the summary function is different from the resutls given in anova function. Why should they be diff

Re: [R] lme random interactions

2015-03-17 Thread Thierry Onkelinx
Dear Brian, You want data$CompLab <- interaction(data$Compound, data$Lab) lme ( data=data, Resp ~ Lab * Compound, random = list(CombLab = ~ 1, Date = pdIdent(~0 + Lab)) , weights = varIdent(form=~1|Lab) ) Note that this is untested since you didn't provide a reproducible example. However

[R] lme random interactions

2015-03-16 Thread Middleton, Brian J
I have a method comparison problem, comparing Labs where a set of compounds are assayed on 3 different dates for each lab. Both labs will be used to assess compounds in the future, so the scientists will potentially contrast a compound at assayed at Lab A with one assayed at Lab B, This implies

Re: [R] lme: Can not find groupData object in a function could this be a scoping problem?

2015-02-14 Thread JS Huang
Hi, Unless you defined SS somewhere before you execute "data <- data.frame(group=c(rep("Cont",SS),rep("Exp",SS)), pre=pre,post=post)", SS is not assigned. Maybe it is TS you intended? doit<- function(TS,rho,premean,presd,RxEffect) { . . . # Prepare data frames for regression analyses.

[R] lme: Can not find groupData object in a function could this be a scoping problem?

2015-02-13 Thread John Sorkin
I resolved my program by restating RStudio . . . Thanks you, John R 3.1.0, RStudio 0.98.95 Windows 7 I have written a function that uses lme: doit<- function(TS,rho,premean,presd,RxEffect) { . . . # Prepare data frames for regression analyses. data <- data.frame(group=c(rep("Cont",SS),rep(

[R] lme: Can not find groupData object in a function could this be a scoping problem?

2015-02-13 Thread John Sorkin
R 3.1.0, RStudio 0.98.95 Windows 7 I have written a function that uses lme: doit<- function(TS,rho,premean,presd,RxEffect) { . . . # Prepare data frames for regression analyses. data <- data.frame(group=c(rep("Cont",SS),rep("Exp",SS)), pre=pre,post=post) . . . previ

[R] lme slopes and intercepts differences

2013-10-09 Thread Cleber Chaves
Hello all, I need to infer if the slopes and intercept of each group of my lme analyze, showed below, are different from each other. Like a Tukey test. I don't need to compare the slope and interceptof each subject of my fixed data, but the slope and intercept of each group of them. > m1<-lme(fvf

Re: [R] lme: object is not a matrix

2013-08-05 Thread Puschner, Bernd
Dear JM, creating a data frame did indeed solve my problem. Thank you so much. Best wishes Bernd Von: zelfortin [mailto:jmichel.for...@gmail.com] Gesendet: Freitag, 2. August 2013 22:10 An: r-help-arch...@googlegroups.com Cc: r-help@r-project.org; Puschner, Bernd Betreff: Re: [R

Re: [R] lme: object is not a matrix

2013-08-02 Thread zelfortin
Hi, make sure your data is in a data frame: Data <- data.frame(t,can2p,code) just specify in which object you find those specific variables by using object$ before each one. I hope this solve the problem. If not, post your script, it's really hard to work with only an error message! Cheers

Re: [R] lme: object is not a matrix

2013-08-02 Thread Bert Gunter
R is not splus. Read ?lme. Bert Sent from my iPhone -- please excuse typos. On Aug 2, 2013, at 5:45 AM, "Puschner, Bernd" wrote: > Dear all, > > > > when running in R a simple lme call (3 variables in data set) which > works perfectly fine in S-PLUS, I keep getting the error message > >

[R] lme: object is not a matrix

2013-08-02 Thread Puschner, Bernd
Dear all, when running in R a simple lme call (3 variables in data set) which works perfectly fine in S-PLUS, I keep getting the error message " Error in model.frame.default(formula = ~t + can2p + code, data = list( : object is not a matrix" Any help would be very much appreciated.

Re: [R] lme (weights) and glht

2013-07-26 Thread ONKELINX, Thierry
and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Sibylle Stöckli Verzonden: donderdag 25 juli 2013 12:16 Aan: r-help@r-project.or

[R] lme (weights) and glht

2013-07-25 Thread Sibylle Stöckli
Dear R members, I tried to fit an lme model and to use the glht function of multcomp. However, the glht function gives me some errors when using weights=varPower(). The glht error makes sense as glht needs factor levels and the model works fine without weights=. Does anyone know a solution s

Re: [R] lme function cannot find object

2013-06-06 Thread Ben Bolker
Pfeiffer, Steven miamioh.edu> writes: > I have been using the function lme() from package 'nlme' for several months > now without any problems. Suddenly, it cannot find a factor in my data. > Is this a new bug of some kind? My code and output are below. > Thanks for your help! > -Steve Pfeiffe

[R] lme function cannot find object

2013-06-05 Thread Pfeiffer, Steven
Hello, I have been using the function lme() from package 'nlme' for several months now without any problems. Suddenly, it cannot find a factor in my data. Is this a new bug of some kind? My code and output are below. Thanks for your help! -Steve Pfeiffer require(xlsx) require(nlme) Dat.middle<-

Re: [R] lme: subject-specific slopes.

2012-12-04 Thread Brian S Cade
12/04/2012 09:10 AM Subject: Re: [R] lme: subject-specific slopes. Sent by: r-help-boun...@r-project.org Ken, Thank you for your help. ranef(fitRIRT) does not give me what I expect. The subject-specific slopes, and subject-specific intercepts are not anywhere close to what I would expect them to

Re: [R] lme: subject-specific slopes.

2012-12-04 Thread John Sorkin
Yes, you are correct. Thanks, John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605

Re: [R] lme: subject-specific slopes.

2012-12-04 Thread Kenneth Frost
I think the random effects represent the subject adjustments to the population averages. You may have to do the addition yourself to get the subject specific slopes and intercepts. Someone will hopefully correct me if I'm wrong. On 12/04/12, John Sorkin wrote: > > > > Ken, > Thank you for yo

Re: [R] lme: subject-specific slopes.

2012-12-04 Thread John Sorkin
Ken, Thank you for your help. ranef(fitRIRT) does not give me what I expect. The subject-specific slopes, and subject-specific intercepts are not anywhere close to what I would expect them to be; the mean of the subject-specfic values should be close to those reported by summary(fitRIRT) and th

[R] lme: subject-specific slopes.

2012-12-04 Thread John Sorkin
I am running a random intercept random slope regression: fitRIRT <- lme(echogen~time,random=~ 1+time|subject,data=repeatdata,na.action=na.omit) summary(fitRIRT) I would like to get the subject-specific slopes, i.e. the slope that the model computes for each subject. If I have 10-subjects I s

Re: [R] lme help configuring random effects

2012-10-01 Thread Ben Bolker
Julie Lee-Yaw yahoo.ca> writes: > [snip] > I am trying to run a mixed effects model in R using the lme > package. My experiment is such that I am interested in the effects > of Temperature (2 levels) and Species (3 levels) on Growth. I > collected individuals from three populations within ea

[R] lme help configuring random effects

2012-10-01 Thread Julie Lee-Yaw
Hi Everyone,  Sorry to ask what I think is a basic question but I really haven't found my answer yet in the archives.  I am trying to run a mixed effects model in R using the lme package. My experiment is such that I am interested in the effects of Temperature (2 levels) and Species (3 levels)

[R] lme(y ~ ns(x, df=splineDF)) error

2012-09-26 Thread Jacob Wegelin
I would like to fit regression models of the form y ~ ns(x, df=splineDF) where splineDF is passed as an argument to a wrapper function. This works fine if the regression function is lm(). But with lme(), I get two different errors, depending on how I handle splineDF inside the wrapper function

Re: [R] translating SAS proc mixed into R lme()

2012-09-22 Thread Ben Bolker
Zoya Pyrkina gmail.com> writes: > I need help with translating these SAS codes into R with lme()? I have a > longitudinal data with repeated measures (measurements are equally spaced > in time, subjects are measured several times a year). I need to allow slope > and intercept vary. > > SAS code

[R] translating SAS proc mixed into R lme()

2012-09-21 Thread Zoya Pyrkina
Dear R users, I need help with translating these SAS codes into R with lme()? I have a longitudinal data with repeated measures (measurements are equally spaced in time, subjects are measured several times a year). I need to allow slope and intercept vary. SAS codes are: proc mixed data = surve

[R] lme( y ~ ns(x, df=splineDF)) error

2012-09-06 Thread Jacob Wegelin
I would like to fit regression models of the form y ~ ns(x, df=splineDF) where splineDF is passed as an argument to a wrapper function. This works fine if the regression function is lm(). But with lme(), I get two different errors, depending on how I handle splineDF inside the wrapper function

Re: [R] lme random effects in additive models with interaction

2012-06-21 Thread elifnurdogruoz
Thanks for your answer, I would like to make clear my question: My data is like following and there is a response variable y: Time Size Charge Density Replication 3 small + low 1 . .

[R] lme random effects in additive models with interaction

2012-06-21 Thread elifnurdogruoz
Hello, I work with a mixed model with 4 predictor variables Time, Size, Charge, Density and Size, Charge, Density are factors, all with two levels. Hence I want to put their interactions with Time into the model. But, I have two data sets (Replication 1 and 2) and I want that Replication is random

Re: [R] lme: extract result-function

2012-06-13 Thread Pascal Oettli
Hello, Is it to re-create what "predict" is able to do? Best Regards, Pascal Le 12/06/13 17:21, Christof Kluß a écrit : Hi, mod<- lme(A ~ -1 + B+C+D+E+F+G, random = ~1 | ...) results in summary(mod)$coeff B C D E F G (Intercept) b c d e f g i Now I'm interested in the function f<- functi

Re: [R] lme: extract result-function

2012-06-13 Thread Dieter Menne
Christof Kluß wrote > > mod <- lme(A ~ -1 + B+C+D+E+F+G, random = ~1 | ...) > ... > f <- function(B,C,D,E,F,G) <- { > return(i + b*B + c*C + d*D + e*E + f*F + g*G) > } > It looks like you are trying to compute contrasts the ugly way. Check estimable in package gmodels or the vignette of the m

Re: [R] lme: extract result-function

2012-06-13 Thread ONKELINX, Thierry
onkelijk bericht- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Christof Kluß Verzonden: woensdag 13 juni 2012 10:21 Aan: r-h...@stat.math.ethz.ch Onderwerp: [R] lme: extract result-function Hi, mod <- lme(A ~ -1 + B+C+D+E+F+G, random = ~1 | ...) results

Re: [R] lme: extract result-function

2012-06-13 Thread Rui Barradas
Hello, Try f <- function(response, regressors) as.formula(paste(response, paste(regressors, collapse=" + "), sep=" ~ ")) (resp <- "A") (regr <- c(-1, LETTERS[2:7])) fmla <- f(resp, regr) Hope this helps, Rui Barradas Em 13-06-2012 09:21, Christof Kluß escreveu: Hi, mod <- lme(

[R] lme: extract result-function

2012-06-13 Thread Christof Kluß
Hi, mod <- lme(A ~ -1 + B+C+D+E+F+G, random = ~1 | ...) results in summary(mod)$coeff B C D E F G (Intercept) b c d e f g i Now I'm interested in the function f <- function(B,C,D,E,F,G) <- { return(i + b*B + c*C + d*D + e*E + f*F + g*G) } Is there a easier way to create such function with f

Re: [R] lme random slope results the same as random slope and intercept model

2012-06-12 Thread ONKELINX, Thierry
12 16:52 Aan: r-help@r-project.org Onderwerp: [R] lme random slope results the same as random slope and intercept model R 2.15.0 Windows XP Can someone help me understand why a random intercept model gives the same results as the random intercept and slope models? I am rather surprised by the

Re: [R] lme random slope results the same as random slope and intercept model

2012-06-12 Thread John Sorkin
-- Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens John Sorkin Verzonden: dinsdag 12 juni 2012 16:52 Aan: r-help@r-project.org Onderwerp: [R] lme random slope results the same as random slope and intercept model R 2.15.0 Windows XP Can someone help me understand wh

[R] lme random slope results the same as random slope and intercept model

2012-06-12 Thread John Sorkin
R 2.15.0 Windows XP Can someone help me understand why a random intercept model gives the same results as the random intercept and slope models? I am rather surprised by the results I am getting from lme. I am running three models (1) random intercept fitRI <- lme(echogen~time,rando

[R] lme: Testing within-group coefficients

2012-05-29 Thread Dan Bebber
I need to determine whether a variable y2e increases with a covariate xt within individuals, where individuals a-j are measured several times. Is it possible to test whether within-group coefficients are significantly different from zero? The coefficients from an lmList fitted to my data give: >

Re: [R] lme or lmer for unbalance data

2012-05-05 Thread Ben Bolker
agent dunham hotmail.com> writes: > I'd like to fix a mixed model. I have unbalance data, what should i use: > lme in nlme package , or lmer in lme4. > > Thanks, user host.com as user host.com > More advanced mixed model questions belong on r-sig-mixed-models r-project.org , but the answ

[R] lme or lmer for unbalance data

2012-05-04 Thread agent dunham
Dear community, I'd like to fix a mixed model. I have unbalance data, what should i use: lme in nlme package , or lmer in lme4. Thanks, u...@host.com as u...@host.com -- View this message in context: http://r.789695.n4.nabble.com/lme-or-lmer-for-unbalance-data-tp4608425.html Sent from the R h

Re: [R] lme random intercept model vs. random intercept, random slope model yield difference in fixed effects but not difference in the anova.

2012-04-14 Thread Joshua Wiley
Hi John, R-help is not really for statistical questions (see something like statsexchange) or mixed models in R (there is a SIG mailing list for those). Just a note for next time. 1) The estimate for the time effect when it is a fixed effect versus random effect are different things. The former

[R] lme random intercept model vs. random intercept, random slope model yield difference in fixed effects but not difference in the anova.

2012-04-14 Thread John Sorkin
I am running two mixed effects regressions. One (fitRandomIntercept) has a random intercept, the second (fitRandomInterceptSlope) has a random intercept and a random slope. In the random slope regression, the fixed effect for time is not significant. In the random intercept random slope model,

Re: [R] lme code help

2012-03-15 Thread ONKELINX, Thierry
ject.org] Namens harkiran Verzonden: woensdag 14 maart 2012 21:13 Aan: r-help@r-project.org Onderwerp: [R] lme code help Hi guys, Got a few days left and I need to model a random effect of species on the body mass (logM) and temperature (K) slopes. This is what i've done so far that works:

[R] lme code help

2012-03-14 Thread harkiran
Hi guys, Got a few days left and I need to model a random effect of species on the body mass (logM) and temperature (K) slopes. This is what i've done so far that works: model1<-lme(logSSP~logM + K,random=~1|species,data=data1) model2<-lme(logSSP~logM + K,random=~K|species,data=data1) model3<-

Re: [R] lme, lmer, convergence

2012-02-07 Thread Ben Bolker
Erin McMullen Jonaitis wisc.edu> writes: > Hello, all, I am running some simulations to estimate power for a > complicated epidemiological study, and am using lme and lmer to get > these estimates. I have to run a few thousand iterations, and once > in a great while, an iteration will create fa

[R] lme, lmer, convergence

2012-02-07 Thread Erin McMullen Jonaitis
Hello, all, I am running some simulations to estimate power for a complicated epidemiological study, and am using lme and lmer to get these estimates. I have to run a few thousand iterations, and once in a great while, an iteration will create fake data such that the model won't converge. I s

Re: [R] lme model specification problem (Error in MEEM...)

2012-01-06 Thread Ben Bolker
Pascal A. Niklaus ieu.uzh.ch> writes: > In lme, models in which a factor is fully "contained" in another lead to > an error. This is not the case when using lm/aov. > > I understand that these factors are aliased, but believe that such > models make sense when the factors are fitted sequential

[R] lme model specification problem (Error in MEEM...)

2012-01-06 Thread Pascal A. Niklaus
Dear all, In lme, models in which a factor is fully "contained" in another lead to an error. This is not the case when using lm/aov. I understand that these factors are aliased, but believe that such models make sense when the factors are fitted sequentially. For example, I sometimes fit a f

Re: [R] lme with nested factor and random effect

2011-12-15 Thread R. Michael Weylandt
On Dec 15, 2011, at 2:07 PM, Ben Bolker wrote: > Mari Pesek gmail.com> writes: > >> >> Hello all, >> >> I'm having difficulty with setting up a mixed model using lme in the >> nlme package. To summarize my study, I am testing for effects of >> ornamentation on foraging behavior of wolf spid

Re: [R] lme with nested factor and random effect

2011-12-15 Thread Ben Bolker
Mari Pesek gmail.com> writes: > > Hello all, > > I'm having difficulty with setting up a mixed model using lme in the > nlme package. To summarize my study, I am testing for effects of > ornamentation on foraging behavior of wolf spiders. I tested spiders > at two different ages (penultimate vs

[R] lme with nested factor and random effect

2011-12-15 Thread Mari Pesek
Hello all, I'm having difficulty with setting up a mixed model using lme in the nlme package. To summarize my study, I am testing for effects of ornamentation on foraging behavior of wolf spiders. I tested spiders at two different ages (penultimate vs. mature) and of two different phenotypes (one

Re: [R] lme contrast Error in `$<-.data.frame`(`*tmp*`, "df", value = numeric(0)) :

2011-11-23 Thread rahulprabhuh
I had the same problem while doing classification using rpart. The mistake I had made was that the column names in the data frames had spaces and other special characters. I got the output when I changed this. Hope this helps. -- View this message in context: http://r.789695.n4.nabble.com/lme-con

[R] lme contrast Error in `$<-.data.frame`(`*tmp*`, "df", value = numeric(0)) :

2011-11-17 Thread Tanu Soni
I am trying to run a lme model and some contrast for a matrix . lnY [1] 10.911628 11.198557 11.316971 11.464869 11.575233 11.612101 11.755903 11.722035 11.757705 11.863744 11.846515 11.852721 11.866936 11.838452 11.946680 11.885509 [17] 11.583309 11.750082 11.756005 11.630797 11.705536 11.566722 1

Re: [R] lme convergence error

2011-07-26 Thread Bert Gunter
easonable answer can be extracted from a given body of data. > ~ John Tukey > > >> -Oorspronkelijk bericht- >> Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >> Namens Ben Grannan >> Verzonden: maandag 25 juli 2011 23:00 >> Aa

Re: [R] lme convergence error

2011-07-26 Thread ONKELINX, Thierry
amens Ben Grannan > Verzonden: maandag 25 juli 2011 23:00 > Aan: r-help@r-project.org > Onderwerp: [R] lme convergence error > > Hello, I am working from a linux 64 machine on a server with R-2.12 (I can't > update to 2.13). I am iterating through many linear mixed models for > longi

[R] lme convergence error

2011-07-25 Thread Ben Grannan
Hello, I am working from a linux 64 machine on a server with R-2.12 (I can't update to 2.13). I am iterating through many linear mixed models for longitudinal data and I occasionally receive the following convergence error: > BI.lme <- lme(cd4 ~ time + genBI + genBI:time + C1 + C2 + C11 + C12, ran

Re: [R] LME and overall treatment effects

2011-07-15 Thread ONKELINX, Thierry
derdag 14 juli 2011 22:05 > Aan: Bert Gunter > CC: r-help@r-project.org > Onderwerp: Re: [R] LME and overall treatment effects > > Ok...lets try again with some code... > > --- > Hello fellow R users, > >

Re: [R] LME and overall treatment effects

2011-07-14 Thread Mark Bilton
Ok...lets try again with some code... --- Hello fellow R users, I am having a problem finding the estimates for some overall treatment effects for my mixed models using 'lme' (package nlme). I hope someone can help. Fi

Re: [R] LME and overall treatment effects

2011-07-14 Thread Bert Gunter
Probably no hope of help until you do as the posting guide asks: > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and *** provide comm

[R] LME and overall treatment effects

2011-07-14 Thread Mark Bilton
Hello fellow R users, I am having a problem finding the estimates for some overall treatment effects for my mixed models using 'lme' (package nlme). I hope someone can help. Firstly then, the model: The data: Plant biomass (log transformed) Fixed Factors: Treatment(x3 Dry, Wet, Control) Yea

Re: [R] lme convergence failure within a loop

2011-06-22 Thread Daniel Malter
I am not an expert in this. But try try() :) hth, Daniel Sam Nicol wrote: > > Hi R-users, > > I'm attempting to fit a number of mixed models, all with the same > structure, across a spatial grid with data points collected at various > time points within each grid cell. I'm trying to use a

[R] lme convergence failure within a loop

2011-06-22 Thread Sam Nicol
Hi R-users, I'm attempting to fit a number of mixed models, all with the same structure, across a spatial grid with data points collected at various time points within each grid cell. I'm trying to use a 'for' loop to try the model fit on each grid cell. In some cells lme does not converge, g

[R] lme, stepAIC, predict: scope and visibility

2011-06-06 Thread Boris Hayete
Hello all, I've run into a problem where I can't run predict.lme on an object simplified via a stepAIC. A similar post has been recorded on this list: https://stat.ethz.ch/pipermail/r-help/2008-May/162047.html but in my case, I'm going to great lengths to not repeat that poster's error and stil

Re: [R] lme error: Error in getGroups.data.frame(dataMix, groups)

2011-02-28 Thread John Sorkin
Dennis, Thank you, John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Plea

Re: [R] lme error: Error in getGroups.data.frame(dataMix, groups)

2011-02-28 Thread Dennis Murphy
Hi: On Mon, Feb 28, 2011 at 8:42 AM, John Sorkin wrote: > R 2.10.0 > Windows XP > > I am trying to run lme. I receive the following error message: > My lme code is: > fitRandom <- lme(values ~ factor(subject), > data=withindata) > Where's the random factor? Perhaps you mean lme(values ~ 1, rand

[R] lme error message: Error in getGroups.data.frame(dataMix, groups) :

2011-02-28 Thread John Sorkin
Windows XP R 2.10 I am trying to run lme and get the following error: > fitRandom <- lme(values ~ subject, + data=withindata) Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups my data follows, below which is a copy of all my code > > print(withindata) subject

[R] lme error: Error in getGroups.data.frame(dataMix, groups)

2011-02-28 Thread John Sorkin
R 2.10.0 Windows XP I am trying to run lme. I receive the following error message: My lme code is: fitRandom <- lme(values ~ factor(subject), data=withindata) Below I have printed the console output, and at the bottom of this message, I have printed my code. I hope someone can tell my what I a

[R] lme in loop help

2011-02-25 Thread Ram H. Sharma
Dear R users I am new R user, execuse me I bother you, but I worked hard to find a solution: # data ID <- c(1:100) set.seed(21) y <- rnorm(100, 10,2) x1 <- rnorm(100, 10,2) x2 <- rnorm(100, 10,2) x3 <- rnorm(100, 10,2) x4 <- rnorm(100, 10,2) x5 <- rnorm(100, 10,2) x6 <- rnorm(100, 10,2) mydf <- d

Re: [R] lme-post hoc

2011-01-18 Thread Dieter Menne
plsc wrote: > > > I analysed my data with lme and after that I spent a lot of time for > mean separation of treatments (post hoc). But still I couldn’t make > through it. This is my data set and R scripts I tried. > > > > 3 level3 var4361261 > > modela<-lme(height~varie

Re: [R] lme-post hoc

2011-01-18 Thread Dieter Menne
plsc wrote: > > > I analysed my data with lme and after that I spent a lot of time for > mean separation of treatments (post hoc). But still I couldn’t make > through it. This is my data set and R scripts I tried. > > > > 3 level3 var4361261 > > modela<-lme(height~varie

Re: [R] lme-post hoc

2011-01-18 Thread Dieter Menne
-- View this message in context: http://r.789695.n4.nabble.com/lme-post-hoc-tp3224436p3224652.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

[R] lme-post hoc

2011-01-18 Thread Prabhath Pushpakumara
Hi all, I analysed my data with lme and after that I spent a lot of time for mean separation of treatments (post hoc). But still I couldn’t make through it. This is my data set and R scripts I tried. replication fertilizer variety plotheight 1 level1 var1150452 1

Re: [R] [R-lme] Extract estimated variances from output of lme?

2010-12-01 Thread Ben Bolker
Tingting Zhan jefferson.edu> writes: > > Hi all, > > I have the output of summary() of an lme object called "lme.exp1", for > example > > # > > summary(lme.exp1) > [snip] > for the common variance parameter sigma. But if I need the covariance >

[R] [R-lme] Extract estimated variances from output of lme?

2010-12-01 Thread Tingting Zhan
Hi all, I have the output of summary() of an lme object called "lme.exp1", for example # > summary(lme.exp1) Linear mixed-effects model fit by REML Data: DATA Log-restricted-likelihood: -430.8981 Fixed: fixed.exp1 Random effects: Formu

[R] lme with time series

2010-11-24 Thread María José Sorrondegui
Hi: I'm trying to fit a linear mixed effect model to two time series. My data base has 3 columns, number of observation, y, and x. Both y and x are market and specific asset return (both measured on a daily basis for the last 3 years). I want to explain y in terms of x. Response=y fixed=intercept

[R] lme Random Effects and Covariates

2010-11-18 Thread patze003
1. I'm attempting to test for Random Effects. I've grouped the data on subject (grid) but want to use lme to build the model without subject as a RE then add it and do anova between the 2 models. This is the result I get and it appears it's adding Random Effects. tmp.dat4 <- groupedData(Trials

[R] lme weights glht

2010-11-17 Thread Sibylle Stöckli
Dear R-user I used lme to fit a linear mixed model inlcuding weights=varPower(). Additionally I wanted to use glht to calculate Tukey-Kramer multiple comparision. error: > glht(modelF, linfct=mcp(Species="Tukey")) Error in glht.matrix(model = list(modelStruct = list(reStruct = list(SubPl

Re: [R] lme vs. lmer results

2010-10-26 Thread Dimitri Liakhovitski
Thanks a lot, Douglas. It's very heplful. A clarification question about specifying the model in lmer. You said it should be: mix.lmer <- lmer(DV ~a+b+c+d+(e+f+g+h+ii|group), mydata) I assume it was a typo and you meant that the last predictor in brackets should be i (rather than ii), right? Als

Re: [R] lme vs. lmer results

2010-10-26 Thread Douglas Bates
On Tue, Oct 26, 2010 at 12:27 PM, Dimitri Liakhovitski 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 = ~ e+f+h+i| > group, data = m

[R] lme vs. lmer results

2010-10-26 Thread Dimitri Liakhovitski
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 = ~ e+f+h+i| group, data = mydata) # Using lmer mix.lmer <- lmer(DV ~a+b+c+d+(1|group)+(e|group)+(f|grou

Re: [R] lme with log-normal distribution of parameters

2010-10-20 Thread Ben Bolker
Hoai Thu Thai inserm.fr> writes: > > Dear R-users, > > Do you know if we can use the function lme in R for log-normal > distribution of parameters as used in Nonmem ? > theta=theta0*exp(eta) > > In our model, the parameters follow the log-normal distribution so it's > not reasonable to deal

[R] lme with log-normal distribution of parameters

2010-10-20 Thread Hoai Thu Thai
Dear R-users, Do you know if we can use the function lme in R for log-normal distribution of parameters as used in Nonmem ? theta=theta0*exp(eta) In our model, the parameters follow the log-normal distribution so it's not reasonable to deal with normal distribution which gives us negative valu

Re: [R] LME with 2 factors with 3 levels each

2010-10-13 Thread Dennis Murphy
Hi: On Tue, Oct 12, 2010 at 8:59 PM, Laura Halderman wrote: > Hello. I am new to R and new to linear mixed effects modeling. I am > trying to model some data which has two factors. Each factor has three > levels rather than continuous data. Specifically, we measured speech at > Test 1, Test

Re: [R] LME with 2 factors with 3 levels each

2010-10-13 Thread Ista Zahn
Hi Laura, If you want ANOVA output, ask for it! A general strategy that almost always works in R is to fit 2 models, one without the term(s) you want to test, and one with. Then use the anova() function to test them. (models must be nested, and in the lmer() case you need to use REML = FALSE). So

[R] LME with 2 factors with 3 levels each

2010-10-12 Thread Laura Halderman
Hello. I am new to R and new to linear mixed effects modeling. I am trying to model some data which has two factors. Each factor has three levels rather than continuous data. Specifically, we measured speech at Test 1, Test 2 and Test 3. We also had three groups of subjects: RepTP, RepNTP a

Re: [R] lme, groupedData, random intercept and slope

2010-09-10 Thread array chip
from the output, I think it's both. - Original Message From: John Sorkin To: r-help@r-project.org Sent: Fri, September 10, 2010 5:25:44 AM Subject: [R] lme, groupedData, random intercept and slope Windows Vista R 2.10.1 Does the following use of groupedData and lme produ

Re: [R] lme vs. lmer, how do they differ?

2010-09-10 Thread Ben Bolker
John Sorkin grecc.umaryland.edu> writes: > > windows Vista > R 2.10.1 > > What is the difference (or differences) between lme and lmer? Both appear to perform mixed effects > regression analyses. > Thanks > John > in a nutshell: lmer is newer, much faster, handles crossed random effects

Re: [R] lme vs. lmer, how do they differ?

2010-09-10 Thread S Ellison
>>> "John Sorkin" 10/09/2010 13:21:09 >>> >What is the difference (or differences) between lme and lmer? Both appear to perform mixed effects regression analyses. >From a user's point of view: - lme only accepts nested random effect; lmer handles crossed random effects - lme has a convenient meth

[R] lme, groupedData, random intercept and slope

2010-09-10 Thread John Sorkin
Windows Vista R 2.10.1 Does the following use of groupedData and lme produce an analysis with both random intercept and slope, or only random slope? zz<-groupedData(y~time | Subject,data=data.frame(data), labels = list( x = "Time", y = "y" ), unit

[R] lme vs. lmer, how do they differ?

2010-09-10 Thread John Sorkin
windows Vista R 2.10.1 What is the difference (or differences) between lme and lmer? Both appear to perform mixed effects regression analyses. Thanks John John David Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology Baltim

Re: [R] lme, spline

2010-06-15 Thread Gavin Simpson
On Tue, 2010-06-15 at 06:28 -0700, Farhad Shokoohi wrote: > Dear All, > I revise my question about the problem I have. > Take a look at the article > http://www.jstatsoft.org/v09/i01 > and download the attached code. > try to run one of the codes for example section 2.1 in R > here is the code Th

Re: [R] lme, spline

2010-06-15 Thread Farhad Shokoohi
Dear All, I revise my question about the problem I have. Take a look at the article http://www.jstatsoft.org/v09/i01 and download the attached code. try to run one of the codes for example section 2.1 in R here is the code fossil <- read.table("fossil.dat",header=T) x <- fossil$age y <- 10*f

[R] lme, spline (revised question)

2010-06-15 Thread Farhad Shokoohi
Dear All, I revise my question about the problem I have. Take a look at the article http://www.jstatsoft.org/v09/i01 and download the attached code. try to run one of the codes for example section 2.1 in R here is the code fossil <- read.table("fossil.dat",header=T) x <- fossil$age y <- 10*fo

Re: [R] lme, spline

2010-06-15 Thread Joris Meys
On Tue, Jun 15, 2010 at 9:47 AM, Farhad Shokoohi wrote: > Dear All, > I have a problem running this program on R. Z is a  matrix of spline which is > random >> fit<-lme(anc~X,random=pdIdent(~Z)) > Error in getGroups.data.frame(dataMix, groups) : >  Invalid formula for groups > What I have done wr

  1   2   3   >