Hi Ted.

It's a good bet that your input vectors, log(Skull) and log(Tusk), don't have names.

In your case, if your data frame is called Data, you might first compute:

ln.Skull<-setNames(log(Data$Skull),Data$Binomial)
ln.Tusk<-setNames(log(Data$Tusk),Data$Binomial)

and then run:

Model<-phyl.RMA(ln.Skull,ln.Tusk,tree,h0=1.0)
Model
plot(Model) ## this is kind of cool.

Note, that as pointed out in the documentation of the function: "some statistician think there is never a condition in which a reduced-major-axis regression should be used" (I believe this has even been discussed on this list); and "The statistical hypothesis testing is based on Clarke (1980; reviewed in McArdle 1988), which differs from some other implementations of non-phylogenetic major axis regression in R."

All the best, Liam

Liam J. Revell
Associate Professor, University of Massachusetts Boston
Profesor Asistente, Universidad Católica de la Ssma Concepción
web: http://faculty.umb.edu/liam.revell/, http://www.phytools.org

Academic Director UMass Boston Chile Abroad:
https://www.umb.edu/academics/caps/international/biology_chile

On 6/8/2020 4:18 PM, Ted Stankowich wrote:
[EXTERNAL SENDER]

Hello,

We're trying to run phylogenetically corrected reduced major axes regression 
analyses and have encountered an error we can't debug. We're using the function 
phyl.RMA in the package 'phytools'. Here is the code we are using and the error 
it returns.



Model <- phyl.RMA(log(Skull), log(Tusk), tree, h0=1.0)

Error in if (sign(beta1) != sign(h0)) { :

   missing value where TRUE/FALSE needed

We can't seem to figure out which argument is missing, and we've tried 
including all of the T/F based arguments we think are possible. Our species 
dataset and nexus file are printed below.  Any advice would be greatly 
appreciated.

We have the following dataset:
Binomial                 Skull  Tusk
    <chr>                    <dbl> <dbl>
1 Tragulus_javanicus        93.7  14.6
2 Tragulus_kanchil          99.7  13.9
3 Tragulus_napu             98.1  11.1
4 Tragulus_nigricans        99.8  13.2
5 Moschiola_meminna        101.   14.6
6 Moschus_berezovskii      134.   55.0
7 Moschus_moschiferus      152.   52.9
8 Muntiacus_muntjak        193.   26.4
9 Muntiacus_reevesi        159.   23.4
10 Muntiacus_truongsonensis 184.   27.7
11 Muntiacus_vaginalis      203.   28.6
12 Hydropotes_inermis       162.   48.5
13 Hyemoschus_aquaticus     122.   20.1
14 Elaphodus_cephalophus    186.   17.3

And the following nexus tree:

#NEXUS
[R-package APE, Mon Jun 08 12:20:01 2020]

BEGIN TAXA;
               DIMENSIONS NTAX = 12;
               TAXLABELS
                              Tragulus_napu
                              Tragulus_kanchil
                              Tragulus_javanicus
                              Hyemoschus_aquaticus
                              Moschiola_meminna
                              Muntiacus_reevesi
                              Muntiacus_muntjak
                              Muntiacus_truongsonensis
                              Elaphodus_cephalophus
                              Hydropotes_inermis
                              Moschus_moschiferus
                              Moschus_berezovskii
               ;
END;
BEGIN TREES;
               TRANSLATE
                              1            Tragulus_napu,
                              2            Tragulus_kanchil,
                              3            Tragulus_javanicus,
                              4            Hyemoschus_aquaticus,
                              5            Moschiola_meminna,
                              6            Muntiacus_reevesi,
                              7            Muntiacus_muntjak,
                              8            Muntiacus_truongsonensis,
                              9            Elaphodus_cephalophus,
                              10          Hydropotes_inermis,
                              11          Moschus_moschiferus,
                              12          Moschus_berezovskii
               ;
               TREE * UNTITLED = [&R] 
((((1:5.540957781,(2:2.978817423,3:2.978817423):2.562139698):10.78911152,4:16.33006601):6.360692368,5:22.69076035):5.725388419,(((((6:1.611149584,7:1.611149848):1.556474893,8:3.167624477):4.130280196,9:7.297904013):1.497063399,10:8.794967413):7.19682079,(11:2.539095678,12:2.539096008):13.45269085):12.42436025);



Dr. Ted Stankowich
Associate Professor
Department of Biological Sciences
California State University Long Beach
Long Beach, CA 90840
theodore.stankow...@csulb.edu<mailto:theodore.stankow...@csulb.edu>
562-985-4826
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.csulb.edu%2Fmammal-lab%2F&amp;data=02%7C01%7Cliam.revell%40umb.edu%7C5a74928c910446b96b1508d80caf5765%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637273294515730787&amp;sdata=7FUGnuFJCdRHmPiVrWPPAu%2BLEyK6O%2B4VyAKHz1n63qw%3D&amp;reserved=0
@CSULBMammalLab



Dr. Ted Stankowich
Associate Professor
Department of Biological Sciences
California State University Long Beach
Long Beach, CA 90840
theodore.stankow...@csulb.edu<mailto:theodore.stankow...@csulb.edu>
562-985-4826
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.csulb.edu%2Fmammal-lab%2F&amp;data=02%7C01%7Cliam.revell%40umb.edu%7C5a74928c910446b96b1508d80caf5765%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637273294515730787&amp;sdata=7FUGnuFJCdRHmPiVrWPPAu%2BLEyK6O%2B4VyAKHz1n63qw%3D&amp;reserved=0
@CSULBMammalLab




         [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylo&amp;data=02%7C01%7Cliam.revell%40umb.edu%7C5a74928c910446b96b1508d80caf5765%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637273294515730787&amp;sdata=fM8ulKB00NYkD5dg7kKLLn60gKSn7ax30UOS8MoF4qo%3D&amp;reserved=0
Searchable archive at 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2F&amp;data=02%7C01%7Cliam.revell%40umb.edu%7C5a74928c910446b96b1508d80caf5765%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C637273294515730787&amp;sdata=TZmy1ZYPYlIl%2FbF4SWD0n7Ivy%2BP8UhB2engQzXg2CVY%3D&amp;reserved=0


_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to