最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

R: SCTools package is not accepting the matrix from a synth package - Stack Overflow

programmeradmin2浏览0评论

I have successfully run a synth model for synthetic controls, using dataprep_out and synth_out. The dataprep_out object was generated using the dataprep function. I then am trying to generate a placebos plot using SCtools. However, I am getting the following error message.

Error in (function (.x, .f, ..., .progress = FALSE) : ℹ In index: 1. Caused by error in Synth::synth(): ! X0 is not a matrix object

My dataprep_out is a list, and the X0 is a 1x27 double.

I've tried converting the dataprep_out to various kinds of objects, but none of them have fixed the problem. The dataprep has a foo, predictors (the variable of interest), the dependent variable (the same as the predictor), and numeric unit and time variables, with a name column for the unit variables. I have a single treatment, and a bunch of controls. The time.predictors.prior and the time.optimize.ssr are the same. This is happening no matter which of a variety of treatments I use, all in the same dataframe.

发布评论

评论列表(0)

  1. 暂无评论