PC1' entry on line 20 of is numeric/'NA', while earlier entries are categorical.

22 views
Skip to first unread message

Ruyu Shi

unread,
Jun 1, 2025, 7:39:10 AM6/1/25
to plink2-users
Hi,

I was trying to run a linear regression using PLINK2, while I received an error message, with the log file pasted below:

Error: 'PC1' entry on line 20 of
./Processed_Data/Phenotype/ADSP-PHC_Amyloid-PET_Qced_NHW-only_Phenotype_for_PLINK.txt
is numeric/'NA', while earlier entries are categorical.
(Case/control and quantitative phenotypes must all be numeric/'NA'.
Categorical phenotypes cannot be 'NA'--use e.g. 'NONE' to represent missing
categorical values instead--or start with a number.)

sed -n '20p' ./Processed_Data/Phenotype/ADSP-PHC_Amyloid-PET_Qced_NHW-only_Phenotype_for_PLINK.txt

ID20 ID20 108 81.18822724 -0.00280814 -0.00275584 -0.00110068 -0.000821707 0.00704252 1 1sed -n '21p' ./Processed_Data/Phenotype/ADSP-PHC_Amyloid-PET_Qced_NHW-only_Phenotype_for_PLINK.txt

ID21 ID21 129 79.2991102 -0.00241613 -0.0016544 -0.00153503 0.00267266 0.0163982 2 1


However, this value is not missing, and I have double-checked all the covariates are either true numeric, or numerical coding for the binary categorical variable. Can you please help me on why I received this error?

I have pasted the first 3 rows for your reference. Thank you.

FID IID PHC_CENTILOIDS PHC_Age_PET_Recode PC1 PC2 PC3 PC4 PC5 sexFemale demented

A A -44 90 -0.00124661 -0.00265519 0.000184422 -0.0017654 -0.00334508 2 0

B B -13 71.67145791 -0.00155753 -0.00311606 0.000195702 0.000177015 -0.00393426 1 0

C C -28 84.96919918 -0.00118443 -0.0035445 -0.000327784 -0.00124596 -0.00453094 2 0

Best regards,

Ruyu

Chris Chang

unread,
Jun 1, 2025, 9:09:16 AM6/1/25
to Ruyu Shi, plink2-users
Please post a full .log file from this run.

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/plink2-users/20e7d9d7-75cb-4039-97c9-749271bf3768n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages