similar to: Help with mixed effects models

Displaying 20 results from an estimated 6000 matches similar to: "Help with mixed effects models"

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)+
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),
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
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 May 16
2
query: lme
Dear R Users I have difficulties accessing the variance components for an lme fit when the variance covariance matrix of the random effects is not positive definite. Can anyone inform me on how to get by this ? Thanks in advance Pryseley --------------------------------- [[alternative HTML version deleted]]
2006 Mar 02
0
Help with lme code
Dear R - Users I have some problems fitting a linear mixed effects model using the lme function (from the library nlme). 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) +
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?
2003 Jul 03
1
beginner gls (nlme) question
Hi all, I am trying to get a handle on gls (package nlme). I have a toy problem: 3 fixed factors (A, B, C), two levels each, 5 replicates per treatment. The response variable is continuous, normal. I have a correlation matrix of the form: > mat A B C A 1.00 0.75 0 B 0.75 1.00 0 C 0.00 0.00 1 which is common to all observations. How do I construct the call to gls? I think I need to
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
2007 Nov 04
1
Help in error of mixed models
Hi R-masters I read the article: Bivariate analysis of sensitivity and specificity produces informative summary measures in diagnostic reviews. In this paper i proposed a bivariate mixed model and use SAS proc mixed to adjust the estimates. I thinks use R to make the same and try with this code: base<-read.csv("base.csv") adj<-.5 attach(base) sens<-(VP+adj)/(VP+FN+2*adj)
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 28
3
lme convergence
Dear R-Users, Is it possible to get the covariance matrix from an lme model that did not converge ? I am doing a simulation which entails fitting linear mixed models, using a "for loop". Within each loop, i generate a new data set and analyze it using a mixed model. The loop stops When the "lme function" does not converge for a simulated dataset. I want to
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 Mar 07
1
Three level linear mixed models
Hello R-users Is it possible to fit a three level linear mixed effect model in R? If anyone has an idea or sample code, i will appreciate it very much if i can receive it. I am reading the book by Pinheiro and Bates but have not come across that yet! Kind regards Pryseley --------------------------------- [[alternative HTML version deleted]]
2005 Apr 19
2
pl/R and MacOS X using R binary
I'm sorry if this is too off-topic--feel free to ignore. I am interested in using pl/R, an amazing "plugin" for the postgresql database. As is typical of these types of applications, pl/R needs to link against a shared library. However, it appears that the MacOS R binary does not build a static (.so) shared library. Is there an accepted, general way (read, a way that works)
2005 Apr 19
2
pl/R and MacOS X using R binary
I'm sorry if this is too off-topic--feel free to ignore. I am interested in using pl/R, an amazing "plugin" for the postgresql database. As is typical of these types of applications, pl/R needs to link against a shared library. However, it appears that the MacOS R binary does not build a static (.so) shared library. Is there an accepted, general way (read, a way that works)
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
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")) >
2006 Mar 15
1
Log Cholesky parametrization in lme
Dear R-Users I used the nlme library to fit a linear mixed model (lme). The random effect standard errors and correlation reported are based on a Log-Cholesky parametrization. Can anyone tell me how to get the Covariance matrix of the random effects, given the above mentioned parameters based on the Log-Cholesky parametrization?? Thanks in advance Pryseley