So ARDL
package in R implements dynlm
which is an accepted input in stargazer
as per this question and answer.
However, I am unable to get stargazer table from ardl
or auto_ardl
. It throws the unrecognized object type error. Is there a way out of this?
Here's a reproducible example:
set.seed(10)
library(ARDL)
library(stargazer)
x=rnorm(100,mean = 5,sd=2)
y=rnorm(100,mean = 7,sd=3)
df=cbind(x,y)
model1=auto_ardl(y~x,data = df,max_order = 4)
class(model1)
[1] "list"
stargazer(model1)
% Error: Unrecognized object type.
class(model1$best_model)
[1] "dynlm" "lm" "ardl"
stargazer(model1$best_model)
% Error: Unrecognized object type.
I'm sorry I don't know how to do this in
stargazer
, but this model type is supported out-of-the box by the latest version of themodelsummary
package (disclaimer: I am the maintainer).