Re: [R] How to combine the results of different survey?

2019-06-04 Thread Michael Dewey

Dear Damien

Comments in line

On 03/06/2019 15:50, Damien Zurkinden wrote:

I have results of different surveys (years) for different species that I called 
NAMA. I want to combining the results of those different surveys to produce one 
overall result by using meta-analysis

I tried to implement my data using the R package metaplus. I used as Vector of 
observed effect sizes corresponding to each study (yi) the years (colomns). I 
used as Vector of character strings corresponding to each study (slab) the 
species (lines).

note: I don't have Vector of observed standard errors corresponding to each 
study (sei)



I do not use metaplus but it seems unlikely that you are going to get 
useful results within the standard errors



NAMA.meta <- metaplus(yi= 2011 ~ 2019, slab = 1 ~ 113, data=NAMA)



You have supplied a formula for yi and for slab. In your text you said 
you had supplied a vector of character strings.





The expected results should be the parameter estimates & forest plot. However, 
I receive an error message:

Error in terms.formula(object, data = data) :

   terme incorrect dans une formule de mod�le

In addition: Warning message:

In metaplus(yi = 2011 ~ 2019, slab = 1 ~ 113, data = NAMA) :

   Very few studies. Solution may be unstable.

Thanks for your help,


Damien

[[alternative HTML version deleted]]



---
This email has been checked for viruses by AVG.
https://www.avg.com


__
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.



--
Michael
http://www.dewey.myzen.co.uk/home.html

__
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] Problem in using 'plm' package after updating R

2019-06-04 Thread Uwe Ligges
IN addition, you install to Documents\R\win-library\3.3 which suggest 
you have updated R but are still suing the old version 3.3.x?


Best,
Uwe Ligges

On 04.06.2019 14:47, peter dalgaard wrote:

Looks like you are not equipped to install source packages, so don't

Or, possibly, install from source has an unstated dependency on package 
"stringr" so try install that first.

-pd


On 3 Jun 2019, at 05:38 , Wong David  wrote:

Dear Madam/ Sir,

After I tried to update the plm package based on the enclosure [i.e. download 
the package.soruces (tar.gz)], I still found the following errors as bold in 
black:

"--- Please select a CRAN mirror for use in this session ---

  There is a binary version available but the source version is later:
binary source needs_compilation
plm  1.6-6  2.0-1 FALSE

installing the source package ‘plm’

trying URL 'https://mirror-hk.koddos.net/CRAN/src/contrib/plm_2.0-1.tar.gz'
Content type 'application/x-gzip' length 2343782 bytes (2.2 MB)
downloaded 2.2 MB

* installing *source* package 'plm' ...
** package 'plm' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
vI[[j]]) :
  there is no package called 'stringr'
ERROR: lazy loading failed for package 'plm'
* removing 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'
* restoring previous 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'

The downloaded source packages are in
‘C:\Users\David Wong\AppData\Local\Temp\RtmpcPaQsM\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/i386/R" CMD INSTALL -l 
"C:\Users\David Wong\Documents\R\win-library\3.3" 
C:\Users\DAVIDW~1\AppData\Local\Temp\RtmpcPaQsM/downloaded_packages/plm_2.0-1.tar.gz' had status 1
2: In install.packages(NULL, .libPaths()[1L], dependencies = NA, type = type) :
  installation of package ‘plm’ had non-zero exit status"

Please help.

Thanks and regards,
David Wong from Hong Kong


发件人: Wong David
发送时间: 2019年5月31日 7:21
收件人: r-help-ow...@r-project.org; r-help@r-project.org
主题: Problem in using 'plm' package after updating R

Dear Madam/ Sir,

After I updated the latest packages in R this afternoon, I found that I cannot 
use 'plm' package. The error messages are as follows:

"R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for 
an HTML browser interface to help.
Type 'q()' to quit R.

Warning: namespace ‘plm’ is not available and has been replaced by .GlobalEnv 
when processing object ‘inst_f’

[Previously saved workspace restored]


utils:::menuInstallPkgs()

--- Please select a CRAN mirror for use in this session ---

  There is a binary version available but the source version is later:
binary source needs_compilation
plm  1.6-6  2.0-1 FALSE

installing the source package ‘plm’

trying URL 'https://mirror-hk.koddos.net/CRAN/src/contrib/plm_2.0-1.tar.gz'
Content type 'application/x-gzip' length 2343782 bytes (2.2 MB)
downloaded 2.2 MB

* installing *source* package 'plm' ...
** package 'plm' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
vI[[j]]) :
  there is no package called 'stringr'
ERROR: lazy loading failed for package 'plm'
* removing 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'
* restoring previous 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'

The downloaded source packages are in
‘C:\Users\David Wong\AppData\Local\Temp\RtmpEdDjdI\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/i386/R" CMD INSTALL -l 
"C:\Users\David Wong\Documents\R\win-library\3.3" 
C:\Users\DAVIDW~1\AppData\Local\Temp\RtmpEdDjdI/downloaded_packages/plm_2.0-1.tar.gz' had status 1
2: In install.packages(NULL, .libPaths()[1L], dependencies = NA, type = type) :
  installation of package ‘plm’ had non-zero exit status

library(plm)

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
vI[[j]]) :
  there is no package called ‘stringr’
Error: package or namespace load failed for ‘plm’

help.start()

starting httpd help server ... done
If nothing happens, you should open 
‘http://127.0.0.1:19429/doc/html/index.html’ yourself

The error messages are highlighted in 

Re: [R] Problem in using 'plm' package after updating R

2019-06-04 Thread peter dalgaard
Looks like you are not equipped to install source packages, so don't

Or, possibly, install from source has an unstated dependency on package 
"stringr" so try install that first.

-pd

> On 3 Jun 2019, at 05:38 , Wong David  wrote:
> 
> Dear Madam/ Sir,
> 
> After I tried to update the plm package based on the enclosure [i.e. download 
> the package.soruces (tar.gz)], I still found the following errors as bold in 
> black:
> 
> "--- Please select a CRAN mirror for use in this session ---
> 
>  There is a binary version available but the source version is later:
>binary source needs_compilation
> plm  1.6-6  2.0-1 FALSE
> 
> installing the source package ‘plm’
> 
> trying URL 'https://mirror-hk.koddos.net/CRAN/src/contrib/plm_2.0-1.tar.gz'
> Content type 'application/x-gzip' length 2343782 bytes (2.2 MB)
> downloaded 2.2 MB
> 
> * installing *source* package 'plm' ...
> ** package 'plm' successfully unpacked and MD5 sums checked
> ** R
> ** data
> ** inst
> ** preparing package for lazy loading
> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
> vI[[j]]) :
>  there is no package called 'stringr'
> ERROR: lazy loading failed for package 'plm'
> * removing 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'
> * restoring previous 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'
> 
> The downloaded source packages are in
>‘C:\Users\David Wong\AppData\Local\Temp\RtmpcPaQsM\downloaded_packages’
> Warning messages:
> 1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/i386/R" CMD INSTALL -l 
> "C:\Users\David Wong\Documents\R\win-library\3.3" 
> C:\Users\DAVIDW~1\AppData\Local\Temp\RtmpcPaQsM/downloaded_packages/plm_2.0-1.tar.gz'
>  had status 1
> 2: In install.packages(NULL, .libPaths()[1L], dependencies = NA, type = type) 
> :
>  installation of package ‘plm’ had non-zero exit status"
> 
> Please help.
> 
> Thanks and regards,
> David Wong from Hong Kong
> 
> 
> 发件人: Wong David
> 发送时间: 2019年5月31日 7:21
> 收件人: r-help-ow...@r-project.org; r-help@r-project.org
> 主题: Problem in using 'plm' package after updating R
> 
> Dear Madam/ Sir,
> 
> After I updated the latest packages in R this afternoon, I found that I 
> cannot use 'plm' package. The error messages are as follows:
> 
> "R version 3.3.3 (2017-03-06) -- "Another Canoe"
> Copyright (C) 2017 The R Foundation for Statistical Computing
> Platform: i386-w64-mingw32/i386 (32-bit)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
> 
>  Natural language support but running in an English locale
> 
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
> 
> Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' 
> for an HTML browser interface to help.
> Type 'q()' to quit R.
> 
> Warning: namespace ‘plm’ is not available and has been replaced by .GlobalEnv 
> when processing object ‘inst_f’
> 
> [Previously saved workspace restored]
> 
>> utils:::menuInstallPkgs()
> --- Please select a CRAN mirror for use in this session ---
> 
>  There is a binary version available but the source version is later:
>binary source needs_compilation
> plm  1.6-6  2.0-1 FALSE
> 
> installing the source package ‘plm’
> 
> trying URL 'https://mirror-hk.koddos.net/CRAN/src/contrib/plm_2.0-1.tar.gz'
> Content type 'application/x-gzip' length 2343782 bytes (2.2 MB)
> downloaded 2.2 MB
> 
> * installing *source* package 'plm' ...
> ** package 'plm' successfully unpacked and MD5 sums checked
> ** R
> ** data
> ** inst
> ** preparing package for lazy loading
> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
> vI[[j]]) :
>  there is no package called 'stringr'
> ERROR: lazy loading failed for package 'plm'
> * removing 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'
> * restoring previous 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'
> 
> The downloaded source packages are in
>‘C:\Users\David Wong\AppData\Local\Temp\RtmpEdDjdI\downloaded_packages’
> Warning messages:
> 1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/i386/R" CMD INSTALL -l 
> "C:\Users\David Wong\Documents\R\win-library\3.3" 
> C:\Users\DAVIDW~1\AppData\Local\Temp\RtmpEdDjdI/downloaded_packages/plm_2.0-1.tar.gz'
>  had status 1
> 2: In install.packages(NULL, .libPaths()[1L], dependencies = NA, type = type) 
> :
>  installation of package ‘plm’ had non-zero exit status
>> library(plm)
> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
> vI[[j]]) :
>  there is no package called ‘stringr’
> Error: package or namespace load failed for ‘plm’
>> help.start()
> starting httpd help server ... done
> If nothing happens, you should open 
> ‘http://127.0.0.1:19429/doc/html/index.html’ 

[R] How to combine the results of different survey?

2019-06-04 Thread Damien Zurkinden
I have results of different surveys (years) for different species that I called 
NAMA. I want to combining the results of those different surveys to produce one 
overall result by using meta-analysis

I tried to implement my data using the R package metaplus. I used as Vector of 
observed effect sizes corresponding to each study (yi) the years (colomns). I 
used as Vector of character strings corresponding to each study (slab) the 
species (lines).

note: I don't have Vector of observed standard errors corresponding to each 
study (sei)

NAMA.meta <- metaplus(yi= 2011 ~ 2019, slab = 1 ~ 113, data=NAMA)



The expected results should be the parameter estimates & forest plot. However, 
I receive an error message:

Error in terms.formula(object, data = data) :

  terme incorrect dans une formule de mod�le

In addition: Warning message:

In metaplus(yi = 2011 ~ 2019, slab = 1 ~ 113, data = NAMA) :

  Very few studies. Solution may be unstable.

Thanks for your help,


Damien

[[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] Parallel processes collapse into one

2019-06-04 Thread Nicola Lunardon
I have written an R package to collect some functions to run simulations
for a research project. Main functions are written in C and make use of
BLAS routines, such as dsymm, dgemm, and ddot. I run simulations in
parallel by using mclapply and the problem is that after some point all R
instances collapse into one: R seems to be running, but simulations do not
progress further. If I run simulations on 16 cores I end up having an R
instance with CPU usage about 1600%, never experienced such a behaviour.

sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so

[[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] Creating a median curve among multiple curvesin ggplot

2019-06-04 Thread rain1290--- via R-help
Hi there,
Using ggplot, I have successfully created a plot that contains 37 separate line 
plots that each represent a trend in precipitation over 140 years. However, 
what I would like to do is show the curve that is the "median" of these lines. 
Is this possible to do? 
Here is what I have so far in an attempt to do this, but I am not certain if it 
is the correct approach to create the desired median line - the first variable 
shows x-variable objects (each 1-dimensional) and the second variable shows the 
y-variable objects (3-dimensional):
RCP1pctCO2Median <- median(cbind(get, IPSL, IPSLMR, IPSL5, MIROC, HadGEM, MPI, 
MPI5, GFDL, GFDL5)) 
RCP1pctCO2ModelMedian <- median(cbind(Model2, Model10, Model18, Model26, 
subset14, Model42, subset20, subset24, Model60, Model68))

The first variable appears to work, but it only returns one value, and I want 
all of the 140 values corresponding to whichever curve was returned. Why is it 
that only one value returns? Here is what the variable contains:
>RCP1pctCO2Median[1] 1.189044
When I run the second variable the same way, I receive the following error:
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 
  'x' must be atomic
Why does this appear?  I tried "unlist" and "as.vector", but the same error 
appears.
If it helps, to show what the 1-dimensional objects of the first variable look 
like, here is an example of one (the object "get"):
>get
  [1] 0. 0.00644777 0.01250601 0.01746194 0.02656210 0.03360072 
0.04399755 0.05404601 0.06154399 0.07105423
 [11] 0.08315538 0.08925389 0.10060635 0.10833009 0.12196157 0.13730928 
0.14890850 0.16087072 0.17361501 0.18310140
 [21] 0.19810085 0.21316248 0.22423607 0.23529990 0.24695577 0.26119599 
0.27643532 0.28517213 0.29978970 0.31870887
 [31] 0.33418021 0.34585044 0.36071229 0.37379062 0.39324498 0.4102 
0.42437476 0.43643925 0.44687960 0.45864752
 [41] 0.48055932 0.49634662 0.50779009 0.52861303 0.54971600 0.56138206 
0.57472491 0.59202033 0.60975420 0.63057494
 [51] 0.64653736 0.66088217 0.68168259 0.69649595 0.71363837 0.72988760 
0.75010443 0.76776582 0.78613955 0.81099886
 [61] 0.82979667 0.84431553 0.86824787 0.88447672 0.89909577 0.92162514 
0.94854647 0.96631038 0.98120815 1.00357985
 [71] 1.02769291 1.04733002 1.06585240 1.09083056 1.11592567 1.13627303 
1.15866983 1.17941856 1.19748724 1.22012913
 [81] 1.24142718 1.26937973 1.29283488 1.31011736 1.33134723 1.36014366 
1.38395822 1.40615380 1.42895305 1.45046842
 [91] 1.47504234 1.49920797 1.52142668 1.54559219 1.57354927 1.6896 
1.62449229 1.64506662 1.67100036 1.70185161
[101] 1.72964287 1.75235510 1.77455521 1.80183053 1.83121216 1.85619974 
1.88188243 1.91002214 1.9006 1.96133912
[111] 1.98944890 2.01225924 2.03804183 2.06614304 2.09558916 2.12400699 
2.14846969 2.18011498 2.20532560 2.23031592
[121] 2.26106715 2.28796983 2.31954741 2.35274339 2.37794161 2.40643740 
2.43963051 2.46948838 2.49733877 2.53035021
[131] 2.56229091 2.59265327 2.61934137 2.64592481 2.67754769 2.70779777 
2.73824191 2.76880598 2.80077982 2.83057237

For the 3-D objects within the second variable, here is what is contained in 
the object "Model2", for example:
>Model2 <- brick("MaxPrecCCCMACanESM21pctCO2.nc", var = "onedaymax")
>Model2class   : RasterBrick 
dimensions  : 64, 128, 8192, 140  (nrow, ncol, ncell, nlayers)
resolution  : 2.8125, 2.789327  (x, y)
extent  : -181.4062, 178.5938, -89.25846, 89.25846  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
data source : C:/Users/Travis/Documents/Other documents/All netCDF 
files/netcdffiles/MaxPrecCCCMACanESM21pctCO2.nc 
names   : X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, 
... 
z-value : 1, 140 (min, max)
varname : onedaymax 


In any case, I am not even certain if what I have done above is the correct 
approach altogether to create a median line, but I would greatly appreciate any 
assistance! Your feedback would be extremely valuable to me!
Thank you, and I very much look forward to hearing from you!
[[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] Calling any method within default method!

2019-06-04 Thread Ivan Bezerra Allaman
Hi Abby and Rui!

Thank's by your responses!

Rui,

His explanations were very illuminating. I had not realized the
misconception,

paste ('foo', ...)

Thank you!

-- 
\begin{signature}
<<>>=
Prof. D.Sc. Ivan Bezerra Allaman
Laboratório de Estatística Computacional
Departamento de Ciências Exatas e Tecnológicas
Universidade Estadual de Santa Cruz

Ilhéus/BA - Brasil
Fone: +55 73 3680-5622
E-mail:ivanala...@gmail.com
@
\end{signature}

[[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] Problem in using 'plm' package after updating R

2019-06-04 Thread Wong David
Dear Madam/ Sir,

After I updated the latest packages in R this afternoon, I found that I cannot 
use 'plm' package. The error messages are as follows:

"R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for 
an HTML browser interface to help.
Type 'q()' to quit R.

Warning: namespace ��plm�� is not available and has been replaced by .GlobalEnv 
when processing object ��inst_f��

[Previously saved workspace restored]

> utils:::menuInstallPkgs()
--- Please select a CRAN mirror for use in this session ---

  There is a binary version available but the source version is later:
binary source needs_compilation
plm  1.6-6  2.0-1 FALSE

installing the source package ��plm��

trying URL 'https://mirror-hk.koddos.net/CRAN/src/contrib/plm_2.0-1.tar.gz'
Content type 'application/x-gzip' length 2343782 bytes (2.2 MB)
downloaded 2.2 MB

* installing *source* package 'plm' ...
** package 'plm' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
vI[[j]]) :
  there is no package called 'stringr'
ERROR: lazy loading failed for package 'plm'
* removing 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'
* restoring previous 'C:/Users/David Wong/Documents/R/win-library/3.3/plm'

The downloaded source packages are in
��C:\Users\David 
Wong\AppData\Local\Temp\RtmpEdDjdI\downloaded_packages��
Warning messages:
1: running command '"C:/PROGRA~1/R/R-33~1.3/bin/i386/R" CMD INSTALL -l 
"C:\Users\David Wong\Documents\R\win-library\3.3" 
C:\Users\DAVIDW~1\AppData\Local\Temp\RtmpEdDjdI/downloaded_packages/plm_2.0-1.tar.gz'
 had status 1
2: In install.packages(NULL, .libPaths()[1L], dependencies = NA, type = type) :
  installation of package ��plm�� had non-zero exit status
> library(plm)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = 
vI[[j]]) :
  there is no package called ��stringr��
Error: package or namespace load failed for ��plm��
> help.start()
starting httpd help server ... done
If nothing happens, you should open 
��http://127.0.0.1:19429/doc/html/index.html�� yourself

The error messages are highlighted in blue. Please assist.

Thanks and regards,
David Wong


[[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] MCMCglmm model set-up and interpretation

2019-06-04 Thread Theofania-Sotiria Patsiou , Φαίη Πάτσιου
Dear list,



I am new to MCMCglmm and I am trying to test in my data whether there is a
significant plot effect (and of which plot) on each treatment per group of
species while accounting for phylogenetic relatedness.

My data is structured as follows:

Species: 100 species

Species type: 3 levels

Treatments: 3 levels

Plots: 14 levels

Response variable Y: continuous



What I have done is to fit the following model (after testing for various
priors I came up with the following expanded one)

prior.exp <- list(G = list(G1 = list(V = 1,  nu = 1e+06, alpha.mu=0, alpha.
V=1000)), R = list(V =1, nu = 1e+06))



fit.mod = MCMCglmm(log(Y) ~ -1 + Treatment + Plot + Group + Group*
Treatment * Plot,

random = ~Species ,  ginverse = list(Species = ainv01), data =
input,

family = "gaussian", nitt = 5e+06, burnin =6000, thin = 150,

prior = prior.exp ,verbose=F)



1) Is this syntax correct to extract the effect of the plot on the
treatment per group of species or should I use Group:Treatment:Plot as they
are more like nested effects? Is it correct removing the intercept here?

2) The model summary comes up with CI per treatment for all treatment types
but for the Group and Treatment, one of the levels is kept for comparison
and is missing. This is confusing for more than 2 factors with more than 3
levels interaction, as I cannot figure out which factor's level is kept as
the reference for the given CI.

3) For the overall interaction of the 3 categorical variables, the summary
comes up with specific factor levels and not the overall effect of each
variable or their interactions.

Many thanks in advance!
Faye.

[[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] Post Hoc for Homogeneity of variance

2019-06-04 Thread Stephen Ellison
> Thomas Subia  
Could you please explain the difference between:

> any differences in variance between factors. 
and 

> variance differences between factors

?



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

__
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.