similar to: Add covariate in nlme?

Displaying 20 results from an estimated 400 matches similar to: "Add covariate in nlme?"

2012 Feb 05
1
Covariate model in nlme
Dear R users, I am using nlme to fit a pharmacokinetic model. The base model is parameterized in terms of CL, V1, V2 and Q. basemodel<-nlme(Conc ~TwoCompModel(CL,Q,V1,V2,Time,ID), data = data2, fixed=list(CL+Q+V1+V2~1), random = pdDiag(CL+V1+V2~1), start=c(CL=log(20),Q=log(252),V1=log(24.9),V2=log(120)), control=list(returnObject=TRUE,msVerbose=TRUE, msMaxIter=20,pnlsMaxIter=20,pnlsTol=1),
2002 Jun 19
0
Possible bug with very large files
Hi, 2 servers running Suse Linux 7.1 kernel 2.2.19 i386, rsync 2.5.5 compiled on these boxes. These are two FEP's with 32 modems, working as master/slave rsync is using dedicated 100 base T network interfaces (eth1) , crossover cable between them, only rsync traffic allowed on these interfaces. rsync run every 30 seconds It seems to be a bug when it attempt's to transfer very large
2006 Mar 16
1
lme4/Matrix: Call to .Call("mer_update_y"...) and LMEoptimize gives unexpected side effect...
Dear all I want to compute Monte Carlo p-values in lmer-models based on sampled data sets. To speed up calculations, I've tried to use internal functions from the Matrix package (as suggested ealier on the list by Doug Bates). So I did: fm2 <- lmer(resistance ~ ET + position + (1|Grp), Semiconductor,method='ML') simdata<-simulate(fm2,nsim=1) ynew <- simdata[,1] mer
2006 May 26
2
lme, best model without convergence
Dear R-help list readers, I am fitting mixed models with the lme function of the nlme package. If I get convergence depends on how the method (ML/REM) and which (and how much) parameters will depend randomly on the cluster-variable. How get the bist fit without convergence? I set the parameters msVerbose and returnObject to TRUE: lmeControl(maxIter=50000, msMaxIter=200, tolerance=1e-4,
2004 Nov 30
1
lme in R-2.0.0: Problem with lmeControl
Hello! One note/question hier about specification of control-parameters in the lme(...,control=list(...)) function call: i tried to specify tne number of iteration needed via lme(....,control=list(maxIter=..., niterEM=...,msVerbose=TRUE)) but every time i change the defualt values maxIter (e.g. maxIter=1, niterEM=0) on ones specified by me, the call returns all the iterations needed until
2010 Nov 08
2
Several lattice plots on one page
Dear all, I am trying (!!!) to generate pdfs that have 8 plots on one page: df = data.frame( day = c(1,2,3,4), var1 = c(1,2,3,4), var2 = c(100,200,300,4000), var3 = c(10,20,300,40000), var4 = c(100000,20000,30000,4000), var5 = c(10,20,30,40), var6 = c(0.001,0.002,0.003,0.004), var7 = c(123,223,123,412), var8 = c(213,123,234,435), all = as.factor(c(1,1,1,1)))
2018 Mar 22
3
How do I include a factor in a groupedData object? Meaning and use of inner and outer parameters
Windows 10 64-bit, R-Studio, R version 3.4.3 Several questions relating to groupedData: (1) I am trying to create a groupedData object that can be used to run an analysis that I have been able to urn using lmer. When I include the interaction terms in the groupedData opbject I get an error message stating that + is not meaningful for factors. How do I include factors in my model? See code and
2008 Jun 04
2
Constructing groupedData objects in nlme - a little problem
Dear R-help, I am trying to create groupedData objects using the nlme library. I'm missing something basic, I know: Here is the first example in ch.1 of Pinheiro & Bates (2000): library(nlme) x2=Rail$travel;x1=Rail$Rail;eg1=data.frame(x1,x2);eg1gd=Rail print(eg1gd) x11();print(plot(eg1gd)) femodel=lm(x2~x1-1,data=eg1gd) print(femodel$coefficients) Result: x12 x15 x11
2004 Jul 23
2
lme4 groupedData is missing
help.search("groupedData") says that it's part of the lme4 package, but it appears not to be there (details below). Is this because lme4 is new and (perhaps) still under development? > update.packages() trying URL `http://cran.r-project.org/bin/windows/contrib/1.9/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 19113 bytes opened URL downloaded 18Kb >
2005 Mar 17
2
Repeated Measures, groupedData and lme
Hello I am trying to fit a REML to some soil mineral data which has been collected over the time period 1999 - 2004. I want to know if the 19 different treatments imposed, differ in terms of their soil mineral content. A tree model of the data has shown differences between the treatments can be attributed to the Magnesium, Potassium and organic matter content of the soil, with Magnesium being the
2006 Jul 23
1
How to pass eval.max from lme() to nlminb?
Dear R community, I'm fitting a complex mixed-effects model that requires numerous iterations and function evaluations. I note that nlminb accepts a list of control parameters, including eval.max. Is there a way to change the default eval.max value for nlminb when it is being called from lme? Thanks for any thoughts, Andrew -- Andrew Robinson Department of Mathematics and Statistics
2006 Aug 04
1
gnlsControl
When I run gnls I get the error: Error in nls(y ~ cbind(1, 1/(1 + exp((xmid - x)/exp(lscal)))), data = xy, : step factor 0.000488281 reduced below 'minFactor' of 0.000976563 My first thought was to decrease minFactor but gnlsControl does not contain minFactor nor nlsMinFactor (see below). It does however contain nlsMaxIter and nlsTol which I assume are the analogs of
2007 Dec 05
0
lme output
Dear all, I noticed the following in the call of lme using msVerbose. fm1 <- lme(distance ~ age, data = Orthodont, control = lmeControl(msVerbose=T)) 9 318.073: -0.567886 0.152479 1.98021 10 318.073: -0.567191 0.152472 1.98009 11 318.073: -0.567208 0.152473 1.98010 fm2 <- lme(distance ~ age, random =~age, data = Orthodont,
2006 Dec 07
2
groupedData Error Using outer=TRUE
I'm using groupedData from nlme. I set up a groupedData data.frame with outer=~group1. When I try to plot with outer=TRUE, I get "subscript out of bounds." This happens most of the time. When it works, I get spaghetti-type plots for comparing groups. But I don't understand why it doesn't usually work. > longa.mod.1.gd <- groupedData(mod1.logit~time|
2007 Dec 27
2
groupedData function not found
Hello, I'm trying to use the groupedData function and R is giving me the message: Error: can not find function "groupedData" The code is coming from a textbook so I think it should be correct: pigs<-data.frame(cbind(pig.time,pig.id,pig.wt)) pig.growth<-groupedData(pig.wt~pig.time|pig.id,data=pigs) I have added the package "nlme" and to confirm that it was installed
2018 Mar 22
0
How do I include a factor in a groupedData object? Meaning and use of inner and outer parameters
Dear John You are only allowed to have the primary covariate on the left hand side of the vertical bar. Other covariates go in inner or outer. Michael On 22/03/2018 12:59, Sorkin, John wrote: > Windows 10 64-bit, R-Studio, R version 3.4.3 > > > Several questions relating to groupedData: > > (1) I am trying to create a groupedData object that can be used to run an analysis
2006 Dec 14
1
Reverse order of grouping factor in grouppedData
I created the following groupedData object (nlme library): gd <- groupedData(Conc ~ Time | Subj, order.groups=T, FUN = myf, data=mydata) The idea of the myf function is to reverse the order of the grouping factor Subj (or better, reorder from largest to smallest). In the mydata data set, Subj is an integer that gets converted into a factor in the groupedData object. Does anyone
2000 Jul 24
1
How to use groupedData() within a function?
Dear Group: I have been trying to write an R function within which the function groupedData() would be used. The following is a sample program: ####################### sid<-rep(1:6,times=2) time<-c(1:12) trt<-rep(letters[1:3],times=4) tem<-data.frame(sid,time,trt) test1.fun<- function(dat=dat) { groupedData(time ~ trt|sid, data=dat) } test1.fun(dat=tem)
2010 Apr 14
1
creating a new corClass for lme()
Hi, I have been using the function lme() of the package nlme to model grouped data that is auto-correlated in time and in space (the data was collected on different days via a moving monitor). I am aware that I can use the correlation classes corCAR1 and corExp (among other options) to model the temporal and spatial components of the auto-correlation. However, as far as I can tell, I can only
2006 Nov 17
3
Trellis Plot Labels
Hello everyone, I am ploting a groupeddata object with formula: formula(mydatausegroup) BF ~ HO | ID/Infar/Day Using this command: plot(na.omit(mydatausegroup), displayLevel=2,layout=c(10,2),aspect=2) This trellis plot does almost what I want and produces a 10x2 trellis plot, each panel is labeled as ID/Infar where infarct is either 1 or 0. And in each panel, it plots BF vs HO for each Day.