Instrumental variables
Posted: Wed May 25, 2022 5:09 pm
Hi! I would like to try to build a module about instrumental variables, but first I must learn well how to create a multiple linear regression to implement it in Jamovi. Could you give me some help about how to create it?
formula <- paste(self$options$dep, '~', self$options$covs)
formula <- as.formula(formula)
results <- lm(formula, data = self$data)
self$results$text$setContent(results)
With these lines of code I was able to build a simple linear regression, but I don't know how to do it for a multiple one. Thank you very much in advance.
formula <- paste(self$options$dep, '~', self$options$covs)
formula <- as.formula(formula)
results <- lm(formula, data = self$data)
self$results$text$setContent(results)
With these lines of code I was able to build a simple linear regression, but I don't know how to do it for a multiple one. Thank you very much in advance.