understanding I() in lmer formula

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

understanding I() in lmer formula

Don Cohen
 Is there a difference between I(x*y) and I(y*x) ?
I have a call to lmer that results in this complaint:
  Error in is.alpha2.subordinate * ~z.min.co.res :  
  non-numeric argument to binary operator
when I change this line:
  I(is.alpha2.subordinate*z.min.co.res)+
to this:
  I(z.min.co.res*is.alpha2.subordinate)+
the complaint goes away.
I'd like to understand why.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: understanding I() in lmer formula

Bert Gunter-2
If you don't get a prompt reply here, you might do better posting this
on the r-sig-mixed-models list (for obvious reasons).

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Jun 13, 2017 at 11:25 AM, Don Cohen <[hidden email]> wrote:

>  Is there a difference between I(x*y) and I(y*x) ?
> I have a call to lmer that results in this complaint:
>   Error in is.alpha2.subordinate * ~z.min.co.res :
>   non-numeric argument to binary operator
> when I change this line:
>   I(is.alpha2.subordinate*z.min.co.res)+
> to this:
>   I(z.min.co.res*is.alpha2.subordinate)+
> the complaint goes away.
> I'd like to understand why.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: understanding I() in lmer formula

S Ellison-2
In reply to this post by Don Cohen
>  Is there a difference between I(x*y) and I(y*x) ?
> I have a call to lmer that results in this complaint:
>   Error in is.alpha2.subordinate * ~z.min.co.res :

A reproducible example would help ...

In the absence of that, check the classes of the two variables in I() and, if you run the product on the command line, either inside I() or not, what's the class of the result?
If that is order-dependent for the object types you're combining, while I don't know why that might be it would go some way to explaining the outcome.

S Ellison



*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: understanding I() in lmer formula

Don Cohen
The suggestion to post on R-sig-ME was a good one.
The problem turned out to be a bug in lmer parsing, which is now fixed.

S Ellison writes:
 > >  Is there a difference between I(x*y) and I(y*x) ?
 > > I have a call to lmer that results in this complaint:
 > >   Error in is.alpha2.subordinate * ~z.min.co.res :
 >
 > A reproducible example would help ...

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...