RE: [MORPHMET] Estimating Ontogenetic Trajectories

2015-08-24 Thread Karban, Miranda E
Thank you, everyone, for your replies. Your comments and suggestions have been 
incredibly helpful.

Best,
Miranda


From: Collyer, Michael [michael.coll...@wku.edu]
Sent: Monday, August 24, 2015 5:55 AM
To: lv xiao
Cc: MORPHMET; Karban, Miranda E
Subject: Re: [MORPHMET] Estimating Ontogenetic Trajectories

This is correct.  The function, trajectory.analysis, compares multi-point 
trajectories; therefore, age would need to be modeled as a categorical variable 
(factor).  If one wishes to have age (or similar variable) in the model as a 
continuous variable, then advanced.procD.lm would be more appropriate.  This 
function allows comparisons of slopes among groups.  The two functions are 
similar, in that they allow evaluation of the length and direction of group 
trajectories, although the trajectories in advancad.procD.lm are vectors.  One 
can consider non-linear trajectories in trajectory.analysis.

Hope that helps!

Michael Collyer

Associate Professor
Biostatistics
Department of Biology
Western Kentucky University
1906 College Heights Blvd. #11080
Bowling Green, KY 42101-1080
Phone: 270-745-8765; Fax: 270-745-6856
Email: michael.coll...@wku.edumailto:michael.coll...@wku.edu

On Aug 24, 2015, at 12:11 AM, lv xiao 
lxia...@gmail.commailto:lxia...@gmail.com wrote:

In the botton line of page 53 of Quick Guide to Geomorph v2.1.6 regarding 
trajectory.analysis (Y ~ cov + A * B), A and B are called factors, which 
seems to suggest that A and B are categorical variables. Continuous covariates 
could be included in the formula, but this is only optional. In contrast, it 
seems that there must be two categorical variables (A and B) appearing in the 
formula.

Following this line of thought, I am wondering if is there the need to convert 
the continuous age variable (age) into a categorical variable (age_cat) before 
applying the trajectory analysis. I am not sure whether one should use 
trajectory.analysis(shape ~ group * age_cat ) or trajectory.analysis(shape ~ 
group * age).

Best regards,
Patrick

On Monday, 24 August 2015 10:56:55 UTC+8, Emma Sherratt wrote:
Dear Miranda,

Using procD.lm is the correct function for what you want to do. Since you have 
just two groups it's a simple Procrustes Anova. Your implementation should be:

procD.lm(shape~ age*group)

This will give you:

Effect of age; where significant means the shape scales allometrically

Effect of group; where significant means the groups differ in intercept

The interaction term of age and group to tell you if the two groups have the 
same slope (interaction term not significant) or the slopes differ (sig 
interaction term)

Then from this you will be able to deduce whether the two groups follow the 
same allometric trajectory or not. But remember, you are dealing with 
multivariate regression here so there is no positive or negative allometry, 
since the slope is a multivariate vector in shape space.

The same formula into trajectory.analysis should then lead you to where you 
were hoping to go with that.

Emma

On Monday, August 24, 2015, Karban, Miranda E 
miranda-...@uiowa.eduhttp://uiowa.edu/ wrote:
Hello morphometricians,
I am relatively new to morphometrics, and I am attempting to assess ontogenetic 
trajectories from a longitudinal sample of growth study x-rays. My subjects are 
divided into 2 groups, and I would like to determine whether there are 
developmental differences in cranial shape between these groups. I have precise 
ages for each subject, so I hope to use age as a variable (following McNulty et 
al., 2006) rather than centroid size.

From what I gather from the literature, I can estimate ontogenetic 
trajectories by regressing the Procrustes aligned shape coordinates onto the 
independent variable of age. So far, I have attempted to do this in the 
geomorph package in R using the procD.lm and the trajectory.analysis 
functions. I am wondering if I am doing this correctly, or if there is a 
better function to use.

I have tried the following:
lateral.gpa - gpagen(vaultlandmarks)
procD.lm(two.d.array(lateral.gpa$coords) ~ age, iter = 999)

where “vaultlandmarks” refers to the 2D landmark and semi-landmark coordinates 
in my tps file, and “age” refers to a column in my metadata csv file which 
gives the age of each specimen to the nearest 1/10 of a year. This provides a 
sum-of-squared Procrustes distances, a mean square, and a highly significant 
p-value. I am not sure, however, how to compare the results I get from the 2 
groups.

When I try the trajectory.analysis function:
lateral.gpa - two.d.array(gpagen(vaultlandmarks)$coords)
trajectory.analysis(lateral.gpa~age)

I get the error message: “Error in trajectory.analysis(lateral.gpa ~ age) :   
X-matrix does not specify enough model factors (see help file).”

Thank you for any advice or help you might provide.

Best,
Miranda Karban
PhD Candidate, University of Iowa

--
MORPHMET may be accessed via its webpage at 
http

Re: [MORPHMET] Estimating Ontogenetic Trajectories

2015-08-24 Thread Collyer, Michael
This is correct.  The function, trajectory.analysis, compares multi-point 
trajectories; therefore, age would need to be modeled as a categorical variable 
(factor).  If one wishes to have age (or similar variable) in the model as a 
continuous variable, then advanced.procD.lm would be more appropriate.  This 
function allows comparisons of slopes among groups.  The two functions are 
similar, in that they allow evaluation of the length and direction of group 
trajectories, although the trajectories in advancad.procD.lm are vectors.  One 
can consider non-linear trajectories in trajectory.analysis.

Hope that helps!

Michael Collyer

Associate Professor
Biostatistics
Department of Biology
Western Kentucky University
1906 College Heights Blvd. #11080
Bowling Green, KY 42101-1080
Phone: 270-745-8765; Fax: 270-745-6856
Email: michael.coll...@wku.edumailto:michael.coll...@wku.edu

On Aug 24, 2015, at 12:11 AM, lv xiao 
lxia...@gmail.commailto:lxia...@gmail.com wrote:

In the botton line of page 53 of Quick Guide to Geomorph v2.1.6 regarding 
trajectory.analysis (Y ~ cov + A * B), A and B are called factors, which 
seems to suggest that A and B are categorical variables. Continuous covariates 
could be included in the formula, but this is only optional. In contrast, it 
seems that there must be two categorical variables (A and B) appearing in the 
formula.

Following this line of thought, I am wondering if is there the need to convert 
the continuous age variable (age) into a categorical variable (age_cat) before 
applying the trajectory analysis. I am not sure whether one should use 
trajectory.analysis(shape ~ group * age_cat ) or trajectory.analysis(shape ~ 
group * age).

Best regards,
Patrick

On Monday, 24 August 2015 10:56:55 UTC+8, Emma Sherratt wrote:
Dear Miranda,

Using procD.lm is the correct function for what you want to do. Since you have 
just two groups it's a simple Procrustes Anova. Your implementation should be:

procD.lm(shape~ age*group)

This will give you:

Effect of age; where significant means the shape scales allometrically

Effect of group; where significant means the groups differ in intercept

The interaction term of age and group to tell you if the two groups have the 
same slope (interaction term not significant) or the slopes differ (sig 
interaction term)

Then from this you will be able to deduce whether the two groups follow the 
same allometric trajectory or not. But remember, you are dealing with 
multivariate regression here so there is no positive or negative allometry, 
since the slope is a multivariate vector in shape space.

The same formula into trajectory.analysis should then lead you to where you 
were hoping to go with that.

Emma

On Monday, August 24, 2015, Karban, Miranda E 
miranda-...@uiowa.eduhttp://uiowa.edu/ wrote:
Hello morphometricians,
I am relatively new to morphometrics, and I am attempting to assess ontogenetic 
trajectories from a longitudinal sample of growth study x-rays. My subjects are 
divided into 2 groups, and I would like to determine whether there are 
developmental differences in cranial shape between these groups. I have precise 
ages for each subject, so I hope to use age as a variable (following McNulty et 
al., 2006) rather than centroid size.

From what I gather from the literature, I can estimate ontogenetic 
trajectories by regressing the Procrustes aligned shape coordinates onto the 
independent variable of age. So far, I have attempted to do this in the 
geomorph package in R using the procD.lm and the trajectory.analysis 
functions. I am wondering if I am doing this correctly, or if there is a 
better function to use.

I have tried the following:
lateral.gpa - gpagen(vaultlandmarks)
procD.lm(two.d.array(lateral.gpa$coords) ~ age, iter = 999)

where “vaultlandmarks” refers to the 2D landmark and semi-landmark coordinates 
in my tps file, and “age” refers to a column in my metadata csv file which 
gives the age of each specimen to the nearest 1/10 of a year. This provides a 
sum-of-squared Procrustes distances, a mean square, and a highly significant 
p-value. I am not sure, however, how to compare the results I get from the 2 
groups.

When I try the trajectory.analysis function:
lateral.gpa - two.d.array(gpagen(vaultlandmarks)$coords)
trajectory.analysis(lateral.gpa~age)

I get the error message: “Error in trajectory.analysis(lateral.gpa ~ age) :   
X-matrix does not specify enough model factors (see help file).”

Thank you for any advice or help you might provide.

Best,
Miranda Karban
PhD Candidate, University of Iowa

--
MORPHMET may be accessed via its webpage at 
http://www.morphometrics.orghttp://www.morphometrics.org/

To unsubscribe from this group and stop receiving emails from it, send an email 
to 
morphmet+unsubscribe@mailto:morphmet+unsubscr...@morphometrics.orgmorphometrics.orgmailto:morphmet+unsubscr...@morphometrics.org.


--

~~~

Emma Sherratt, PhD.

Lecturer in 

[MORPHMET] Estimating Ontogenetic Trajectories

2015-08-23 Thread Karban, Miranda E
Hello morphometricians,
I am relatively new to morphometrics, and I am attempting to assess ontogenetic 
trajectories from a longitudinal sample of growth study x-rays. My subjects are 
divided into 2 groups, and I would like to determine whether there are 
developmental differences in cranial shape between these groups. I have precise 
ages for each subject, so I hope to use age as a variable (following McNulty et 
al., 2006) rather than centroid size.

From what I gather from the literature, I can estimate ontogenetic 
trajectories by regressing the Procrustes aligned shape coordinates onto the 
independent variable of age. So far, I have attempted to do this in the 
geomorph package in R using the procD.lm and the trajectory.analysis 
functions. I am wondering if I am doing this correctly, or if there is a 
better function to use.

I have tried the following:
lateral.gpa - gpagen(vaultlandmarks)
procD.lm(two.d.array(lateral.gpa$coords) ~ age, iter = 999)

where “vaultlandmarks” refers to the 2D landmark and semi-landmark coordinates 
in my tps file, and “age” refers to a column in my metadata csv file which 
gives the age of each specimen to the nearest 1/10 of a year. This provides a 
sum-of-squared Procrustes distances, a mean square, and a highly significant 
p-value. I am not sure, however, how to compare the results I get from the 2 
groups.

When I try the trajectory.analysis function:
lateral.gpa - two.d.array(gpagen(vaultlandmarks)$coords)
trajectory.analysis(lateral.gpa~age)

I get the error message: “Error in trajectory.analysis(lateral.gpa ~ age) :   
X-matrix does not specify enough model factors (see help file).”

Thank you for any advice or help you might provide.

Best,
Miranda Karban
PhD Candidate, University of Iowa

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org

To unsubscribe from this group and stop receiving emails from it, send an email 
to morphmet+unsubscr...@morphometrics.org.


Re: [MORPHMET] Estimating Ontogenetic Trajectories

2015-08-23 Thread lv xiao
In the botton line of page 53 of Quick Guide to Geomorph v2.1.6 regarding 
trajectory.analysis (Y ~ cov + A * B), A and B are called factors, which 
seems to suggest that A and B are categorical variables. Continuous 
covariates could be included in the formula, but this is only optional. In 
contrast, it seems that there must be two categorical variables (A and B) 
appearing in the formula. 

Following this line of thought, I am wondering if is there the need to 
convert the continuous age variable (age) into a categorical variable 
(age_cat) before applying the trajectory analysis. I am not sure whether 
one should use trajectory.analysis(shape ~ group * age_cat ) 
or trajectory.analysis(shape ~ group * age).

Best regards,
Patrick

On Monday, 24 August 2015 10:56:55 UTC+8, Emma Sherratt wrote:

 Dear Miranda,

 Using procD.lm is the correct function for what you want to do. Since you 
 have just two groups it's a simple Procrustes Anova. Your implementation 
 should be:

 procD.lm(shape~ age*group)

 This will give you:

 Effect of age; where significant means the shape scales allometrically

 Effect of group; where significant means the groups differ in intercept 

 The interaction term of age and group to tell you if the two groups have 
 the same slope (interaction term not significant) or the slopes differ (sig 
 interaction term)

 Then from this you will be able to deduce whether the two groups follow 
 the same allometric trajectory or not. But remember, you are dealing with 
 multivariate regression here so there is no positive or negative allometry, 
 since the slope is a multivariate vector in shape space.

 The same formula into trajectory.analysis should then lead you to where 
 you were hoping to go with that.

 Emma

 On Monday, August 24, 2015, Karban, Miranda E miranda-...@uiowa.edu 
 javascript: wrote:

 Hello morphometricians, 

 I am relatively new to morphometrics, and I am attempting to assess 
 ontogenetic trajectories from a longitudinal sample of growth study x-rays. 
 My subjects are divided into 2 groups, and I would like to determine 
 whether there are developmental differences in cranial shape between these 
 groups. I have precise ages for each subject, so I hope to use age as a 
 variable (following McNulty et al., 2006) rather than centroid size. 

  

 From what I gather from the literature, I can estimate ontogenetic 
 trajectories by regressing the Procrustes aligned shape coordinates onto 
 the independent variable of age. So far, I have attempted to do this in the 
 geomorph package in R using the procD.lm and the trajectory.analysis 
 functions. I am wondering if I am doing this correctly, or if there is a 
 better function to use.

  

 I have tried the following:

 lateral.gpa - gpagen(vaultlandmarks)

 procD.lm(two.d.array(lateral.gpa$coords) ~ age, iter = 999)

  

 where “vaultlandmarks” refers to the 2D landmark and semi-landmark 
 coordinates in my tps file, and “age” refers to a column in my metadata csv 
 file which gives the age of each specimen to the nearest 1/10 of a year. 
 This provides a sum-of-squared Procrustes distances, a mean square, and a 
 highly significant p-value. I am not sure, however, how to compare the 
 results I get from the 2 groups. 

  

 When I try the trajectory.analysis function:

 lateral.gpa - two.d.array(gpagen(vaultlandmarks)$coords)

 trajectory.analysis(lateral.gpa~age)

  

 I get the error message: “Error in trajectory.analysis(lateral.gpa ~ age) 
 :   X-matrix does not specify enough model factors (see help file).”

  

 Thank you for any advice or help you might provide.

  

 Best,

 Miranda Karban

 PhD Candidate, University of Iowa

 -- 
 MORPHMET may be accessed via its webpage at http://www.morphometrics.org

 To unsubscribe from this group and stop receiving emails from it, send an 
 email to morphmet+unsubscr...@morphometrics.org.



 -- 

 ~~~

 Emma Sherratt, PhD.

 Lecturer in Zoology,
 Zoology Division, School of Environmental and Rural Science, 
 Room L112 Bldg C02, 
 University of New England, 
 Armidale, NSW, Australia, 2351
 Tel: +61 2 6773 5041
 email: emma.s...@une.edu.au javascript:
 Twitter: @DrEmSherratt

 Caecilians are legless amphibians...

 *  __
 (\   .-.   .-.   /_)
  \\_//^\\_//^\\_//
   ``   ``   ``*

 learn more about them here: www.emmasherratt.com/caecilians






-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org

To unsubscribe from this group and stop receiving emails from it, send an email 
to morphmet+unsubscr...@morphometrics.org.


Re: [MORPHMET] Estimating Ontogenetic Trajectories

2015-08-23 Thread Emma Sherratt
Dear Miranda,

Using procD.lm is the correct function for what you want to do. Since you
have just two groups it's a simple Procrustes Anova. Your implementation
should be:

procD.lm(shape~ age*group)

This will give you:

Effect of age; where significant means the shape scales allometrically

Effect of group; where significant means the groups differ in intercept

The interaction term of age and group to tell you if the two groups have
the same slope (interaction term not significant) or the slopes differ (sig
interaction term)

Then from this you will be able to deduce whether the two groups follow the
same allometric trajectory or not. But remember, you are dealing with
multivariate regression here so there is no positive or negative allometry,
since the slope is a multivariate vector in shape space.

The same formula into trajectory.analysis should then lead you to where you
were hoping to go with that.

Emma

On Monday, August 24, 2015, Karban, Miranda E miranda-utzin...@uiowa.edu
wrote:

 Hello morphometricians,

 I am relatively new to morphometrics, and I am attempting to assess
 ontogenetic trajectories from a longitudinal sample of growth study x-rays.
 My subjects are divided into 2 groups, and I would like to determine
 whether there are developmental differences in cranial shape between these
 groups. I have precise ages for each subject, so I hope to use age as a
 variable (following McNulty et al., 2006) rather than centroid size.



 From what I gather from the literature, I can estimate ontogenetic
 trajectories by regressing the Procrustes aligned shape coordinates onto
 the independent variable of age. So far, I have attempted to do this in the
 geomorph package in R using the procD.lm and the trajectory.analysis
 functions. I am wondering if I am doing this correctly, or if there is a
 better function to use.



 I have tried the following:

 lateral.gpa - gpagen(vaultlandmarks)

 procD.lm(two.d.array(lateral.gpa$coords) ~ age, iter = 999)



 where “vaultlandmarks” refers to the 2D landmark and semi-landmark
 coordinates in my tps file, and “age” refers to a column in my metadata csv
 file which gives the age of each specimen to the nearest 1/10 of a year.
 This provides a sum-of-squared Procrustes distances, a mean square, and a
 highly significant p-value. I am not sure, however, how to compare the
 results I get from the 2 groups.



 When I try the trajectory.analysis function:

 lateral.gpa - two.d.array(gpagen(vaultlandmarks)$coords)

 trajectory.analysis(lateral.gpa~age)



 I get the error message: “Error in trajectory.analysis(lateral.gpa ~ age)
 :   X-matrix does not specify enough model factors (see help file).”



 Thank you for any advice or help you might provide.



 Best,

 Miranda Karban

 PhD Candidate, University of Iowa

 --
 MORPHMET may be accessed via its webpage at http://www.morphometrics.org

 To unsubscribe from this group and stop receiving emails from it, send an
 email to morphmet+unsubscr...@morphometrics.org
 javascript:_e(%7B%7D,'cvml','morphmet%2bunsubscr...@morphometrics.org');
 .



-- 

~~~

Emma Sherratt, PhD.

Lecturer in Zoology,
Zoology Division, School of Environmental and Rural Science,
Room L112 Bldg C02,
University of New England,
Armidale, NSW, Australia, 2351
Tel: +61 2 6773 5041
email: emma.sherr...@une.edu.au
Twitter: @DrEmSherratt

Caecilians are legless amphibians...

*  __
(\   .-.   .-.   /_)
 \\_//^\\_//^\\_//
  ``   ``   ``*

learn more about them here: www.emmasherratt.com/caecilians

-- 
MORPHMET may be accessed via its webpage at http://www.morphometrics.org

To unsubscribe from this group and stop receiving emails from it, send an email 
to morphmet+unsubscr...@morphometrics.org.