search for: full_model

Displaying 6 results from an estimated 6 matches for "full_model".

2008 Feb 15
2
help on using try() to catch an error
Dear R Users, I have the following glm, which I am running several times in a loop (I am not including the full code): reduced_model <- NULL; full_model <- NULL; reduced_model <- try(glm.fit(X4,n,family=poisson(link="log"))) full_model <- try(glm.fit(X5,n,family=poisson(link="log"))); On some occasions, an error is produced, which is why I have attempted to work around this with try(). I then have the following statem...
2010 Sep 22
3
extracting random effects from model formula
Hi R-users I would like to extract the random effects ("1|SITE", "1+SPECIES|SITE" and "BA|SITE") from this model formula: Full_model <- formula (VAR ~ (1|SITE) + (1+SPECIES|SITE) + (BA|SITE) + HEIGHT + COND + NN_DIST) I tried: terms(Full_model) labels(terms(Full_model)) but I could not distinguish between random and fixed effects. thanks Lorenzo [[alternative HTML version deleted]]
2008 Feb 20
1
debugging a try() statement
Dear R Users, I implemented a try() statement that looks like: <- function(index) { reduced_model <- try(glm.fit(X4,n,family=poisson(link="log"))) full_model <- try(glm.fit(X5,n,family=poisson(link="log"))) if (inherits(reduced_model,"try-error") || inherits(full_model,"try-error")) return(NA) else { p <- pchisq(reduced_model$deviance - full_model$deviance, reduced_model$df.residual - full_model$df.res...
2011 May 08
1
Hosmer-Lemeshow 'goodness of fit'
...tt -------------------------------- Robert Schutt, MD, MCS Resident - Department of Internal Medicine University of Virginia, Charlottesville, Virginia ------------------ ######################################################## # Compute the Hosmer-Lemeshow 'goodness-of-fit' test cd.full_model = glm(formula = Collaterals ~ CHF + Age + CABG + relevel (as.factor (num.obst.vessels),"one") + Current.smoker + DM + HTN + ace.inhibitor + MI, family = binomial(link = "logit")) hosmerlem = function(y, yhat, g=10) { cutyhat = cut(yhat, breaks = quantile(yhat, prob...
2008 Jan 25
1
increasing speed for permutations of glm
...s of the data and the response (3 way table) and made into a vector counts <- as.vector(table(myData[,index[1]],myData[,index[2]], perm.response)); # Add 1 to any count that = 0. counts[counts == 0] <- 1 reduced_model <- glm.fit(X_red,counts,family=poisson(link="log")) full_model <- glm.fit(X_full,counts,family=poisson(link="log")) pval <- pchisq(reduced_model$deviance - full_model$deviance, reduced_model$df.residual - full_model$df.residual, lower.tail= FALSE) } for (perm in 1:nperm) { # Permute the labels perm.response <- sample(response,100,...
2008 Mar 04
0
Help with RailRoad
When I run this code I don''t hace any problem: railroad -a -i -o full_models.dot -C But if run this code: railroad -a -i -o full_models.dot -M I get this: /Users/juan/Desktop/dticket_4_03_08/vendor/rails/activerecord/lib/active_record/base.rb:1532:in `method_missing_without_paginate'': undefined method `_'' for #<Class:0x251965c> (NoMethodError) fr...