Displaying 20 results from an estimated 200 matches similar to: "beginner gls (nlme) question"
2006 Jan 18
2
Help with mixed effects models
Dear R-users
I have problems using lme
The model i want to fit can be viewed as a two-level bivariate model
Two-level bivariate: bivariate (S coded as -1,T coded as 1) endpoint within trial
OR
It can equivalently be considered as a three-level model.Three-level: endpoint within patient, patient within trial.
My code tries to model the levels through a RANDOM statement and a
2000 Mar 28
1
the function lme in package nlme
Dear people,
A somewhat clueless question follows:
I just discovered that the lme function in contrib package nlme for R,
while similar to the lme function in Splus, does not use the cluster
function option. This difference does not appear to be documented in the
V&R `R Complements' file.
I have data which is divided into 6 groups
The lme model is of the form (simplified from the actual
2007 Jun 01
2
how to specify starting values in varIdent() of lme()
I was reading the help but just did not get how to specify starting values for
varIdent() of the lme() function, although I managed to do it for corSymm().
Do I specify the values just as they are printed out in an output, like c(1,
1.3473, 1.0195). Or do I need to take the residual and multiply it with these
like c(0.2235, 0.2235*1.3473, 0.2235*1.0195)
or any other form that I dont know of?
2006 Mar 07
1
lme and gls : accessing values from correlation structure and variance functions
Dear R-users
I am relatively new to R, i hope my many novice questions are welcome.
I have problems accessing some objects (specifically the random effects, correlation structure and variance function) from an object of class gls and lme.
I used the following models:
yah <- gls (outcome~ -1 + as.factor(Trial):as.factor(endpoint)+
2003 Jun 19
2
Fitting particular repeated measures model with lme()
Hello,
I have a simulated data structure in which students are nested within
teachers, and with each student are associated two test scores. There
are 20 classrooms and 25 students per classroom, for a total of 500
students and two scores per student. Here are the first 10 lines of
my dataframe "d":
studid tchid Y time
1 1 1 -1.0833222 0
2 1 1
2006 Nov 20
1
My own correlation structure with nlme
Dear all,
I am trying to define my own corStruct which is different from the
classical one available in nlme. The structure of this correlation is
given below.
I am wondering to know how to continue with this structure by using
specific functions (corMatrix, getCovariate, Initialize,...) in order to
get a structure like corAR1, corSymm which will be working for my data.
Thanks in advance.
2005 Dec 02
1
covariance structures in lmer
Hi,
I usually use lme from the nlme library. Now I have read an article about
lmer in Rnews and lmer seemed to me more comfortable to use. Unfortunately,
I didn't find out how to use covariance structures (e. g. corSymm(),
corAR1()). Is there a way to use them similarly as in lme ? Is it
implemented ? If somebody knows, please let me know.
Thank you very much in advance,
Stephan
2006 Apr 20
1
A question about nlme
Hello,
I have used nlme to fit a model, the R syntax is like
fmla0<-as.formula(paste("~",paste(colnames(ldata[,9:13]),collapse="+"),"-1"))
> fmla1<-as.formula(paste("~",paste(colnames(ldata[,14:18]),collapse="+"),"-1"))
>
2003 Jul 22
2
animal models and lme
Hi,
You should look at Pinheiro and Bates (2000) Mixed-effects models in S and S-Plus. It describes how to format the correlation matrix to pass to functions lme and gls. Basically, the correlation matrix has to be one of the corStruct classes, probably corSymm for your example. So in the call to lme (or gls if you really have no random effects), use something like:
2005 Dec 30
2
unexpected "false convergence"
I've come into some code that produces different results under R 2.1.1 and R
2.2.1. I'm really unfamiliar with the libraries in question (MASS and nlme),
so I don't know if this is a bug in my code, or a regression in R. If it's a
bug on my end, I'd appreciate any advice on potential causes and relevant
documentation.
The code:
2006 Jun 06
1
spatial corStruct in lme
Hi,
I'm fitting a relatively simple growth model to some forest plot data. Two
species of trees were planted in different mixtures in 10 (nearly-adjacent)
plots and measured on four occasions over 10 years. The model is
constructed in terms of the diameter increments (per year; DI) in the 3
intervals, in which DI is modelled as a function of mid-interval D and DSQ.
The details of the
2006 May 30
1
Query: lme output
Dear R-Users
I have a problem accessing some values in the output from the summary of an lme fit.
I fit the model below:
ggg <- lme (ST~ -1 + as.factor(endp):Z.sas + as.factor(endp), data=dat4a,
random=~-1 + as.factor(endp) + as.factor(endp):Z.sas|as.factor(trials),
correlation = corSymm(form=~1|as.factor(trials)/as.factor(id)), weights=varIdent(form=~1|endp))
hh
2006 Jun 01
2
Help: lme
Good day R-Users,
I have a problem accessing some values in the output from the summary of an lme fit.
The structure of my data is as shown below (I have attached a copy of the full data).
id trials endp Z.sas ST
1 1 -1 -1 42.42884
1 1 1 -1 48.12007
2 1 -1 -1 43.42878
2 1 1 -1
2007 May 18
0
gls() error
Hi All
How can I fit a repeated measures analysis using gls? I want to start with a
unstructured correlation structure, as if the the measures at the occations are
not longitudinal (no AR) but plainly multivariate (corSymm).
My data (ignore the prox_pup and gender, occ means occasion):
> head(dta,12)
teacher occ prox_self prox_pup gender
1 1 0 0.76 0.41 1
2
2004 Oct 08
1
nlme vs gls
Dear List:
My question is more statistical than R oriented (although it originates
from my work with nlme). I know statistical questions are occasionally
posted, so I hope my question is relevant to the list as I cannot turn
up a solution anywhere else. I will frame it in the context of an R
related issue.
To illustrate the problem, consider student achievement test score data
with multiple
2011 Jan 27
4
HLM Model
Hi
I am trying to convert SAS codes to R, but some of the result are quite
different from SAS.
When I ran proc mixed, I have an option ddfm=bw followed by the model. How
can I show this method in R?(I am thinking that this maybe the reason that I
can't get the similar results)
below is my SAS codes:
proc mixed data=test covtest empirical;
class pair grade team school;
model score = trt
2004 Jan 22
0
problem fitting linear mixed models
Hello,
I'm fitting linear mixed models to gene-expression data from
microarrays, in a data set where 4608 genes are studied.
For a sample of 5 subjects and for each gene we observe the expression
level (Intensity) in four different tissues: N, Tp, Tx and M.
I want to test whether the expression level is different accross
tissues. Between-subject variability is modeled with a random
2006 Mar 17
1
nlme predict with se?
I am trying to make predictions with se's using a nlme (kew11.nlme
below). I get an error indicating levels for a factor are not allowed.
I have searched and read Rnews, MEMSS, MASS, R-Help, and other lists
in Spanish where I found questions similar to mine but not solution.
I do not really care about the method used. Any suggestions to obtain
predictions with se's from an nlme
2006 Mar 03
1
Help with lme and correlated residuals
Dear R - Users
I have some problems fitting a linear mixed effects model using the lme function (nlme library). A sample data is as shown at the bottom of this mail. I fit my linear mixed model
using the following R code:
bmr <-lme (outcome~ -1 + as.factor(endpoint)+ as.factor(endpoint):trt, data=datt,
random=~-1 + as.factor(endpoint) + as.factor(endpoint):trt|as.factor(Trial),
2004 Jul 23
0
problem lme using corSymm()
Hi,
I got a computational problem with lme (nlme library R 1.9.1) using
corSymm(). Here is the data:
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 0.19639793 0.09127954 0.11733288 0.07598273 0.06545106 0.06211532
[2,] 0.22773467 0.10981912 0.16052847 0.38101187 0.18353474 0.24072918
[3,] 0.46743388 0.45733836 0.32191178 0.43356107 0.39159746 0.53984221
[4,]