source("epil-data.R")
ls()
Age
Base
N
T
Trt
V4
Visit
y
ls()
colnames(y) <- c("Y1","Y2","Y3","Y4")
as.data.frame(y)
as.data.frame(y)->mydata
mydata
reshape(mydata,"long")
args(reshape)
reshape(mydata,direction="long")
mydata
mydata$id <- 1:59
reshape(mydata,direction="long")
names(mydata)
reshape(mydata,direction="long",id="id")
args(reshape)
reshape(mydata,direction="long",idvar="id")
?reshape
mydata$id <- NULL
reshape(mydata,direction="long",times=1:4)
reshape(mydata,direction="long", idvar="id",times=1:4)
reshape(mydata, varying=c("y1","y2","y3","y4"))
reshape(mydata, varying=c("y1","y2","y3","y4"), direction="wide")
reshape(mydata, varying=list("y1","y2","y3","y4"), direction="wide")
?reshape
reshape(mydata, varying=list(y1,y2,y3,y4), direction="wide")
?reshape
reshape(wide, direction="long")
reshape(mydata, varying=list(y1,y2,y3,y4), direction="wide")->wide
ls()
?reshape
reshape(mydata, varying=list(c("y1","y2","y3","y4"), direction="wide", v.names="y")
)
reshape(mydata, varying=list(c("y1","y2","y3","y4"), direction="wide", v.names="y", direction="long")
)
reshape(mydata, varying=list(c("y1","y2","y3","y4")), direction="long")
reshape(mydata, varying=as.list(c("y1","y2","y3","y4")), direction="long")
reshape(mydata, varying=as.list(c("y1","y2","y3","y4")), direction="long", v.names="y")
reshape(mydata, varying=list(c("y1","y2","y3","y4")), direction="long")
names(mydata)
reshape(mydata, varying=list(c("Y1","Y2","Y3","Y4")), direction="long")
reshape(mydata, varying=list(c("Y1","Y2","Y3","Y4")), direction="long",v.names="y")
ls()
read.epil<-function()NULL
fix(read.epil)
reed.epil()
read.epil()
fix(read.epil)
read.epil()
fix(read.epil)
read.epil()
fix(read.epil)
read.epil()
fix(read.epil)
read.epil()
fix(read.epil)
read.epil()
fix(read.epil)
read.epil()
fix(read.epil)
read.epil()
read.epil()->mydata
names(mydata)
library(gee)
gee(y ~ log(Base/4) + Age, id=id, data=mydata, family=poisson)
gee(y ~ log(Base/4) + Age, id=id, data=mydata, family=poisson, corstr="exchangeable")
args(gee)
nrow(mydata)
names(mydata)
mydata[1:10,]
y$id
mydata$id
?sort
?order
order(mydata)
?reshape
?stack
order(mydata$id)
mydata[order(mydata$id),]
fix(read.epil)
read.epil()->mydata
fix(read.epil)
mydata
mydata$id
class(mydata$id)
fix(read.epil)
mydata2 <- read.epil()
names(mydata2)
mydata2$id
class(mydata2$id)
fix(read.epil)
mydata[order(mydata$id),]
fix(read.epil)
read.epil()
fix(read.epil)
read.epil()
read.epil()->mydata
gee(y ~ log(Base/4) + Age, id=id, data=mydata, family=poisson, corstr="exchangeable")
gee(y ~ log(Base/4) + Age, id=id, data=mydata, family=poisson, corstr="autoregressive")
args(gee)
?gee
gee(y ~ log(Base/4) + Age, id=id, data=mydata, family=poisson, corstr="AR-1")
gee(y ~ log(Base/4) + Age, id=id, data=mydata, family=poisson, corstr="AR-M")
gee(y ~ log(Base/4) + Age, id=id, data=mydata, family=poisson, corstr="AR-M",M=2)
gee(y ~ log(Base/4) + Age, id=id, data=mydata, family=poisson, corstr="exchangeable")
gee(y ~ log(Base/4)*Trt + Age, id=id, data=mydata, family=poisson, corstr="exchangeable")
gee(y ~ log(Base/4)*Trt + Age + (time==4), id=id, data=mydata, family=poisson, corstr="exchangeable")
library(MASS)
version
q()
