Displaying 1 result from an estimated 1 matches for "numcases".
2011 Nov 28
1
detecting autocorrelation structure in panel data
Hello,
I'm a newby in R. I have created a data.frame holding panel data, with
the following columns: "id","time","y", say:
periods = 100
numcases = 100
df = data.frame(
id = rep(1:numcases,periods),
time = rep(1:periods, each = numcases)
)
df = transform(df,y=c(rnorm(numcases*periods)+id)
I want to check whether "y" is autocorrelated. I came across the acf()
function, but I cannot understand how to specify that my time variable...