alexiajm / legit Goto Github PK
View Code? Open in Web Editor NEWAn R package for the Latent Environmental & Genetic InTeraction (LEGIT) model
License: GNU General Public License v3.0
An R package for the Latent Environmental & Genetic InTeraction (LEGIT) model
License: GNU General Public License v3.0
When there are negative weights in a score, the maximum score is not 1 which complicates interpretation. What we could do is after convergence divide the weights of a score by (maximum possible value - minimal possible values) from the data or a user-given number. This should be an option called "rescale".
Ex: if weight_gene1=.40, weight_gene2=.40, weight_gene1gene2=-.20, then the lowest genetic score is 0 if gene1=0, gene2=0 and the highest score is .40. The rescaled gene weights would thus be weight_gene1_rescaled=1, weight_gene2_rescaled=1, weight_gene1gene2_rescaled=-.50.
Although few people work with longitudinal outcome, we often do at the MAVAN. So I should add a small function to get cross-validated folds and then add an argument in LEGIT_cv to be able to put custom folds.
Hi, thank you for developing such a useful pacakge. I was trying to follow the example(https://cran.r-project.org/web/packages/LEGIT/vignettes/GxE_testing.html). The example ran well
ex_dia = example_with_crossover(N=250, c=0, coef_main = c(3,1,2), sigma=1, seed=7)
GxE_test_BIC = GxE_interaction_test(data=ex_dia$data, genes=ex_dia$G, env=ex_dia$E, formula_noGxE = y ~ 1, crossover = c("min","max"), criterion="BIC")
however, I couldn't use my own data for a GxE testibng. I tried to make my own list including any variabels requied, but it didn't work.
mylist1 <- list("data"=data,"G"=G,"E"=E,coef_G=1,coef_E=1,coef_main = c(3,1,2),c=0) GxE_test_BIC = GxE_interaction_test(data=mylist1$data, genes = mylist1$G, env = mylist1$E, formula_noGxE = y ~ G*E+Age+Edu+Race, crossover = c("min", "max"),criterion = "BIC") GxE_test_BIC$results
for it comes up with the error:
Error in str2lang(x) : :2:0: unexpected end of input 1: y ~ G * E + Age + Edu + Race + ^
Would you tell me any solution about this? Example with real data might be helpful (instead of those generated by example_with_crossover and example_2way)
This is not a priority yet but eventually it might be a good idea to implement a way to create as many scores as desired rather than just two scores (G and E). So we would have S1, ..., Sk scores that can interact in any way. This would make time-varying G and E possible, 3 way with 3 scores possible and lots of other interesting ideas possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.