Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A response variable is inversed with explanatory variable in psem function #296

Open
Plant15 opened this issue Feb 4, 2024 · 0 comments

Comments

@Plant15
Copy link

Plant15 commented Feb 4, 2024

Hi,

The d-sep claims from BasiSet function are not the one that are tested with the psem function

Pilosella.DAG <- DAG(Rec_tot__A_num ~ Altitude,
SLA ~ Altitude + Rec_tot__A_num,
Haut_veg ~ Nb_stol + SLA + Altitude,
Nb_stol ~ Altitude + SLA + Rec_tot__A_num,
Nb_cap ~ Nb_stol + Altitude + SLA + Rec_tot__A_num,
nb_fruits ~ Nb_stol + Nb_cap + Haut_veg,
fruits_plant ~ nb_fruits + Nb_stol + Nb_cap + Haut_veg + Altitude + SLA)
basiSet(Pilosella.DAG)

[[1]]
[1] "Altitude" "nb_fruits" "Nb_stol" "Nb_cap" "Haut_veg"

[[2]]
[1] "Rec_tot__A_num" "Haut_veg" "Altitude" "SLA" "Nb_stol"

[[3]]
[1] "Rec_tot__A_num" "nb_fruits" "Altitude" "Nb_stol" "Nb_cap" "Haut_veg"

[[4]]
[1] "Rec_tot__A_num" "fruits_plant" "Altitude" "SLA" "Nb_stol" "Nb_cap" "Haut_veg" "nb_fruits"

[[5]]
[1] "SLA" "nb_fruits" "Altitude" "Rec_tot__A_num" "Nb_stol" "Nb_cap" "Haut_veg"

[[6]]
[1] "Nb_cap" "Haut_veg" "Altitude" "Rec_tot__A_num" "SLA" "Nb_stol"

The line [[6]] would then be a bad independance claim. It should be : Haut_veg ~ Nb_cap + Altitude + SLA + Nb_stol + Rec_tot__A_num

                                                                        Independ.Claim Test.Type  DF Crit.Value P.Value 
                                    nb_fruits ~ Altitude + Haut_veg + Nb_stol + Nb_cap      coef 379     0.5628  0.5739 
               fruits_plant ~ Altitude + SLA + Haut_veg + Nb_stol + Nb_cap + nb_fruits      coef 377    -0.8765  0.3813 
                                  Haut_veg ~ Rec_tot__A_num + Altitude + SLA + Nb_stol      coef 379     1.0874  0.2776 
                   nb_fruits ~ Rec_tot__A_num + Altitude + Haut_veg + Nb_stol + Nb_cap      coef 378     1.4790  0.1400 

fruits_plant ~ Rec_tot__A_num + Altitude + SLA + Haut_veg + Nb_stol + Nb_cap + nb_fruits coef 376 0.2305 0.8178
nb_fruits ~ SLA + Altitude + Rec_tot__A_num + Haut_veg + Nb_stol + Nb_cap coef 377 -1.6421 0.1014
[[6]] Nb_cap ~ Haut_veg + Altitude + SLA + Nb_stol + Rec_tot__A_num coef 378 0.3860 0.6997

Am I right to determine the p value of my dag by doing C test by hand like this?
C.stat<--2*sum(log(p.values))
1-pchisq(C.stat,14)

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant