<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi R users:</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;">I am applying the package plm to attached high-frequency financial data for panel data analysis. Listed below is my coding and error message:</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><div class="MsoNormal"><span lang="EN-US">rm(list=ls())</span></div>

<div class="MsoNormal"><span lang="EN-US">library("plm")</span></div>

<div class="MsoNormal"><span lang="EN-US"><span style="background-color: transparent;">toydata</span> <-
read.csv("D:/............./toydata.csv",header=TRUE,sep =
",");</span></div>

<div class="MsoNormal"><span lang="EN-US">summary(toydata)</span></div>

<div class="MsoNormal"><span lang="EN-US"># toydata <-
pdata.frame(toydata, index = c("SECCODE",
"TDATE"), drop.index = TRUE, row.names = TRUE)</span></div>

<div class="MsoNormal"><span lang="EN-US"> </span></div>

<div class="MsoNormal"><span lang="EN-US"># estimation of the error components</span></div>

<div class="MsoNormal"><span lang="EN-US"><span style="background-color: transparent;">toydata.out</span> <-
plm(data=toydata, RETURN ~ IOB + IOBS, random.method="walhus",
effect="twoways", model='random')</span></div>

<div class="MsoNormal"><span lang="EN-US"><br></span></div><div class="MsoNormal" style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span lang="EN-US">ERROR MESSAGE:</span></div>

<div class="MsoNormal"><span lang="EN-US" style="font-family: 'Lucida Console'; background-color: rgb(225, 226, 229); background-position: initial initial; background-repeat: initial initial;">duplicate couples (time-id)<o:p></o:p></span></div>

<div class="MsoNormal"><span lang="EN-US" style="font-family: 'Lucida Console';">error in pdim.default(index[[1]], index[[2]]) : <span style="background:#E1E2E5"><o:p></o:p></span></span></div>

<div class="MsoNormal"><span lang="EN-US"> </span></div>

<div class="MsoNormal"><span lang="EN-US">Please help and advise what I should do to
fix this problem about index. Do I need to pre-process the data or else? </span></div><div class="MsoNormal" style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span lang="EN-US"><br></span></div><div class="MsoNormal" style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span lang="EN-US">Thanks for your kind attention.</span></div><div class="MsoNormal" style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span lang="EN-US"><br></span></div><div class="MsoNormal" style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><span
 lang="EN-US">Wei-han</span></div></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><div class="MsoNormal"><br></div></div></div></body></html>