procD.lm: The number of observations in the input and output do not match.
Closed this issue · 3 comments
aConar commented
Hi,
I'm running a simple model with procD.lm, and it works well. My input data is in the form of a geomorph.data.frame, with a numeric matrix Y of 908x8 and a factor of the same length, 908. After running the model, e.g.,
fit1 <- procD.lm(Y ~ SP * SEX, data = GDATA, iter = 4999 )
Cheking:
fit1$LM$n
[1] 705
Why there is a mismatch between the input data and the model data?
Thanks in advance,
Ale
deanadams commented
Ale,
Without seeing the upstream code and possibly the data, that is impossible to determine.
Here is a repeatable example demonstrating that they do line up properly when the upstream components are appropriate:
library(geomorph)
data(plethodon)
Y.gpa <- gpagen(plethodon$land)
gdf <-geomorph.data.frame(shape = Y.gpa$coords, spec = plethodon$species,
site = plethodon$site)
fit <- procD.lm(shape ~ spec * site, data = gdf)
fit$LM$n
dim(gdf$shape)
Dean
Dr. Dean C. Adams
Distinguished Professor of Evolutionary Biology
Department of Ecology, Evolution, and Organismal Biology
Iowa State University
https://faculty.sites.iastate.edu/dcadams/
phone: 515-294-3834
From: Ale ***@***.***>
Sent: Saturday, May 25, 2024 3:39 PM
To: geomorphR/geomorph ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [geomorphR/geomorph] procD.lm: The number of observations in the input and output do not match. (Issue #49)
Hi,
I'm running a simple model with procD.lm, and it works well. My input data is in the form of a geomorph.data.frame, with a numeric matrix Y of 908x8 and a factor of the same length, 908. After running the model, e.g.,
fit1 <- procD.lm(Y ~ SP * SEX, data = GDATA, iter = 4999 )
Cheking:
fit1$LM$n
[1] 705
Why there is a mismatch between the input data and the model data?
Thanks in advance,
Ale
—
Reply to this email directly, view it on GitHub<#49>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABSK7KLFH65M4US2KS4M3CLZEDZGLAVCNFSM6AAAAABIJFI5HGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTOMRSGM2TIMY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
aConar commented
Hi Dean,
The problem was on my data. Some NAs were introduced into the factor while curating the data, so interactions with NAs were excluded from the analysis. Thank you for the quick response!
Kind regards,
Ale
deanadams commented
Glad it was sorted out
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: Ale ***@***.***>
Sent: Monday, May 27, 2024 5:09:26 AM
To: geomorphR/geomorph ***@***.***>
Cc: Adams, Dean [EEOB] ***@***.***>; Comment ***@***.***>
Subject: Re: [geomorphR/geomorph] procD.lm: The number of observations in the input and output do not match. (Issue #49)
Hi Dean,
The problem was on my data. Some NAs were introduced into the factor while curating the data, so interactions with NAs were excluded from the analysis. Thank you for the quick response!
Kind regards,
Ale
—
Reply to this email directly, view it on GitHub<#49 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABSK7KNR4CQPIVYFSLEIG73ZEMA5NAVCNFSM6AAAAABIJFI5HGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZTGEZTSNZSHA>.
You are receiving this because you commented.Message ID: ***@***.***>