Dear Karla,

I think you can perform this type of analysis using a multivariate 
'repeated measures' design, considering the male and female as separate 
(responses) traits to be correlated to your covariates. You can then use
 generalized hypothesis testing with contrasts coding.

In mvMORPH, for instance, you can use a model such as:

fit <- mvgls(cbind(male, female) ~ correlate1 + correlate2, tree=tree, 
model='lambda', method='LL')

You can then test the 'global' effect using the 'manova.gls' function to test 
the predictors

manova.gls(fit) # overall test - any significant effect of both predictors ?

To further assess whether there are differences between sexes, you can use 
contrast coding:

P = matrix(c(1,-1), ncol=1) # compare the male to the female 'response' 
variables

L1 = c(0,1,0) # test whether the first correlate shows any differences between 
sexes

manova.gls(fit, P=P, L=L1)

L2 =c(0,0,1) # to test for a different effect of the correlate2 between sexes.

manova.gls(fit, P=P, L=L2)

In brief, the contrast code 'P' is used to compare the male and female 
traits (it takes their differences), while the contrast code 'L' tests 
whether the slope of both predictors is different from zero (i.e., it 
tests whether there's a significant difference in the relationship with 
the predictors between males and females while taking into account the 
correlation between both traits and controlling for the phylogenetic 
relationships). More formally, this generalized linear hypothesis tests 
whether L%*%coef(fit)%*%P = 0 and reject it (p-values<0.05) 
otherwise.

Hope this helps.

Best regards,

Julien


________________________________________
De : R-sig-phylo <[email protected]> de la part de Emmanuel 
Paradis <[email protected]>
Envoyé : lundi 26 mai 2025 18:50
À : Karla Shikev <[email protected]>
Cc : R Sig Phylo Listserv <[email protected]>
Objet : Re: [R-sig-phylo] PGLS with two values per tip
 
Dear Karla,

I think the question was discussed on this list some years ago but I don't 
remember the details -- a search in the archives could help you.

Surely, 'sex' is not a (species-level) evolving trait. Maybe try to analyse 
'sexual dimorphism' if the trait is present in both sexes. If the trait is 
present in only one sex (e.g., antler size), I think a good approach would be 
to analyse males/females separately.

Best,

Emmanuel

----- Le 21 Mai 25, à 21:14, Karla Shikev [email protected] a écrit :

> Dear all,
>
> I'm trying to do an analysis that is a bit unusual and I'd appreciate any
> feedback. I'm looking at correlates of body size, but I want to analyze
> males and females separately. However, a regular PGLS would only allow one
> value per tip. I'd like something like this:
>
> body size ~ correlate1 + correlate2 + sex
>
> Any suggestions?
>
> Karla
>
>       [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-phylo mailing list - [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/[email protected]/

_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/
_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/

Reply via email to