Re: [R] Struggling to compute marginal effects !

2018-03-19 Thread Willy Byamungu
Thank you very much Jim. On Mon, Mar 19, 2018, 7:20 PM Jim Lemon wrote: > In that case, I can't work out why the first model fails but not the > second. I would start looking at "Data" to see what it contains. if: > > object2 <- polr(Inc ~ Training ,Data,Hess = T,method = "logistic" ) > > works,

Re: [R] Struggling to compute marginal effects !

2018-03-19 Thread Jim Lemon
In that case, I can't work out why the first model fails but not the second. I would start looking at "Data" to see what it contains. if: object2 <- polr(Inc ~ Training ,Data,Hess = T,method = "logistic" ) works, the problem may be with the "Adopt" variable. Jim On Tue, Mar 20, 2018 at 10:55 A

Re: [R] Struggling to compute marginal effects !

2018-03-19 Thread Jim Lemon
Hi Willy, The error message may be due to passing an inappropriate environment. I don't have the "erer" package, but if that function has a default for the environment argument, perhaps passing just the "predvars" and "data" arguments will work. Jim On Tue, Mar 20, 2018 at 8:24 AM, Willy Byamungu

Re: [R] Struggling to compute marginal effects !

2018-03-19 Thread Bert Gunter
You are more likely to get a useful answer if you read **and follow** the posting guide linked below. In particular, show us the code that elicited the error. A small reproducible example would be even better, though may not be needed. Cheers, Bert Bert Gunter "The trouble with having an open

[R] Struggling to compute marginal effects !

2018-03-19 Thread Willy Byamungu
Dear Oscar, and any other R-project person, Can you please help me to figure out the meaning of the following error message in red ? Error in eval(predvars, data, env) : numeric 'envir' arg not of length one I computed ordered logit models using 'polr' in R (I just followed the guidance a hand