Re: [R] Mac/PC differences in lmer results

2019-06-05 Thread John via R-help
On Wed, 29 May 2019 18:44:26 +0200
Nicolas Schuck  wrote:

> Dear fellow R coders, 
> 
> I am observing differences in results obtained using glmer when using
> a Mac or Linux computer versus a PC 

Just as an aside and point of information, both the Mac and the Linux
systems are PCs, just as much so as one running Windows.  The
designation "PC" refers to hardware.  Your question demands the extra
steps of thinking about what other operating system might be in use.
There are others though I doubt R is implemented on any of them.

JWDougherty

__
R-help@r-project.org 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.


Re: [R] Mac/PC differences in lmer results

2019-06-05 Thread Alexandra Thorn
To check whether the data are being read in appropriately, what happens
when you plot the distribution of each of the independent variables on
the respective systems?

-A

On Wed, 5 Jun 2019 12:32:28 +0200
Olivier Crouzet  wrote:

> Hi,
> 
> 32bit vs. 64bit systems? 
> 
> Another thing I would look at would be how the windows machine will
> read the data file. Though issues should probably only arise with
> respect to text data, I've often experienced problems with reading
> unicode csv files on windows computers compared with unix-based
> computers. No guarantee though, just suggestions...
> 
> Olivier.
> 
> On Wed, 5 Jun 2019 12:15:53 +0200
> Nicolas Schuck  wrote:
> 
> > bert: you are right, sorry for not cc-ing the list. thanks also for
> > the hint. 
> > 
> > I wanted to bring this up here again, emphasising that we do find in
> > at least one case *a very large difference* in the p value, using
> > the same scripts and data on a windows versus mac machine (see
> > reproducible example in the gitlab link posted below). I have now
> > come across several instances in which results of (g)lmer models
> > don’t agree on windows vs unix-based machines, which I find a bit
> > disturbing. any ideas where non-negligible differences could come
> > from? 
> > 
> > thanks, 
> > nico 
> > 
> >   
> > > On 30. May 2019, at 16:58, Bert Gunter 
> > > wrote:
> > > 
> > > 
> > > Unless there us good reason not to, always cc the list. I have
> > > done so here.
> > > 
> > > The R Installation manual has some info on how to use different
> > > BLASes I believe, but someone with expertise (I have none) needs
> > > to respond to your queries.
> > > 
> > > On Thu, May 30, 2019 at 7:50 AM Nicolas Schuck
> > > mailto:nico.sch...@gmail.com>> wrote: I
> > > know that it is in use on the Mac, see sessionInfo below. I have
> > > to check on the Win system. Why would that make such a difference
> > > and how could I make the Win get the same results as the Unix
> > > Systems? 
> > > 
> > > R version 3.6.0 (2019-04-26) 
> > > Platform: x86_64-apple-darwin15.6.0 (64-bit) 
> > > Running under: macOS Mojave 10.14.5 
> > > Matrix products: default 
> > > BLAS:  
> > > /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
> > >  
> > > LAPACK: 
> > > /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
> > >  
> > > Random number generation: 
> > > RNG:  Mersenne-Twister 
> > > Normal:  Inversion Sample:  Rounding 
> > > locale: [1]
> > > en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> > > attached base packages: [1] stats  graphics  grDevices utils
> > > datasets  methods  base Thanks, Nico On 30. May 2019, at 16:34,
> > > Bert Gunter  > > > wrote:
> > >   
> > >> The BLAS in use on each?
> > >> 
> > >> 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 Thu, May 30, 2019 at 5:27 AM Nicolas Schuck
> > >> mailto:nico.sch...@gmail.com>> wrote:
> > >> Dear fellow R coders, 
> > >> 
> > >> I am observing differences in results obtained using glmer when
> > >> using a Mac or Linux computer versus a PC. Specifically, I am
> > >> talking about a relatively complex glmer model with a nested
> > >> random effects structure. The model is set up in the following
> > >> way: gcctrl = glmerControl(optimizer=c('nloptwrap'), optCtrl =
> > >> list (maxfun = 50), calc.derivs = FALSE)
> > >> 
> > >> glmer_pre_instr1 = glmer(
> > >>   formula = cbind(FREQ, NSAMP-FREQ) ~ FDIST_minz + poly
> > >> (RFREQ,2) + ROI + (1 + FDIST_minz + RFREQ + ROI|ID/COL), data =
> > >> cdf_pre_instr, family = binomial, 
> > >>   control = gcctrl)
> > >> 
> > >> Code and data of an example for which I find reproducible,
> > >> non-negligible differences between Mac/Win can be found here:
> > >> https://gitlab.com/nschuck/glmer_sandbox/tree/master
> > >> 
> > >>  > >> > The
> > >> differences between the fitted models seem to be most pronounced
> > >> regarding the estimated correlation structure of the random
> > >> effects terms. Mac and Linux yield very similar results, but
> > >> Windows deviates quite a bit in some cases. This has a large
> > >> impact on p values obtained when performing model comparisons. I
> > >> have tried this on Mac OS 10.14, Windows 10 and Ubuntu and
> > >> Debian. All systems I have tried are using lme 1.1.21 and R
> > >> 3.5+. 
> > >> 
> > >> Does anyone have an idea what the underlying cause might be? 
> > >> 
> > >> Thanks, 
> > >> Nico 
> > >> 
> > >> 
> > >> 
> > >> 
> > >> [[alternative HTML version deleted]]
> > >> 
> > >> __
> > >> 

Re: [R] Mac/PC differences in lmer results

2019-06-05 Thread Olivier Crouzet
Hi,

32bit vs. 64bit systems? 

Another thing I would look at would be how the windows machine will
read the data file. Though issues should probably only arise with
respect to text data, I've often experienced problems with reading
unicode csv files on windows computers compared with unix-based
computers. No guarantee though, just suggestions...

Olivier.

On Wed, 5 Jun 2019 12:15:53 +0200
Nicolas Schuck  wrote:

> bert: you are right, sorry for not cc-ing the list. thanks also for
> the hint. 
> 
> I wanted to bring this up here again, emphasising that we do find in
> at least one case *a very large difference* in the p value, using the
> same scripts and data on a windows versus mac machine (see
> reproducible example in the gitlab link posted below). I have now
> come across several instances in which results of (g)lmer models
> don’t agree on windows vs unix-based machines, which I find a bit
> disturbing. any ideas where non-negligible differences could come
> from? 
> 
> thanks, 
> nico 
> 
> 
> > On 30. May 2019, at 16:58, Bert Gunter 
> > wrote:
> > 
> > 
> > Unless there us good reason not to, always cc the list. I have done
> > so here.
> > 
> > The R Installation manual has some info on how to use different
> > BLASes I believe, but someone with expertise (I have none) needs to
> > respond to your queries.
> > 
> > On Thu, May 30, 2019 at 7:50 AM Nicolas Schuck
> > mailto:nico.sch...@gmail.com>> wrote: I
> > know that it is in use on the Mac, see sessionInfo below. I have to
> > check on the Win system. Why would that make such a difference and
> > how could I make the Win get the same results as the Unix Systems? 
> > 
> > R version 3.6.0 (2019-04-26) 
> > Platform: x86_64-apple-darwin15.6.0 (64-bit) 
> > Running under: macOS Mojave 10.14.5 
> > Matrix products: default 
> > BLAS:  
> > /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib 
> > LAPACK: 
> > /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib 
> > Random number generation: 
> > RNG:  Mersenne-Twister 
> > Normal:  Inversion Sample:  Rounding 
> > locale: [1]
> > en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> > attached base packages: [1] stats  graphics  grDevices utils
> > datasets  methods  base Thanks, Nico On 30. May 2019, at 16:34,
> > Bert Gunter  > > wrote:
> > 
> >> The BLAS in use on each?
> >> 
> >> 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 Thu, May 30, 2019 at 5:27 AM Nicolas Schuck
> >> mailto:nico.sch...@gmail.com>> wrote: Dear
> >> fellow R coders, 
> >> 
> >> I am observing differences in results obtained using glmer when
> >> using a Mac or Linux computer versus a PC. Specifically, I am
> >> talking about a relatively complex glmer model with a nested
> >> random effects structure. The model is set up in the following
> >> way: gcctrl = glmerControl(optimizer=c('nloptwrap'), optCtrl = list
> >> (maxfun = 50), calc.derivs = FALSE)
> >> 
> >> glmer_pre_instr1 = glmer(
> >>   formula = cbind(FREQ, NSAMP-FREQ) ~ FDIST_minz + poly
> >> (RFREQ,2) + ROI + (1 + FDIST_minz + RFREQ + ROI|ID/COL), data =
> >> cdf_pre_instr, family = binomial, 
> >>   control = gcctrl)
> >> 
> >> Code and data of an example for which I find reproducible,
> >> non-negligible differences between Mac/Win can be found here:
> >> https://gitlab.com/nschuck/glmer_sandbox/tree/master
> >> 
> >>  >> > The
> >> differences between the fitted models seem to be most pronounced
> >> regarding the estimated correlation structure of the random
> >> effects terms. Mac and Linux yield very similar results, but
> >> Windows deviates quite a bit in some cases. This has a large
> >> impact on p values obtained when performing model comparisons. I
> >> have tried this on Mac OS 10.14, Windows 10 and Ubuntu and Debian.
> >> All systems I have tried are using lme 1.1.21 and R 3.5+. 
> >> 
> >> Does anyone have an idea what the underlying cause might be? 
> >> 
> >> Thanks, 
> >> Nico 
> >> 
> >> 
> >> 
> >> 
> >> [[alternative HTML version deleted]]
> >> 
> >> __
> >> R-help@r-project.org  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.
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> 

Re: [R] Mac/PC differences in lmer results

2019-06-05 Thread Nicolas Schuck
bert: you are right, sorry for not cc-ing the list. thanks also for the hint. 

I wanted to bring this up here again, emphasising that we do find in at least 
one case *a very large difference* in the p value, using the same scripts and 
data on a windows versus mac machine (see reproducible example in the gitlab 
link posted below). I have now come across several instances in which results 
of (g)lmer models don’t agree on windows vs unix-based machines, which I find a 
bit disturbing. any ideas where non-negligible differences could come from? 

thanks, 
nico 


> On 30. May 2019, at 16:58, Bert Gunter  wrote:
> 
> 
> Unless there us good reason not to, always cc the list. I have done so here.
> 
> The R Installation manual has some info on how to use different BLASes I 
> believe, but someone with expertise (I have none) needs to respond to your 
> queries.
> 
> On Thu, May 30, 2019 at 7:50 AM Nicolas Schuck  > wrote:
> I know that it is in use on the Mac, see sessionInfo below. I have to check 
> on the Win system. Why would that make such a difference and how could I make 
> the Win get the same results as the Unix Systems? 
> 
> R version 3.6.0 (2019-04-26) 
> Platform: x86_64-apple-darwin15.6.0 (64-bit) 
> Running under: macOS Mojave 10.14.5 
> Matrix products: default 
> BLAS:  
> /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib 
> LAPACK: 
> /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib 
> Random number generation: 
> RNG:  Mersenne-Twister 
> Normal:  Inversion Sample:  Rounding 
> locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 
> attached base packages: [1] stats  graphics  grDevices utils  datasets  
> methods  base 
> Thanks, Nico 
> On 30. May 2019, at 16:34, Bert Gunter  > wrote:
> 
>> The BLAS in use on each?
>> 
>> 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 Thu, May 30, 2019 at 5:27 AM Nicolas Schuck > > wrote:
>> Dear fellow R coders, 
>> 
>> I am observing differences in results obtained using glmer when using a Mac 
>> or Linux computer versus a PC. Specifically, I am talking about a relatively 
>> complex glmer model with a nested random effects structure. The model is set 
>> up in the following way: 
>> gcctrl = glmerControl(optimizer=c('nloptwrap'), optCtrl = list(maxfun = 
>> 50), calc.derivs = FALSE)
>> 
>> glmer_pre_instr1 = glmer(
>>   formula = cbind(FREQ, NSAMP-FREQ) ~ FDIST_minz + poly(RFREQ,2) + ROI + 
>> (1 + FDIST_minz + RFREQ + ROI|ID/COL), 
>>   data = cdf_pre_instr, 
>>   family = binomial, 
>>   control = gcctrl)
>> 
>> Code and data of an example for which I find reproducible, non-negligible 
>> differences between Mac/Win can be found here: 
>> https://gitlab.com/nschuck/glmer_sandbox/tree/master 
>>  
>> > >
>> The differences between the fitted models seem to be most pronounced 
>> regarding the estimated correlation structure of the random effects terms. 
>> Mac and Linux yield very similar results, but Windows deviates quite a bit 
>> in some cases. This has a large impact on p values obtained when performing 
>> model comparisons. I have tried this on Mac OS 10.14, Windows 10 and Ubuntu 
>> and Debian. All systems I have tried are using lme 1.1.21 and R 3.5+. 
>> 
>> Does anyone have an idea what the underlying cause might be? 
>> 
>> Thanks, 
>> Nico 
>> 
>> 
>> 
>> 
>> [[alternative HTML version deleted]]
>> 
>> __
>> R-help@r-project.org  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.


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] Mac/PC differences in lmer results

2019-05-30 Thread Bert Gunter
Unless there us good reason not to, always cc the list. I have done so here.

The R Installation manual has some info on how to use different BLASes I
believe, but someone with expertise (I have none) needs to respond to your
queries.

On Thu, May 30, 2019 at 7:50 AM Nicolas Schuck 
wrote:

> I know that it is in use on the Mac, see sessionInfo below. I have to
> check on the Win system. Why would that make such a difference and how
> could I make the Win get the same results as the Unix Systems?
>
> R version 3.6.0 (2019-04-26)
>
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>
> Running under: macOS Mojave 10.14.5
>
> Matrix products: default
>
> BLAS:   
> /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
>
> LAPACK: 
> /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
>
> Random number generation:
>
>  RNG: Mersenne-Twister
>
>  Normal:  Inversion Sample:  Rounding
>
> locale:[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:[1] stats graphics  grDevices utils datasets  
> methods   base
>
> Thanks, Nico
>
> On 30. May 2019, at 16:34, Bert Gunter  wrote:
>
> The BLAS in use on each?
>
> 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 Thu, May 30, 2019 at 5:27 AM Nicolas Schuck 
> wrote:
>
>> Dear fellow R coders,
>>
>> I am observing differences in results obtained using glmer when using a
>> Mac or Linux computer versus a PC. Specifically, I am talking about a
>> relatively complex glmer model with a nested random effects structure. The
>> model is set up in the following way:
>> gcctrl = glmerControl(optimizer=c('nloptwrap'), optCtrl = list(maxfun =
>> 50), calc.derivs = FALSE)
>>
>> glmer_pre_instr1 = glmer(
>>   formula = cbind(FREQ, NSAMP-FREQ) ~ FDIST_minz + poly(RFREQ,2) +
>> ROI + (1 + FDIST_minz + RFREQ + ROI|ID/COL),
>>   data = cdf_pre_instr,
>>   family = binomial,
>>   control = gcctrl)
>>
>> Code and data of an example for which I find reproducible, non-negligible
>> differences between Mac/Win can be found here:
>> https://gitlab.com/nschuck/glmer_sandbox/tree/master <
>> https://gitlab.com/nschuck/glmer_sandbox/tree/master>
>> The differences between the fitted models seem to be most pronounced
>> regarding the estimated correlation structure of the random effects terms.
>> Mac and Linux yield very similar results, but Windows deviates quite a bit
>> in some cases. This has a large impact on p values obtained when performing
>> model comparisons. I have tried this on Mac OS 10.14, Windows 10 and Ubuntu
>> and Debian. All systems I have tried are using lme 1.1.21 and R 3.5+.
>>
>> Does anyone have an idea what the underlying cause might be?
>>
>> Thanks,
>> Nico
>>
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org 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.
>>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] Mac/PC differences in lmer results

2019-05-30 Thread Bert Gunter
The BLAS in use on each?

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 Thu, May 30, 2019 at 5:27 AM Nicolas Schuck 
wrote:

> Dear fellow R coders,
>
> I am observing differences in results obtained using glmer when using a
> Mac or Linux computer versus a PC. Specifically, I am talking about a
> relatively complex glmer model with a nested random effects structure. The
> model is set up in the following way:
> gcctrl = glmerControl(optimizer=c('nloptwrap'), optCtrl = list(maxfun =
> 50), calc.derivs = FALSE)
>
> glmer_pre_instr1 = glmer(
>   formula = cbind(FREQ, NSAMP-FREQ) ~ FDIST_minz + poly(RFREQ,2) + ROI
> + (1 + FDIST_minz + RFREQ + ROI|ID/COL),
>   data = cdf_pre_instr,
>   family = binomial,
>   control = gcctrl)
>
> Code and data of an example for which I find reproducible, non-negligible
> differences between Mac/Win can be found here:
> https://gitlab.com/nschuck/glmer_sandbox/tree/master <
> https://gitlab.com/nschuck/glmer_sandbox/tree/master>
> The differences between the fitted models seem to be most pronounced
> regarding the estimated correlation structure of the random effects terms.
> Mac and Linux yield very similar results, but Windows deviates quite a bit
> in some cases. This has a large impact on p values obtained when performing
> model comparisons. I have tried this on Mac OS 10.14, Windows 10 and Ubuntu
> and Debian. All systems I have tried are using lme 1.1.21 and R 3.5+.
>
> Does anyone have an idea what the underlying cause might be?
>
> Thanks,
> Nico
>
>
>
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org 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.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


[R] Mac/PC differences in lmer results

2019-05-30 Thread Nicolas Schuck
Dear fellow R coders, 

I am observing differences in results obtained using glmer when using a Mac or 
Linux computer versus a PC. Specifically, I am talking about a relatively 
complex glmer model with a nested random effects structure. The model is set up 
in the following way: 
gcctrl = glmerControl(optimizer=c('nloptwrap'), optCtrl = list(maxfun = 
50), calc.derivs = FALSE)

glmer_pre_instr1 = glmer(
  formula = cbind(FREQ, NSAMP-FREQ) ~ FDIST_minz + poly(RFREQ,2) + ROI + (1 
+ FDIST_minz + RFREQ + ROI|ID/COL), 
  data = cdf_pre_instr, 
  family = binomial, 
  control = gcctrl)

Code and data of an example for which I find reproducible, non-negligible 
differences between Mac/Win can be found here: 
https://gitlab.com/nschuck/glmer_sandbox/tree/master 

The differences between the fitted models seem to be most pronounced regarding 
the estimated correlation structure of the random effects terms. Mac and Linux 
yield very similar results, but Windows deviates quite a bit in some cases. 
This has a large impact on p values obtained when performing model comparisons. 
I have tried this on Mac OS 10.14, Windows 10 and Ubuntu and Debian. All 
systems I have tried are using lme 1.1.21 and R 3.5+. 

Does anyone have an idea what the underlying cause might be? 

Thanks, 
Nico 
 



[[alternative HTML version deleted]]

__
R-help@r-project.org 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.