title: Why this bayesian structural time series analysis is showing only 10 years of predicted data?
body: <p>I used this data below (not original data) for bayesian structural time series analysis</p>
  <pre><code>df1=structure(list(Year = c(1985, 1986, 1987, 1988, 1989, 1990, 1991, 
  1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 
  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 
  2014, 2015, 2016, 2017, 2018, 2019), `MPs(ton)` = c(1, 2, 3, 
  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), 
      `MPs(items/kg)` = c(10, 9, 11, 11, 11.5, 12, 12.5, 13, 13.5, 
      14, 14.5, 15, 15.5, 16, 16.5, 17, 17.5, 18, 18.5, 19, 19.5, 
      20, 20.5, 21, 21.5, 22, 22.5, 23, 23.5, 24, 24.5, 25, 25.5, 
      26, 26.5), GDP = c(22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 
      42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 
      72, 74, 76, 78, 80, 82, 84, 86, 88, 90), MC = c(33, 35, 37, 
      39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 
      69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 
      99, 101), Population = c(3, 8, 13, 18, 23, 28, 33, 38, 43, 
      48, 53, 58, 63, 68, 73, 78, 83, 88, 93, 98, 103, 108, 113, 
      118, 123, 128, 133, 138, 143, 148, 153, 158, 163, 168, 173
      )), class = c(&quot;spec_tbl_df&quot;, &quot;tbl_df&quot;, &quot;tbl&quot;, &quot;data.frame&quot;
  ), row.names = c(NA, -35L), spec = structure(list(cols = list(
      Year = structure(list(), class = c(&quot;collector_double&quot;, &quot;collector&quot;
      )), `MPs(ton)` = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;)), `MPs(items/kg)` = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;)), GDP = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;)), MC = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;)), Population = structure(list(), class = c(&quot;collector_double&quot;, 
      &quot;collector&quot;))), default = structure(list(), class = c(&quot;collector_guess&quot;, 
  &quot;collector&quot;)), skip = 1L), class = &quot;col_spec&quot;))
  </code></pre>
  <p>Then I used this code below</p>
  <pre><code>library(readr)
  library(bsts)
  MPs &lt;- df1[,-1]
      names(MPs) &lt;- c(&quot;MPs (ton)&quot;, &quot;MPs (items/kg)&quot;, 
                      &quot;GDP&quot;, &quot;Mariculture&quot;, &quot;Population&quot;)
      MPs_train &lt;- MPs[1:25,]
      MPs_test &lt;- MPs[26:35,-1]
      
      nseasons = 11
      ss &lt;- list()
      ss &lt;- AddLocalLinearTrend(ss, y = MPs_train$`MPs (ton)`)
      ss &lt;- AddSeasonal(ss, MPs_train$`MPs (ton)`, nseasons = nseasons)
      rlls_model &lt;- bsts(`MPs (ton)`~., state.specification = ss,
                         data = MPs_train, niter = 1000, ping = 0,
                         expected.model.size = 1)
      plot(rlls_model, 'components',
           xlab = 'Year', ylab = 'MPs(ton)')
      plot(rlls_model, 'coefficients')
      
      rlls_model_pred &lt;- predict(rlls_model, newdata = MPs_test,
                                 horizon = 50)
      plot(rlls_model_pred, plot.original = 90,
           main = 'Seasonal local linear trend forcast with regression',
           xlab = 'Year',
           ylab = 'MPs (ton)')
  </code></pre>
  <p>after I check the predicted I have seen that only 10 years of predicted data is showing but in the  code I choose <code>horizon = 50</code> it should be 50 years of predicted data, even I changed <code>nseasons = 52</code> still it is showing 10 years of prediction.</p>