According to the source code of embed function, it will stop work if dimention is <1 or >n . Part of the embed source code is mention below for your reference. if ((dimension < 1) | (dimension > n)) stop ("wrong embedding dimension") I have also give the link of the source file of embed funciton "svn.r-project.org/R/trunk/src/library/stats/R/embed.R "
-- View this message in context: http://r.789695.n4.nabble.com/cryptic-error-message-Error-in-embed-y-lag-wrong-embedding-dimension-tp868230p4333224.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.