Error Code in Weighted Chi Squared

I am getting an error when trying to use the chi-squared function. I keep getting this error code with the function

wtd.chi.sq(x = gss$workstatus, y = gss$abpoor, weight = abortionincomework)
Error in wtd.chi.sq(x = gss$workstatus, y = gss$abpoor, weight = abortionincomework) :
unused arguments (x = gss$workstatus, y = gss$abpoor)

Hi @Bryreed, welcome to RStudio Community.

Please go through the documentation for the wtd.chi.sq() function; it doesn't have any parameters named x and y. Instead the first two parameters are var1 and var2.

Maybe you could try modifying the names of the function parameters and see if that works?

1 Like

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