similar to: GLM for logistic regression and WEIGHTS

Displaying 20 results from an estimated 20000 matches similar to: "GLM for logistic regression and WEIGHTS"

2010 Jul 03
2
logistic regression - glm() - example in Dalgaard's book ISwR
Dear R-list members, I would like to pose a question about the use and results of the glm() function for logistic regression calculations. The question is based on an example provided on p. 229 in P. Dalgaard, Introductory Statistics with R, 2nd. edition, Springer, 2008. By means of this example, I was trying to practice the different ways of entering data in glm(). In his book, Dalgaard
2011 Sep 12
1
coxreg vs coxph: time-dependent treatment
Dear List, After including cluster() option the coxreg (from eha package) produces results slightly different than that of coxph (from survival) in the following time-dependent treatment effect calculation (example is used just to make the point). Will appreciate any explaination / comment. cheers, Ehsan ############################ require(survival) require(eha) data(heart) # create weights
2010 Sep 02
1
Help on glm and optim
Dear all, I'm trying to use the "optim" function to replicate the results from the "glm" using an example from the help page of "glm", but I could not get the "optim" function to work. Would you please point out where I did wrong? Thanks a lot. The following is the code: # Step 1: fit the glm clotting <- data.frame( u =
2012 Sep 29
1
Unexpected behavior with weights in binomial glm()
Hi useRs, I'm experiencing something quite weird with glm() and weights, and maybe someone can explain what I'm doing wrong. I have a dataset where each row represents a single case, and I run glm(...,family="binomial") and get my coefficients. However, some of my cases have the exact same values for predictor variables, so I should be able to aggregate up my data frame and
2006 Feb 27
1
Different deviance residuals in a (similar?!?) glm example
Dear R-users, I would like to show you a simple example that gives an overview of one of my current issue. Although my working setting implies a different parametric model (which cannot be framed in the glm), I guess that what I'll get from the following example it would help for the next steps. Anyway here it is. Firstly I simulated from a series of exposures, a series of deaths (given a
2009 Feb 08
5
glmmBUGS: logistic regression on proportional data
Hello, I am trying to run a logistic regression with random effects on proportional data in glmmBUGS. I am a newcomer to this package, and wondered if anyone could help me specify the model correctly. I am trying to specify the response variable, /yseed/, as # of successes out of total observations... but I suspect that given the error below, that is not correct. Also, Newsect should be a
2006 Jul 19
1
Problem with ordered logistic regression using polr function.
Hi, I'm trying to fit a ordered logistic regression. The response variable (y) has three levels (0,1,2). The command I've used is: /ordlog<-polr(y~x1+x2+x3+x4, data=finalbase, subset=heard, weight=wt, na.action=na.omit) / (There are no NA's in y but there are NA's in X's) The error I'm getting is: /Warning messages: 1: non-integer #successes in a binomial glm! in:
2008 Jan 05
1
Likelihood ratio test for proportional odds logistic regression
Hi, I want to do a global likelihood ratio test for the proportional odds logistic regression model and am unsure how to go about it. I am using the polr() function in library(MASS). 1. Is the p-value from the likelihood ratio test obtained by anova(fit1,fit2), where fit1 is the polr model with only the intercept and fit2 is the full polr model (refer to example below)? So in the case of the
2008 Jul 02
1
survival package test stats
Hello, Is there a function in the survival package that will allow me to test a subset of independent variables for joint significance? I am thinking along the lines of a Wald, likelihood ratio, or F-test. I am using the survreg procedure to estimate my parameters. Thank you. Geoff Geoffrey Smith Visiting Assistant Professor Department of Finance University of Illinois at Urbana-Champaign
2009 May 05
2
Stepwise logistic Regression with significance testing - stepAIC
Hello R-Users,   I have one binary dependent variable and a set of independent variables (glm(formula,…,family=”binomial”) ) and I am using the function stepAIC (“MASS”) for choosing an optimal model. However I am not sure if stepAIC considers significance properties like Likelihood ratio test and Wald test (see example below).     > y <- rbinom(30,1,0.4) > x1 <- rnorm(30) > x2
2006 Apr 16
3
second try; writing user-defined GLM link function
I apologize for my earlier posting that, unbeknownst to me before, apparently was not in the correct format for this list. Hopefully this attempt will go through, and no-one will hold the newbie mistake against me. I could really use some help in writing a new glm link function in order to run an analysis of daily nest survival rates. I've struggled with this for weeks now, and can at least
2005 Feb 20
1
logistic regression and 3PL model
Hello colleagues, This is a follow up to a question I posed in November regarding an analysis I was working on. Thank you to Dr. Brian Ripley and Dr. John Fox for helping me out during that time. I am conducting logistic regression on data set on psi (ESP) ganzfeld trials. The response variable is binary (correct/incorrect), with a 25% guessing base rate. Dr. Ripley suggested that I
2010 Dec 11
2
Specifying Prior Weights in a GLM
Hello R folks, I have three questions. I am trying to run a logistic regression (binomial family) where the response variable is a proportion. According to R Documentation in "a binomial GLM prior weights are used to give the number of trials when the response is the proportion of successes." However when I run my code I get the following error message: Error in
2005 Oct 11
2
Logistic Regression using glm
Hello everyone, I am currently teaching an intermediate stats. course at UCSD Extension using R. We are using Venables and Ripley as the primary text for the course, with Freund & Wilson's Statistical Methods as a secondary reference. I recently gave a homework assignment on logistic regression, and I had a question about glm. Let n be the number of trials, p be the estimated
2006 Sep 03
2
lm, weights and ...
> lm2 <- function(...) lm(...) > lm2(mpg ~ wt, data=mtcars) Call: lm(formula = ..1, data = ..2) Coefficients: (Intercept) wt 37.285 -5.344 > lm2(mpg ~ wt, weights=cyl, data=mtcars) Error in eval(expr, envir, enclos) : ..2 used in an incorrect context, no ... to look in Can anyone explain why this is happening? (Obviously this is a manufactured example, but it
2001 Sep 18
1
case weights-coxph (solved)
Hi, The following function does work optimize.W<-function(W,k,G,Groups,cph.call,z){ n<-length(Groups) grp.wt<-rep(0,n) for(i in 1:(length(G))){ ind<-Groups == G[i] if(G[i]!=k){ grp.wt[ind]<-W[i] } elsegrp.wt[ind]<-1 } z<-data.frame(cbind(z,grp.wt=grp.wt)) #needed to make the case weights #part of the data
2005 Apr 13
1
logistic regression weights problem
Hi All, I have a problem with weighted logistic regression. I have a number of SNPs and a case/control scenario, but not all genotypes are as "guaranteed" as others, so I am using weights to downsample the importance of individuals whose genotype has been heavily "inferred". My data is quite big, but with a dummy example: > status <- c(1,1,1,0,0) > SNPs <-
2013 Feb 03
1
Fractional logit in GLM?
Hi, Does anyone know of a function in R that can handle a fractional variable as the dependent variable? The catch is that the function has to be inclusive of 0 and 1, which betareg() does not. It seems like GLM might be able to handle the fractional logit model, but I can't figure it out. How do you format GLM to do so? Best, Rachael [[alternative HTML version deleted]]
2001 Sep 18
1
case weights in coxph (survival)
Hi, I am having trouble with the survival library, particualrily the coxph function. the following works coxph(jtree9$cph.call,z,rep(1,dim(z)[1])) Call: coxph(formula = jtree9$cph.call, data = z, weights = rep(1, dim(z)[1])) coef exp(coef) se(coef) z p SM 0.2574 1.294 0.0786 3.274 1.1e-03 Sex -0.1283 0.880 0.1809 -0.709
2006 Apr 09
1
logistic regression model with non-integer weights
When fitting a logistic regression model using weights I get the following warning > data.model.w <- glm(ABN ~ TR, family=binomial(logit), weights=WEIGHT) Warning message: non-integer #successes in a binomial glm! in: eval(expr, envir, enclos) Details follow *** I have a binary dependent variable of abnormality ABN = T, F, T, T, F, F, F... and a continous predictor TR = 1.962752