Displaying 3 results from an estimated 3 matches for "glsrun1".
Did you mean:
glsrun2
2005 Jan 18
4
Data Simulation in R
...x) reshape(x, idvar="Data[[i]]$V1",
varying=list(c(names(Data[[i]])[2:5]),c(names(Data[[i]])[6:9])),
v.names=c("score.1","score.2"), direction="long"))
#####################
#Clean up Workspace
rm(Data,vl.error)
gc()
#####################
# Step 4 Run GLS
glsrun1 <- lapply(long, function(x) gls(score.1~I(time-1), data=x,
correlation=corAR1(form=~1|V1), method='ML'))
# Extract intercepts and slopes
int1 <- sapply(glsrun1, function(x) x$coefficient[1])
slo1 <- sapply(glsrun1, function(x) x$coefficient[2])
################
#Clean up worksp...
2005 Jan 08
2
Does R accumulate memory
...[i,3]
}
#Step 3 Restructure for Longitudinal Analysis
long <- lapply(Data, function(x) reshape(x, idvar="Data[[i]]$V1",
varying=list(c(names(Data[[i]])[2:5]),c(names(Data[[i]])[6:9])),
v.names=c("score.1","score.2"), direction="long"))
# Step 4 Run GLS
glsrun1 <- lapply(long, function(x) gls(score.1~I(time-1), data=x,
correlation=corAR1(form=~1|V1), method='ML'))
glsrun2 <- lapply(long, function(x) gls(score.2~I(time-1), data=x,
correlation=corAR1(form=~1|V1), method='ML'))
# Step 5 Extract Intercepts and slopes
int1 <- lappl...
2005 Jan 20
1
Windows Front end-crash error
...X8 <- temp$X4 + vl.error[i,3]
long<-reshape(temp, idvar="ID",
varying=list(c("X1","X2","X3","X4"),c("X5","X6","X7","X8")),
v.names=c("score.1","score.2"),direction='long')
glsrun1 <- gls(score.1~I(time-1), data=long,
correlation=corAR1(form=~1|ID), method='ML')
glsrun2 <- gls(score.2~I(time-1), data=long,
correlation=corAR1(form=~1|ID), method='ML')
intercept1[[i]] <- glsrun1$coefficient[1]
slope1[[i]] <- glsrun1$coefficient[2]
intercept2[...