beckyfisher / fssgam Goto Github PK
View Code? Open in Web Editor NEWCode for full subsets model fitting using GA(M)M
Code for full subsets model fitting using GA(M)M
In addition to the relative importance of predictors, is it possible to get their P-values?
Hi,` Becky! I think this code is fantastic, but I'm having trouble getting an output for fit.model.set because I keep getting the following error: 'Error in y_dat[, 1] : incorrect number of dimensions'.
I have tried to follow your examples for constructing the initial model and generating the model set (both of which have successfully given list outputs), but I have had no luck in getting past model fitting. If you can see where I may be going wrong, any guidance would be greatly appreciated!
##### Define Model Variables #####
cont.preds = c("Dist.km", "Depth", "Bathy", "Noise.Level") # Use as continuous predictors.
cat.preds = c("Shipping.Lane", "LightRegime") # Use as categorical predictors.
null.vars = "Transit" # Use as random effect and null model.
##### Fit model set #####
Model1 = uGamm(PresAbs ~ 1,
random =~ (1|Transit),
data = BW,
family = binomial(link = "logit"),
lme4 = TRUE)
model.set = generate.model.set(use.dat = BW,
max.predictors = 6,
test.fit = Model1,
k = 3,
pred.vars.cont = cont.preds,
pred.vars.fact = cat.preds)
out.list = fit.model.set(model.set, max.models = 720)
names(out.list)
There is an issue with fitting the full model set when the family nb() is used. Most models (but not all) appear to fail. Note the same issues occurs in the use of lapply
Does linear.vars need to be in pred.vars or not? Table 1 needs to be clear
I'm trying to make a tutorial based on this data and can't seem to troubleshoot why I'm getting this error for the code following ### now fit the models ---------------------------------------------------------
Any assistance appreciated
Error in names(dat) <- object$term :
'names' attribute [1] must be the same length as the vector [0]
FSSgam currently doesn't support fitting via gamm to allow for a correlation structure because the null model contains no random effects.
Running the code generate.model.set returns the above error message
@beckyfisher What advice can we give on when to report a top model or not?
For example - if a model explains <10% variance should it it even be reported in a table?
Hi, thanks for your code. I'm trying out this method in my analysis, however an error is coming up when I specify factor variables in full.subsets.gam()
This is the error:
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
Seems to coming out from a sort
function
The function runs if I don't specify factors.
Add some error catching around the null.term passed to generate.model.set
When family is passed as an element of a vector, all models fail to fit when parallel is TRUE.
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.