similar to: pass list of args to function call

Displaying 20 results from an estimated 30000 matches similar to: "pass list of args to function call"

2010 May 03
2
Estimating theta for negative binomial model
Dear List, I am trying to do model averaging for a negative binomial model using the package AICcmodavg. I need to use glm() since the package does not accept glm.nb() models. I can get glm() to work if I first run glm.nb and take theta from that model, but is there a simpler way to estimate theta for the glm model? The two models are: mod.nb<-glm.nb(mantas~site,data=mydata)
2009 Aug 13
2
glm.nb versus glm estimation of theta.
Hello, I have a question regarding estimation of the dispersion parameter (theta) for generalized linear models with the negative binomial error structure. As I understand, there are two main methods to fit glm's using the nb error structure in R: glm.nb() or glm() with the negative.binomial(theta) family. Both functions are implemented through the MASS library. Fitting the model using these
2010 Jul 09
1
Appropriate tests for logistic regression with a continuous predictor variable and Bernoulli response variable
I have a data with binary response variable, repcnd (pregnant or not) and one predictor continuous variable, svl (body size) as shown below. I did Hosmer-Lemeshow test as a goodness of fit (as suggested by a kind “R-helper” previously). To test whether the predictor (svl, or body size) has significant effect on predicting whether or not a female snake is pregnant, I used the differences between
2006 Dec 13
1
Curious finding in MASS:::confint.glm() tied to eval()
Greetings all, I was in the process of creating a function to generate profile likelihood confidence intervals for a proportion using a binomial glm. This is a component of a larger function to generate and plot confidence intervals for proportions using the above, along with bootstrap (BCa), Wilson and Exact to visually demonstrate the variation across the methods to some folks. I had initially
2011 Oct 12
1
monotonic factors
Hello all, I have an ordered factor that I would like to include in the linear predictor of a binomial glm, where the estimated coefficients are constrained to be monotonic. Does anyone know how to do this? I've tried using an ordered factor but this does not have the desired effect, an (artificial) example of this follows; n <- 100 strings <- sample(c("low",
2013 Jan 09
1
Need an advise for bayesian estimate
Hi R bayesians, I need an advise how to resolve the two different estimates applying a traditional glm (TG) and a bayes glm (BG), and different results depending on the data formats of response data and the prior specs using bayesglm in R. I'm not familiar with bayes estimate and my colleague asked me to look into this because the EPA from France reported a quite different estimates for
2008 Sep 22
2
Coefficients, OR and 95% CL
Dear R-users, After running a logistic regression, I need to calculate OR by exponentiating the coefficient, and then I need the 95% CL for the OR as well. For the following example (taken from P. Dalaagard's book), what would be the most straightforward method of getting what I need? Could anyone enlight me please? Thank you! Lucho > summary(glm(menarche~age,binomial)) Call:
2017 Oct 10
2
Power test binominal GLM model
Dear All I have run the following GLM binominal model on a dataset composed by the following variables: TRAN_DURING_CAMP_FLG enviados bono_recibido 0 1 benchmark 0 1 benchmark 0 1 benchmark 0 1 benchmark 0 1 benchmark 0 1
2005 Mar 07
1
generalised linear models
To whom this may concern, I would be very grateful if someone could give me some advice on where I am going wrong with a logistic regression I am trying to run. I am trying to run a logistic regression on an aggregated data set and have input the command: logistic.mod<-glm(x~Frequency+Location+Sex+Age.Group,family=binomial(link="logit"),data=earsag1.dat) where x is the count of my
2007 May 07
1
Simple question about function with glm
Dear all, I coded a function called u.glm u.glm <- function (x,ahi,age,bmiz,gender) { library(nortest) lil.rslt <- lillie.test(x) if (lil.rslt$p.value >0.05) { cat("Logtrans=0, lillie=",lil.rslt$p.value,"\n") xmodel<-glm(x~ahi+age+bmiz+as.factor(gender)) summary(xmodel) confint(xmodel) } else { cat("Logtrans=1,
2008 Dec 15
5
OT: (quasi-?) separation in a logistic GLM
Dear List, Apologies for this off-topic post but it is R-related in the sense that I am trying to understand what R is telling me with the data to hand. ROC curves have recently been used to determine a dissimilarity threshold for identifying whether two samples are from the same "type" or not. Given the bashing that ROC curves get whenever anyone asks about them on this list (and
2010 Jul 07
1
Different goodness of fit tests leads to contradictory conclusions
I am trying to test goodness of fit for my legalistic regression using several options as shown below.  Hosmer-Lemeshow test (whose function I borrowed from a previous post), Hosmer–le Cessie omnibus lack of fit test (also borrowed from a previous post), Pearson chi-square test, and deviance test.  All the tests, except the deviance tests, produced p-values well above 0.05.  Would anyone please
2002 Apr 15
1
glm link = logit, passing arguments
Hello R-users. I haven't use R for a life time and this might be trivial - I hope you do not mind. I have a questions about arguments in the Glm-function. There seems to be something that I cannot cope. The basics are ok: > y <- as.double(rnorm(20) > .5) > logit.model <- glm(y ~ rnorm(20), family=binomial(link=logit), trace = TRUE) Deviance = 28.34255 Iterations - 1
2012 Sep 13
1
AICcmodavg
I am using the AICmodavg package and using R version 2.15.1. I need help with code that is instead being read as text. Below is a subset of code... I actually have 12 models, but I am trying to get this to work for 2 below right now. Everything 'appears' to work through the line starting with Modnames. After that the code starting with aictab and beyond is recognized as text and not
2010 Sep 26
1
formatting data for predict()
I'm trying to get predicted probabilities out of a regression model, but am having trouble with the "newdata" option in the predict() function. Suppose I have a model with two independent variables, like this: y=rbinom(100, 1, .3) x1=rbinom(100, 1, .5) x2=rnorm(100, 3, 2) mod=glm(y ~ x1 + x2, family=binomial) I can then get the predicted probabilities for the two values of
2010 Sep 24
1
Standard Error for difference in predicted probabilities
Is there a way to estimate the standard error for the difference in predicted probabilities obtained from a logistic regression model? For example, this code gives the difference for the predicted probability of when x2==1 vs. when x2==0, holding x1 constant at its mean: y=rbinom(100,1,.4) x1=rnorm(100, 3, 2) x2=rbinom(100, 1, .7) mod=glm(y ~ x1 + x2, family=binomial) pred=predict(mod,
2011 Jan 12
1
how to change strip text of effect plot
Dear r heper, How can I change the strip text, for example (16,23] in the following example, to other more informative text such as "high level" on the fly? library(effects) Cowles$ex2 <- cut(Cowles$extraversion,3) mod.cowles <- glm(volunteer ~ sex+neuroticism*ex2,data=Cowles, family=binomial) eff.cowles <- allEffects(mod.cowles) plot(eff.cowles,
2011 Oct 04
1
Rug plot curve reversal
Dear R-help Can anyone tell me why my curve appears the wrong way round on a rug plot? I am using the same code as on pg 596 of the Crawley R-book. mod<-glm(mort~logBd,binomial) par(mfrow=c(2,2)) xv<-seq(0,8,0.01) yv<-predict(mod,list(logBd=xv),type="response") plot(logBd,mort) lines(xv,yv) I've tried swapping xv and yv around but no luck. Thanks, Pete
2013 Jan 29
1
Finding predicted probabilities and their confidence intervals for a logit model
I want to construct a logit model, plot the probability curve with the confidence intervals, and then I want to print out a data frame with the predictor, response value, predicted value, the low ci predicted value, and the high ci predicted value. So it should look something like: value low_ci prob hi_ci 5 0.10 0.12 0.13 6 0.11 0.13 0.16 7 0.13 0.15
2010 Mar 30
3
From THE R BOOK -> Warning: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
Dear friends, I am testing glm as at page 514/515 of THE R BOOK by M.Crawley, that is on proportion data. I use glm(y~x1+,family=binomial) y is a proportion in (0,1), and x is a real number. I get the error: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm! But that is exactly what was suggested in the book, where there is no mention of a similar warning. Where am I