REndo on RStudio

Hello,

I am trying to run REndo but I get this error

Error: unexpected symbol in:
"m4.cc <- copulaCorrection(LEXP ~ MACHF + MODa | continuous(MACHF), data = df, optimx.args = list(method=c("Nelder-Mead"),itmax= 60000, num.boots= 10000, verbose = FALSE)
fit2"

can anyone help, please?

This error usually means there is some sort of typo.
However, I don't think the the information above is enough to diagnose the problem.

At a bare minimum, I don't think arguments like num.boots belong in the optimx.args list. At least that's not how the documentation examples for copulaCorrection are run.

If you're able to repose this question with a reprex that replicates the error, it'd be much easier for folks to help out.

On errors related to messages like "unexpected X in:", I really like the community wiki answer to a related discussion here:

The code as shared has 4 opening brackets, but only 3 closing brackets.
probably you need a bracket close between FALSE) and fit2

1 Like

Thank you for your help

Hello all,

I am trying to correct for endogeneity using Gaussian Copula. The model has 1 continuous endogenous regressor (i.e., MACHF) , one dependent variable (i.e., LEXP), and one control variable (i.e., COLLHIST). I first ran a MULTIPLE REGRESSION . The model runs well and there is no error. Following this step, I am trying to correct for endogeneity using Gaussian Copula in REndo using RStudio. I followed the steps suggested by Raluca Gui , but I get the below errors

cc <- copulaCorrection(LEXP ~ MACHF + COLLHIST + P.Star.MACHF | continuous(MACHF), data= df, optimx.args = list(method=c("Nelder-Mead"),itmax = 60000), num.boots= 10000, verbose = TRUE)
Please provide a data object that contains all the formula's variables.
Error: The above errors were encountered!

Am I missing a step? Do I need to generate the copula, based on the error message "Please provide a data object that contains all the formula's variables". If this is the case, how can I do that?

Please help!

Please provide a data object that contains all the formula's variables.

Again, a reprex would be helpful with minimal data, because we are now left to guess based on the error message.

The error message seems self explanatory? The formula, LEXP ~ MACHF + COLLHIST + P.Star.MACHF | continuous(MACHF), refers to one or more regressors that are not in your data, df.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.