title: Augmented Dickey-Fuller Test/ Unit Root test on multiple time series dataframe in R
body: <p>I have a dataset/dataframe in which I have calculated the daily log returns of five thousand companies and these companies are as column as well. I want carry out ADF test on this dataframe. I have found how to estimate ADF test on vector but could not find how to calculate it on dataframe or matrix structure. Additionally how can I leave out the date column when estimating ADF test on the companies.</p>
  
  <pre><code>structure(list(Price.Date..1. = structure(c(10961, 10962, 10963, 
  10966, 10967, 10968, 10969, 10970, 10973, 10974, 10975, 10976, 
  10977, 10980, 10981, 10982, 10983, 10984, 10987, 10988, 10989, 
  10990, 10991, 10994, 10995, 10996, 10997, 10998, 11001, 11002, 
  11003, 11004, 11005, 11008, 11009, 11010, 11011, 11012, 11015, 
  11016, 11017, 11018, 11019, 11022, 11023, 11024, 11025, 11026, 
  11029, 11030, 11031, 11032, 11033, 11036, 11037, 11038, 11039, 
  11040, 11043, 11044, 11045, 11046, 11047, 11050, 11051, 11052, 
  11053, 11054, 11057, 11058, 11059, 11060, 11061, 11064, 11065, 
  11066, 11067, 11072, 11073, 11074, 11075, 11079, 11080, 11081, 
  11082, 11085, 11086, 11087, 11088, 11089, 11092, 11093, 11094, 
  11095, 11096, 11099, 11100, 11101, 11102, 11103), class = "Date"), 
      A.G.L.SJ.INVS...LON..DEAD...13.08.15...S. = c(0, 0, 0, 0, 
      0, 0, 0, 0, 0.172842812839411, 0.0105264129869873, -0.0105264129869873, 
      0.0312525435041042, 0, 0, 0, 0, 0, -0.0103093696588612, 0, 
      0.0505157901369016, 0.154854162093344, -0.0127390257774298, 
      0, 0, 0, 0, -0.0215991118034617, 0, -0.0310446216819606, 
      0, 0, 0, 0, 0.00896866998276025, -0.00896866998276025, 0.0695932917991957, 
      0.0491902441907719, 0, 0, 0, 0.0237165266173154, -0.0645385211375711, 
      0, 0.00829880281469553, -0.0208775850215552, -0.0475251418628453, 
      0, 0, -0.0406376457318265, -0.0233110788684474, -0.00947874395454384, 
      0, 0, 0, 0, 0, -0.0588405000229333, 0, 0, -0.0101523714640175, 
      0, 0, -0.119059360015989, -0.0115608224010764, -0.0537442760066904, 
      0, 0, 0, -0.0185763855729357, 0, 0, 0, -0.0125787822068597, 
      -0.0997504027670599, 0, 0, 0, 0, -0.0212022076506022, 0, 
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.0143887374520997, 
      -0.0597192347016229, 0, 0, -0.0553500950831642, 0), ABACUS.GROUP.DEAD...18.02.09...S. = c(-0.00772204609391025, 
      0.0153849188394792, 0, 0, 0, 0.0121397545506108, 0.00751318335078377, 
      0, 0.0467921615067581, 0.00427655676726069, 0.00284091100160389, 
      0, 0, 0, 0, 0, -0.00284091100160389, -0.00427655676726069, 
      0, 0, 0, 0, 0, -0.0974553361507127, -0.0126784582597708, 
      -0.00319489089651892, 0.0190180058357612, 0.0248074737042678, 
      0.0331355615960991, -0.00148257996022316, 0, -0.00744605078407812, 
      0, -0.00599701947237463, -0.00301205046999176, 0.00301205046999176, 
      0, 0.0527208463787359, 0, 0, 0.0554927382614965, 0.0147356986537535, 
      0, 0, -0.0255906220631887, -0.0109740470319766, 0.0204785313435405, 
      0.0266682470821618, 0.00655740054615883, 0, -0.013158084577511, 
      -0.0405460943943501, -0.00692044284457349, 0, -0.0210534091978323, 
      -0.00426439878645812, 0.136908873392753, 0.00371978110253224, 
      0, 0, -0.0012383902511468, -0.046933153422219, -0.00390371348047402, 
      -0.0065402456806094, -0.00922880643762181, -0.0200675630508096, 
      0.00269905696916517, 0.0147159846325131, 0.00265252144913131, 
      0.00264550418842369, 0, 0, -0.00662692948760846, -0.0504537812558326, 
      0.0138891121606672, 0.0204785313435405, 0, 0, 0, 0, 0, 0, 
      0.0067340321813445, 0.0133335308694651, 0.00264550418842369, 
      0.00658330224919812, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.054895721731917, 
      -0.00873367996875452, 0, -0.0012539186595939), ABB.R..IRS....S. = c(NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_), ABBEY.NATIONAL.DEAD...T.O.SEE.702853...S. = c(-0.0167894814765495, 
      0.00738010729762184, -0.0116218952059857, 0.00529942946649875, 
      -0.0632708260597079, -0.0204785313435405, -0.0197336641569503, 
      -0.0225261451329324, -0.0428724565924723, -0.0369704309185455, 
      -0.00913248356327223, -0.0442134971420201, 0.0468312996840989, 
      -0.0291797891087766, -0.00810815252842279, 0.052852458178311, 
      0.0291713773002797, -0.038221212820198, -0.0303253297149118, 
      -0.0382038274117704, 0.00554786443771782, 0.0123712918025465, 
      -0.0840351843165834, -0.00297619267304583, -0.0089820963158278, 
      -0.0151518050206025, 0.0433226819872985, -0.0433226819872985, 
      -0.032586281198026, 0.0202973400636752, 0.0289433760394884, 
      0.0681917498739066, 0.0180685944104999, -0.0166670524852117, 
      -0.0893058330631531, 0.00762780204888625, -0.0184054275427155, 
      -0.0203290816384261, 0.0187798946515967, 0.0974221130074682, 
      0, -0.0416427719597783, 0.00584796988242253, -0.0554449110217945, 
      -0.00773399059973645, 0.00155159069141853, 0.00618239990831793, 
      -0.0186630611319272, -0.0238295628329839, 0.0501672587180195, 
      0.0404549546923132, 0.104479070030021, -0.00663572441539895, 
      0.00464962644376943, -0.0120001440031103, 0.0649157135730478, 
      -0.0293388390059404, 0.0729977860835476, 0.00420294824644163, 
      0.0370521654605449, 0.00403342523190275, -0.0495092265431198, 
      -0.00302572091653719, 0.0386377927054138, 0.0902616769864686, 
      -0.0792438792460217, -0.0532985817243619, -0.0184167267862305, 
      -0.00621506040343434, 0.00435459475051392, -0.0302480527554971, 
      -0.0154741965825975, -0.0250013022054176, -0.0161185491020817, 
      -0.00747540008478342, 0.00544219030268511, 0.00135593241113607, 
      0.0559909153550144, -0.0122463663921577, -0.0471378335218366, 
      -0.00545331958131356, 0.0395361374015071, -0.0239373131439269, 
      0.0421669846355881, -0.034124045836128, 0.0347689990993745, 
      0.0279738520424058, -0.0157981168765913, 0.0424003660706616, 
      0.0121360712822254, 0.0244277859766919, 0.0375441148948044, 
      -0.0698435733672644, 0.00847462699097257, -0.0551393918480914, 
      0.0362766482201318, 0.0266682470821618, 0.0312065358208127, 
      0.0274459766087478, -0.000564174909181148), ABBEY.PROTECTION.DEAD...20.01.14...S. = c(NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_), ABBEYCREST.DEAD...10.10.14...S. = c(0, 
      0, 0.0326559629740526, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.01619468591998, 
      0, 0, 0, 0, 0, 0, 0, 0, -0.0164612770540726, 0, 0, 0, 0, 
      0, 0, 0, -0.00833338155914376, -0.00840341079637952, 0, -0.00847462699097257, 
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.00854706057845789, 
      -0.00862074304390781, 0, 0, 0.0340458414097178, -0.00840341079637952, 
      0, 0, -0.00847462699097257, -0.00854706057845789, 0, 0, -0.00862074304390781, 
      0, 0, 0, 0, 0, 0, 0, -0.0130720815673522, 0, 0, 0, -0.0221738574943222, 
      0, 0.00892863074430128, 0, 0, 0, -0.00892863074430128, 0, 
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.00892863074430128, 
      0, 0, 0, 0, 0, 0), ABBOT.GROUP.DEAD...07.03.08...S. = c(-0.00470589103741315, 
      0.0550597771830272, 0.0393924017106615, 0.02542509836581, 
      0.0124741742251757, 0, 0, -0.0208775850215552, 0, -0.00847462699097257, 
      -0.0302398851897179, -0.0221738574943222, 0, 0.0265502320941211, 
      -0.00877198607283702, -0.0088496152769828, -0.00892863074430128, 
      0, 0, 0, 0, -0.02267670867103, 0, 0, 0, 0, 0, -0.0138570346614264, 
      -0.0140517534556501, -0.0190481949706944, -0.00966191091173663, 
      -0.00975617494536518, -0.0198026272961789, -0.0943106794712421, 
      0.0163491380015302, 0, 0, 0, 0, 0, -0.0218587938124992, 0.0218587938124992, 
      0.0779615414697119, 0.00995033085316788, 0, -0.0200006667066699, 
      0, 0.010050335853502, 0.00995033085316788, 0.0530244683082204, 
      -0.038282186571017, 0, 0, 0, 0, -0.0147422817372034, 0, 0, 
      0, 0, 0, -0.00496278934212935, -0.00498754151103853, -0.0151136378100487, 
      0, -0.0153455696746603, -0.0208340869028421, 0, -0.0105821093305369, 
      0, 0.0262482260749364, -0.0104167608582557, 0, -0.037337670437644, 
      0.0215062052209634, 0.0210534091978323, 0, 0, 0, 0, 0.025708356710207, 
      0, 0.03980625040042, 0, 0, -0.0098040000966213, 0, -0.0557106070140057, 
      -0.0104712998672953, -0.0159154553058993, 0, 0.0315815720502988, 
      0, 0.0103093696588612, -0.00514139950041859, 0, 0, -0.0208340869028421, 
      0.0156661167443994, -0.0104167608582557), ABBOTT.LABS.GBP..LON..DEAD...DEAD...S. = c(NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_), ABERDEEN.ASSET.MAN..FULLY.PAID.23.09.05...S. = c(NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, 
      NA_real_, NA_real_, NA_real_)), .Names = c("Price.Date..1.", 
  "A.G.L.SJ.INVS...LON..DEAD...13.08.15...S.", "ABACUS.GROUP.DEAD...18.02.09...S.", 
  "ABB.R..IRS....S.", "ABBEY.NATIONAL.DEAD...T.O.SEE.702853...S.", 
  "ABBEY.PROTECTION.DEAD...20.01.14...S.", "ABBEYCREST.DEAD...10.10.14...S.", 
  "ABBOT.GROUP.DEAD...07.03.08...S.", "ABBOTT.LABS.GBP..LON..DEAD...DEAD...S.", 
  "ABERDEEN.ASSET.MAN..FULLY.PAID.23.09.05...S."), row.names = c("4", 
  "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", 
  "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", 
  "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", 
  "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", 
  "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", 
  "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", 
  "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "83", 
  "84", "85", "86", "88", "89", "90", "91", "92", "93", "94", "95", 
  "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", 
  "106"), class = "data.frame")
  </code></pre>