Re: [R] glm with family binomial and link identity

2022-04-28 Thread Martin Maechler
TLDR: No, there was no such change in R 4.2.0 > Ralf Goertz > on Wed, 27 Apr 2022 10:27:33 +0200 writes: > Hi, > I just noticed that (with my version 4.2.0) it is no longer possible to > use glm with family=binomial(link=identity). Why is that? It was > possible

Re: [R] glm with family binomial and link identity

2022-04-28 Thread Ralf Goertz
> Am Wed, 27 Apr 2022 10:27:33 +0200 schrieb Ralf Goertz > > > Hi, > > > > I just noticed that (with my version 4.2.0) it is no longer possible > > to use glm with family=binomial(link=identity). Why is that? It was > > possible with 4.0.x as a colleague of mine just confirmed. After all > > it

Re: [R] glm with family binomial and link identity

2022-04-27 Thread Ralf Goertz
Am Wed, 27 Apr 2022 10:27:33 +0200 schrieb Ralf Goertz : > Hi, > > I just noticed that (with my version 4.2.0) it is no longer possible > to use glm with family=binomial(link=identity). Why is that? It was > possible with 4.0.x as a colleague of mine just confirmed. After all > it is useful to

[R] glm with family binomial and link identity

2022-04-27 Thread Ralf Goertz
Hi, I just noticed that (with my version 4.2.0) it is no longer possible to use glm with family=binomial(link=identity). Why is that? It was possible with 4.0.x as a colleague of mine just confirmed. After all it is useful to compute risk differences with factors.

Re: [R] GLM model with spatialspillover on categorical variables

2020-06-04 Thread Bert Gunter
You should post on r-sig-geo, the list devoted to spatial data analysis, rather than here. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Jun 4, 2020 at

[R] GLM model with spatialspillover on categorical variables

2020-06-04 Thread Lena Fehlhaber
I did a regression analysis with categorical data with a glm model approach, which worked fine. I have longitude and latitude coordinates for each observation and I want to add their geographic spillover effect to the model. My sample data is structured: Index DV IVI IVII IVIII IVIV Long Lat 1

Re: [R] GLM Model Summary

2018-10-16 Thread Marc Schwartz via R-help
> On Oct 16, 2018, at 12:33 PM, Neslin, Scott A. > wrote: > > R-Help: > > We are working with your GLM R package. The Summary(Model) now gets printed > by the program as one object and we want to put the coefficient columns into > Excel. We took an initial stab at this by counting the

Re: [R] GLM Model Summary

2018-10-16 Thread Amit Mittal
You can just use 'slotNames(modelname) This will return sub objects for which names can be extracted Eg slotNames(modelname) [1] "mfit" "model" names(modelname@mfit) names(modelname@model) Will return all objects within the model including coed car R cover vcov as applicable and you can store

Re: [R] GLM Model Summary

2018-10-16 Thread Peter Langfelder
The coefficients are best obtained as summary(Model)$coefficients. This is a matrix can than be saved as a csv file and opened in excel or other spreadsheet software. HTH, Peter On Tue, Oct 16, 2018 at 9:44 AM Neslin, Scott A. wrote: > > R-Help: > > We are working with your GLM R package. The

Re: [R] GLM Model Summary

2018-10-16 Thread Duncan Murdoch
On 16/10/2018 12:33 PM, Neslin, Scott A. wrote: R-Help: We are working with your GLM R package. The Summary(Model) now gets printed by the program as one object and we want to put the coefficient columns into Excel. We took an initial stab at this by counting the number of characters

[R] GLM Model Summary

2018-10-16 Thread Neslin, Scott A.
R-Help: We are working with your GLM R package. The Summary(Model) now gets printed by the program as one object and we want to put the coefficient columns into Excel. We took an initial stab at this by counting the number of characters occupied by each column. But we have now learned that

Re: [R] glm package - Negative binomial regression model - Error

2018-02-26 Thread Paula Couto
Thank you so much, Thierry!! I will try that now and see if that solves the issue Bests, Paula On Feb 26, 2018 03:02, "Thierry Onkelinx" wrote: Dear Paula, There are probably missing observations in your data set. Read the na.action part of the glm help file.

Re: [R] glm package - Negative binomial regression model - Error

2018-02-26 Thread Thierry Onkelinx
Dear Paula, There are probably missing observations in your data set. Read the na.action part of the glm help file. na.exclude is most likely what you are looking for. Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR

[R] glm package - Negative binomial regression model - Error

2018-02-25 Thread Paula Couto
HI there I am running this model in negative binomial regression, using glm. I had no problems with running the model with a set of data, but now that i'm trying to run if for new one. I always have this same error when running the regression: > > #Run Regression >

Re: [R] glm$effects

2018-01-12 Thread Bert Gunter
See ?effects Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jan 12, 2018 at 10:44 AM, Cade, Brian wrote: > I know I must

[R] glm$effects

2018-01-12 Thread Cade, Brian
I know I must be missing something obvious, but checking help and googling a bit did not turn up a useable answer. When I've estimated a glm() model object (my example is with just identity link with gaussian family so I could have used lm() instead), one of the terms returned in the model object

[R] glm and stepAIC selects too many effects

2017-06-06 Thread Marc Girondot via R-help
This is a question at the border between stats and r. When I do a glm with many potential effects, and select a model using stepAIC, many independent variables are selected even if there are no relationship between dependent variable and the effects (all are random numbers). Do someone has

Re: [R] R glm function ignores some predictor variables

2017-03-28 Thread peter dalgaard
> On 27 Mar 2017, at 17:23 , Gabrielle Perron > wrote: > > Hi, > > > This is my first time using this mailing list. I have looked at the posting > guide, but please do let me know if I should be doing something differently. Avoid sending in HTML. It's not

Re: [R] R glm function ignores some predictor variables

2017-03-28 Thread Jim Lemon
Hi Gabrielle, With that number of binary predictors it would be no surprise if some were linear combinations of others. Jim On Tue, Mar 28, 2017 at 2:23 AM, Gabrielle Perron wrote: > Hi, > > > This is my first time using this mailing list. I have looked at the

[R] R glm function ignores some predictor variables

2017-03-28 Thread Gabrielle Perron
Hi, This is my first time using this mailing list. I have looked at the posting guide, but please do let me know if I should be doing something differently. Here is my question, I apologize in advance for not being able to provide example data, I am using very large tables, and what I am

Re: [R] GLM and POST HOC test INTERPRETATION

2017-02-08 Thread Bert Gunter
Your questions are basically statistical and therefore OT here, although some kind soul may respond. I would strongly suggest that you consult with a local statistical expert, as you seem to be out of your depth statistically. Cheers, Bert Bert Gunter "The trouble with having an open mind is

[R] GLM and POST HOC test INTERPRETATION

2017-02-08 Thread CHIRIBOGA Xavier
Dear colleagues, I am analyzing a data set of 68 values (integers). In some treatments (exactly 6) the values are "zero". Because I record 0 in my measurement (or really a small value below zero) My experiment is designed in such a way that I record values for 6 treatments at 2 times.

Re: [R] GLM HELP NEEDED!

2017-02-01 Thread David Winsemius
> On Feb 1, 2017, at 5:28 AM, CHIRIBOGA Xavier > wrote: > > Dear colleagues, > > > I am trying to perform a GLM. I tried again without using attach()...but > still is not working. > > Do you have any idea to help me? > > > Thank you again, > > > Xavier > >

Re: [R] GLM HELP NEEDED!

2017-02-01 Thread Duncan Murdoch
On 01/02/2017 8:28 AM, CHIRIBOGA Xavier wrote: Dear colleagues, I am trying to perform a GLM. I tried again without using attach()...but still is not working. Do you have any idea to help me? Thank you again, Xavier a <- read.table(file.choose(), h<-T) The "h<-T" argument doesn't

[R] GLM HELP NEEDED!

2017-02-01 Thread CHIRIBOGA Xavier
Dear colleagues, I am trying to perform a GLM. I tried again without using attach()...but still is not working. Do you have any idea to help me? Thank you again, Xavier a <- read.table(file.choose(), h<-T) > head(a) time treatment transinduc 11 CHA0+Db 1,0768 21

Re: [R] GLM output problem

2016-09-01 Thread Anderson Eduardo
Embarrassing but that's true. I wrote 'binamial' instead of 'binomial'. I tried now with the correct spelling and everything is ok, in fact. > summary(GLM) Call: glm(formula = model, family = binomial(link = logit)) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept)

Re: [R] GLM output problem

2016-09-01 Thread peter dalgaard
>> And use the parameters returned by GLM to contruct an equation for the >> regression model: >> >> model.eq = -0.446078 + 0.267673*x - 0.014577*I(x^2) > > ## Not what I got with your data. I got: > > Coefficients: > (Intercept)x I(x^2) > -18.5750 5.0403 -0.2845

Re: [R] GLM output problem

2016-08-31 Thread Bert Gunter
Inline. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Aug 31, 2016 at 10:03 AM, Anderson Eduardo wrote: > Hello > > I

[R] GLM output problem

2016-08-31 Thread Anderson Eduardo
Hello I have started to work with GLM and I am facing the following problem: If I take: y = c(0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0) x = 1:18 model = y ~x + I(x^2) GLM = glm(model, family=binamial(link = logit)) And use the parameters returned by GLM to contruct an equation for

[R] GLM: include observations with missing explanatory variables

2015-12-29 Thread Frank van Berkum
Hi all, My problem is the following. Suppose I have a dataset with observations Y and explanatory variables X1, ..., Xn, and suppose one of these explanatory variables is geographical area (of which there are ten, j=1,...,10). For some observations I know the area, but for others it is

Re: [R] GLM: include observations with missing explanatory variables

2015-12-29 Thread David Winsemius
> On Dec 29, 2015, at 5:33 AM, Frank van Berkum > wrote: > > Hi all, > My problem is the following. > Suppose I have a dataset with observations Y and explanatory variables X1, > ..., Xn, and suppose one of these explanatory variables is geographical area > (of

Re: [R] GLM: include observations with missing explanatory variables

2015-12-29 Thread Rolf Turner
On 30/12/15 02:33, Frank van Berkum wrote: Hi all, My problem is the following. Suppose I have a dataset with observations Y and explanatory variables X1, ..., Xn, and suppose one of these explanatory variables is geographical area (of which there are ten, j=1,...,10). For some observations I

Re: [R] glm help

2015-08-21 Thread Joaquín Aldabe
Thankyou all by the comments and sorry for not sending in the adequate format. I don't have the chance to make txt archives as open office doesn't do it. I'm attaching the data in excel. Please let me know if this is ok. The graph that is wierd to me is the BBSA vs AMGP. It is supposed that AMGP

Re: [R] glm help

2015-08-21 Thread Bert Gunter
Inline. -- Bert Bert Gunter Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. -- Clifford Stoll On Thu, Aug 20, 2015 at 10:47 PM, Peter Langfelder peter.langfel...@gmail.com wrote: On Thu, Aug 20, 2015 at 10:04 PM, Bert Gunter

Re: [R] glm help

2015-08-21 Thread Peter Langfelder
Thanks for the correction, I learned something new. Peter On Fri, Aug 21, 2015 at 7:32 AM, Bert Gunter bgunter.4...@gmail.com wrote: Inline. -- Bert Bert Gunter Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. -- Clifford Stoll On Thu,

Re: [R] glm help

2015-08-21 Thread David Winsemius
.csv format is still not accepted by the server. When I say it needs to be a .txt file I mean it it needs to be a .txt file. You need to change its extension to .txt to prevent your mail client from labeling it as csv which is a different type even though I, too, would have thought they

Re: [R] glm help

2015-08-21 Thread Joaquín Aldabe
Thanks. Here is in csv format. Cheers, Joaquín. 2015-08-21 12:49 GMT-03:00 Don McKenzie d...@uw.edu: You can save to .csv from OpenOffice. Sent from my iPad On Aug 21, 2015, at 4:45 AM, Joaquín Aldabe joaquin.ald...@gmail.com wrote: Thankyou all by the comments and sorry for not

Re: [R] glm help

2015-08-20 Thread David Winsemius
On Aug 19, 2015, at 8:54 AM, Joaquín Aldabe joaquin.ald...@gmail.com wrote: Dear All, I´m running a glm with poisson errors and have a doubt when ploting the predicted values. One of my variables has a positive slope in the summary output, but when I plot the predicted values on the

Re: [R] glm help

2015-08-20 Thread Bert Gunter
Inline. Cheers, Bert Bert Gunter Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. -- Clifford Stoll On Thu, Aug 20, 2015 at 9:06 PM, David Winsemius dwinsem...@comcast.net wrote: On Aug 19, 2015, at 8:54 AM, Joaquín Aldabe

Re: [R] glm help

2015-08-20 Thread Peter Langfelder
On Thu, Aug 20, 2015 at 10:04 PM, Bert Gunter bgunter.4...@gmail.com wrote: I noticed you made two data-frames, ‘my4s' and ‘my4S'. The `my4S` was built with `cbind` which would create a matrix (probably a character matrix) rather than a data frame. False. There is a data.frame method for

[R] glm help

2015-08-19 Thread Joaquín Aldabe
Dear All, I´m running a glm with poisson errors and have a doubt when ploting the predicted values. One of my variables has a positive slope in the summary output, but when I plot the predicted values on the original plot it draws a line with negative slope. I appreciate your comments on this and

Re: [R] glm help - final predictor variable NA

2015-07-22 Thread Ben Bolker
matthewjones43 matthew.jones at kellogg.ox.ac.uk writes: Hi, I am not a statistician and so I am sure whatever it is I am doing wrong must be an obvious error for those who are...Basically I can not understand why I get NA for variable 'CDSTotal' when running a glm? Does anyone have an

[R] glm help - final predictor variable NA

2015-07-21 Thread matthewjones43
Hi, I am not a statistician and so I am sure whatever it is I am doing wrong must be an obvious error for those who are...Basically I can not understand why I get NA for variable 'CDSTotal' when running a glm? Does anyone have an idea of why this might be happening? Call: glm(formula =

Re: [R] glm help - final predictor variable NA

2015-07-21 Thread Don McKenzie
On Jul 21, 2015, at 7:30 PM, Rolf Turner r.tur...@auckland.ac.nz wrote: Psigh! Why do people think that it is perfectly OK to undertake statistical analyses without knowing or understanding any statistics? (I guess it's slightly less dangerous than undertaking to do your own wiring

Re: [R] glm help - final predictor variable NA

2015-07-21 Thread Rolf Turner
Psigh! Why do people think that it is perfectly OK to undertake statistical analyses without knowing or understanding any statistics? (I guess it's slightly less dangerous than undertaking to do your own wiring without knowing anything about being an electrician, but still ) However, to

Re: [R] GLM: What is a good way for dealing with new factor levels in the test set?

2015-05-04 Thread thuksu
For anyone who is looking for an answer to this in the future... I went for imputation. It's a way of filling in missing variables based off of what you see elsewhere in the data. Myself, I simply took a sample of the categorical from the rest of the test set. Some may argue that this is

Re: [R] GLM: What is a good way for dealing with new factor levels in the test set?

2015-04-30 Thread Jim Lemon
Hi thuksu, Would defining the factor in your training set with all the levels that occur in the test set solve the problem? That is, there would be at least one factor level in the training set even though there were no instances of that factor. Jim On Thu, Apr 30, 2015 at 8:05 AM, thuksu

Re: [R] GLM: What is a good way for dealing with new factor levels in the test set?

2015-04-30 Thread thuksu
Hi, Thanks for the reply! I did try this... # res is a data frame levels(res$mytypeid.f) - c(levels(res$mytypeid.f),mynewlevel) logreg - glm(yesno ~ mytypeid.f + amount, data=res, family=binomial) exp(coef(logreg)) # this result shows that the new level is not included in the regression. it's

[R] GLM: What is a good way for dealing with new factor levels in the test set?

2015-04-29 Thread thuksu
My training set and my test set have some factor levels that are different It's rare, but it occurs. What is a good way for dealing with this? I don't want to throw away the entire row from the data frame, because there is some valuable information in there. Is there some way to say

[R] GLM course in Palm Cove

2015-04-23 Thread Highland Statistics Ltd
Apologies for cross-posting We would like to announce the following statistics course in Palm Cove, Australia. Course1: GLM with R (Bayesian and frequentist) Location: Palm Cove, Australia Date: 11-14 August 2015 Price: 475 GBP Course website:

[R] glm in hdlm?

2015-03-19 Thread Stanislav Aggerwal
I am following the example in the vignette for hdlm (p. 19), but I cannot get it to to fit a logistic. For those who don't know the package, it allows one to fit high dimensional data where the number of variables may exceed the number of cases. library(hdlm) LMFUN - function(x,y) return(glm(y ~

Re: [R] GLM for proportional data

2015-01-24 Thread Bert Gunter
wrong list. Post on stats.stackexchange.com -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. Clifford Stoll On Sat, Jan 24, 2015 at 1:53 AM, Mauricio Gomes

[R] glm - rgamma vector as predictor

2014-10-08 Thread Wim Kreinen
I have a strange question concerning the fit of a Gamma generalized linear model with glm (and further using gamma.shape to measure the shape parameter). Actually, I started with rgamma to generate some random vectors because I wanted to play around with various conditions (and become familiar

Re: [R] glm - rgamma vector as predictor

2014-10-08 Thread Ben Bolker
Wim Kreinen wkreinen at gmail.com writes: [snip] Actually, I started with rgamma to generate some random vectors because I wanted to play around with various conditions (and become familiar with gamma shape). But before you can start with gamma shape you need to have a glm object.

Re: [R] GLM Help

2014-09-04 Thread peter dalgaard
I think you are looking for ~ Region + Region:Helpers - 1 a.k.a. ~ Region/Helpers - 1 Notice that these are actually the same model as your glm3 (and also as ~Region*Helpers), only the parametrization differs. The latter includes an overall Helpers term so that the interaction coefficients

[R] GLM Help

2014-09-03 Thread Kathy Haapala
Hi all, I have a large set of data that looks something like this, although this data frame is much smaller and includes made up numbers to make my question easier. x.df - data.frame(Region = c(A, A, A, A, A, B, B, B, B, B, B, C, C, C, C), Group_ID = c(1:15), No_Offspring = c(3, 0, 4, 2, 1,

[R] GLM using truncated lognormal distribution

2014-04-26 Thread Marc Girondot
Dear honorable list-members, I know how to fit a truncated lognormal distribution (or Gaussian) (example here: http://max2.ese.u-psud.fr/epc/conservation/Girondot/Publications/Blog_r/Entrees/2012/5/24_Adjust_a_truncated_lognormal_distribution.html ) but I would like to use it in the context of

Re: [R] GLM vs GAM

2014-03-14 Thread Simon Wood
I am wondering whether anyone could explain what'd be the difference between running a 'generalized additive regression' versus 'generalized linear regression' with splines. The smooth terms in mgcv::gam are represented using *penalized* regression splines, with the degree of penalization

[R] GLM vs GAM

2014-03-13 Thread Ehsan Karim
Dear R-list, I am wondering whether anyone could explain what'd be the difference between running a 'generalized additive regression' versus 'generalized linear regression' with splines.  Are they same models theoretically? My apologies if this is a silly question. Any comments or direction

[R] GLM with Numeric and Factor as an Input

2014-02-25 Thread Lorenzo Isella
Dear All, Please consider the snippet at the end of the email. It is representative of the problems I am experiencing. I am trying to use glm (without using the formula interface because the original data is quite large) to model the response in a case where the predictors are a mix of

Re: [R] GLM with Numeric and Factor as an Input

2014-02-25 Thread Rolf Turner
On 26/02/14 01:40, Lorenzo Isella wrote: Dear All, Please consider the snippet at the end of the email. It is representative of the problems I am experiencing. I am trying to use glm (without using the formula interface because the original data is quite large) to model the response in a case

Re: [R] GLM weights for the Poisson family

2014-02-06 Thread Milan Bouchet-Valat
I think you should have a look at svyglm() from the survey package. My two cents Le mercredi 05 février 2014 à 14:41 +1300, Rolf Turner a écrit : You should direct your inquiry to R-help, not to me personally. I am taking the liberty of cc-ing my reply back to the list. I really haven't

Re: [R] GLM weights for the Poisson family

2014-02-04 Thread David Winsemius
On Feb 3, 2014, at 11:12 PM, IamRandom wrote: I am running a simple example of GLM. If I include weights when family=poisson then the weights are calculated iteratively and $weights and $prior.weights return different values. The $prior.weights are what I supplied and $weights are the

Re: [R] GLM weights for the Poisson family

2014-02-04 Thread Rolf Turner
On 04/02/14 20:12, IamRandom wrote: I am running a simple example of GLM. If I include weights when family=poisson then the weights are calculated iteratively and $weights and $prior.weights return different values. The $prior.weights are what I supplied and $weights are the posterior

Re: [R] GLM weights for the Poisson family

2014-02-04 Thread Rolf Turner
You should direct your inquiry to R-help, not to me personally. I am taking the liberty of cc-ing my reply back to the list. I really haven't the time at the moment to think the issue through thoroughly, but off the top of my head: If you are going to use weighted log likelihoods then any

[R] GLM weights for the Poisson family

2014-02-03 Thread IamRandom
I am running a simple example of GLM. If I include weights when family=poisson then the weights are calculated iteratively and $weights and $prior.weights return different values. The $prior.weights are what I supplied and $weights are the posterior weights of the IWLS. If I include weights

[R] GLM: Defining non-constant variance for (gaussian) family

2013-10-07 Thread Christoph Häni
Dear all, I want to fit some observations Y to a set of predictor variables X_i. (and proceed with model selection with support of the second-order AIC (AICc)...) I (think I) know that the distribution of Y[i] is Gaussian and has a variance, which is proportional to its value Y[i]. Say: x1 -

Re: [R] GLM result output..

2013-09-15 Thread Lutfor Rahman
Thanks for that. Still I am a bit confused. Please advice me. Now, I have got minimal adequate model keeping all the those significant predictors in the model which is shown below: Coefficients: Estimate Std. Error z value Pr(|z|) (Intercept)

Re: [R] GLM result output..

2013-09-15 Thread David Winsemius
On Sep 15, 2013, at 2:15 AM, Lutfor Rahman wrote: Thanks for that. Still I am a bit confused. Please advice me. Now, I have got minimal adequate model keeping all the those significant predictors in the model which is shown below: Coefficients: Estimate Std.

Re: [R] GLM result output..

2013-09-13 Thread David Winsemius
On Sep 13, 2013, at 9:38 AM, Lutfor Rahman wrote: Dear forum members, Please help me understanding significance value when GLM done in r. After doing minimal adequate model, I have found a number of independent values which are significant. But doing their anova significant values are

[R] GLM result output..

2013-09-13 Thread Lutfor Rahman
Dear forum members, Please help me understanding significance value when GLM done in r. After doing minimal adequate model, I have found a number of independent values which are significant. But doing their anova significant values are different. Please find my result following. Which

Re: [R] GLM with Binomial Distribution

2013-07-24 Thread Bob O'Hara
The model is including the extra terms, but they are folded into, well, somewhere. The -1 only removes the intercept from the Time effect: the other factors still have to be contrasts to something. Doesn't Crawley's book explain this? If not, I wrote a paper a few years ago that might help:

[R] GLM with Binomial Distribution

2013-07-23 Thread Leif Rasmuson
Hi All, I am working on re-analyzing per a reviewers request. The goal of the project was to determine if the presence of predatory fishes caused female crabs to delay the release of larvae. Number of releases were recorded at three time periods: 1 hour before the simulated tide, 3 hours

Re: [R] glm - change offset to avoid NA?

2013-07-16 Thread Hermann Norpois
I did not think of something like try. I thouht that there should always be a value if I do a logistic regression but sometimes the values are far from being meaningful. So there is a cut-off. My plan was to change the cut-off. Thanks Johannes 2013/7/15 Bert Gunter gunter.ber...@gene.com I

Re: [R] glm - change offset to avoid NA?

2013-07-16 Thread David Winsemius
On Jul 16, 2013, at 8:52 AM, Hermann Norpois wrote: I did not think of something like try. I thouht that there should always be a value if I do a logistic regression but sometimes the values are far from being meaningful. So there is a cut-off. That seems implausilbe. I think you are just

[R] glm - change offset to avoid NA?

2013-07-15 Thread Hermann Norpois
Hello, I use glm within a function testing for the appearence of the coexistence of (minor allels in a subset of) snps. And then I extract the Pr(|z|)-value for the interaction. Principally it works but sometimes the function stops because this value for the interaction is NA. For instance,

Re: [R] glm - change offset to avoid NA?

2013-07-15 Thread Bert Gunter
I think what you want is ?try ##or ?tryCatch ## The second is more flexible but slightly more complicated. to trap the error and perhaps refit the model without interaction? Cheers, Bert On Mon, Jul 15, 2013 at 10:45 AM, Hermann Norpois hnorp...@gmail.com wrote: Hello, I use glm within a

Re: [R] glm and lm can't find weights

2013-03-13 Thread Dimitri Liakhovitski
Thanks a lot, Marc! Dimitri On Mon, Mar 11, 2013 at 4:28 PM, Marc Schwartz marc_schwa...@me.com wrote: On Mar 11, 2013, at 1:46 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello, and apologies for not providing an example. However, my question is more general. I

[R] glm and lm can't find weights

2013-03-11 Thread Dimitri Liakhovitski
Hello, and apologies for not providing an example. However, my question is more general. I have a lengthy function. This function is using another internal function that modifies the data frame I am reading in. This internal function is using the command model.frame (with data and weights inside)

Re: [R] glm and lm can't find weights

2013-03-11 Thread Marc Schwartz
On Mar 11, 2013, at 1:46 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello, and apologies for not providing an example. However, my question is more general. I have a lengthy function. This function is using another internal function that modifies the data frame I am

Re: [R] glm poisson and quasipoisson

2013-02-01 Thread Ivan-K
I am sure, that this is not a pure Poisson! Huge overdispersion! You get inflated confidence intervals! (although, the point estimates of the regression coefficients stay the same) Try to look for the causes of overdispersion! It may be geteroscedastisity? What is the nature of the response, is

Re: [R] glm poisson and quasipoisson

2013-02-01 Thread ilai
On Thu, Jan 31, 2013 at 2:13 PM, Wim Kreinen wkrei...@gmail.com wrote: Hello, I have a question about modelling via glm. I think you are way off track. Either the data, glm, or both, are not what you think they are. I have a dataset skn300.tab - structure(list(n = 1:97, freq = c(0L, 0L,

[R] glm poisson and quasipoisson

2013-01-31 Thread Wim Kreinen
Hello, I have a question about modelling via glm. I have a dataset (see dput) that looks like as if it where poisson distributed (actually I would appreciate that) but it isnt because mean unequals var. mean (x) [1] 901.7827 var (x) [1] 132439.3 Anyway, I tried to model it via poisson and

Re: [R] GLM Modelling help needed

2013-01-14 Thread Oliver Keyes
So, with R you use object[int,int] to select the rows and columns you want to highlight. ([rows,columns]); what you've done here is asked it to apply to rows 1 to 2 (1:2), across all columns. You'll want [,3:4] to specify two particular columns. I'm not familiar enough with glm itself to provide

[R] GLM Modelling help needed

2013-01-13 Thread bhatmb
Hi Everyone, I am new to R and am figuring my way around it. I am trying to determine the relationship between A B, for each week of the year. My dataset looks like: YearWeekA B 19821 11.3 198.53 19822 14.4309.00 19823 23.2

[R] GLM ERROR

2012-12-22 Thread farnoosh sheikhi
 Hello, I'm fitting a logistic regression as follows and I have this error In predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type ==  :   prediction from a rank-deficient fit may be misleading Codes: ##Training  fit- glm(Y.Binary.training~., family=binomial(link=logit),

Re: [R] glm - predict logistic regression - entering the betas manually.

2012-12-11 Thread Greg Snow
It may be overkill, but you can specify the model pieces using the offset function in the model, then the predictions work out (at least for my simple trial case). Something like: fit - glm( y ~ 0+offset(-1 + 2*x), family=binomial, data=data.frame(y=0, x=0) ) predict( fit,

[R] glm - predict logistic regression - entering the betas manually.

2012-12-10 Thread Raffaello Vardavas
Dear All, I know this may be a trivial question. In the past I have used glm to make logistic regressions on data. The output creates an object with the results of the logistic regression. This object can then be used to make predictions. Great. I have a different problem. I need to make

Re: [R] GLM Coding Issue

2012-11-29 Thread Craig P O'Connell
Message - From: Steve Lianoglou mailinglist.honey...@gmail.com To: David Winsemius dwinsem...@comcast.net Cc: Craig P O'Connell coconne...@umassd.edu, r-help@r-project.org Sent: Tuesday, November 27, 2012 11:54:48 PM Subject: Re: [R] GLM Coding Issue Hi, On Tuesday, November 27, 2012

Re: [R] glm convergence warning

2012-11-27 Thread Jean V Adams
It could be that for some levels of your independent factor variables (WS, SS), the response is either all zeroes or all ones. Or, for your continuous independent variables (DV, DS), there is a clean break between the zeroes and ones. For example, if all the CIDs are one when DS = 18 but all

[R] GLM Coding Issue

2012-11-27 Thread Craig P O'Connell
Dear all,    I am having a recurring problem when I attempt to conduct a GLM.  Here is what I am attempting (with fake data): First, I created a txt file, changed the directory in R (to the proper folder containing the file) and loaded the file:

Re: [R] GLM Coding Issue

2012-11-27 Thread Steve Lianoglou
Hi, Comments inline: On Tue, Nov 27, 2012 at 1:00 PM, Craig P O'Connell coconne...@umassd.edu wrote: Dear all, I am having a recurring problem when I attempt to conduct a GLM. Here is what I am attempting (with fake data): First, I created a txt file, changed the directory in R (to

Re: [R] GLM Coding Issue

2012-11-27 Thread Peter Ehlers
On 2012-11-27 14:34, Steve Lianoglou wrote: Hi, Comments inline: On Tue, Nov 27, 2012 at 1:00 PM, Craig P O'Connell coconne...@umassd.edu wrote: Dear all, I am having a recurring problem when I attempt to conduct a GLM. Here is what I am attempting (with fake data): First, I created

Re: [R] GLM Coding Issue

2012-11-27 Thread David Winsemius
On Nov 27, 2012, at 3:34 PM, Steve Lianoglou wrote: Hi, Comments inline: On Tue, Nov 27, 2012 at 1:00 PM, Craig P O'Connell coconne...@umassd.edu wrote: Dear all, I am having a recurring problem when I attempt to conduct a GLM. Here is what I am attempting (with fake data): First, I

Re: [R] GLM Coding Issue

2012-11-27 Thread Steve Lianoglou
Hi, On Tuesday, November 27, 2012, David Winsemius wrote: [snip] `cbind`-ing doesn't make much sense here. What is your target (y) variable here? are you trying to predict `avoid` or `noavoid` status? Sorry, Steve. It does make sense. See : ?glm # First paragraph of Details. Indeed ...

Re: [R] GLM Coding Issue

2012-11-27 Thread Steve Lianoglou
Hi Peter, On Tue, Nov 27, 2012 at 8:05 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2012-11-27 14:34, Steve Lianoglou wrote: [snip] Steve: re a matrix response: see MASS (the book, 4ed) page 191; also found in the ch07.R file in the /library/MASS/scripts folder. I seem to recall that this

[R] glm convergence warning

2012-11-26 Thread Anne Schaefer
Hello, When I run the following glm model: modelresult=glm(CID~WS+SS+DV+DS, data=kimu, family=binomial) I get the following warning messages: 1: glm.fit: algorithm did not converge 2: glm.fit: fitted probabilities numerically 0 or 1 occurred What I am trying to do is model my response

[R] glm fitting routine and convergence

2012-11-06 Thread Christopher A. Simon
What kind of special magic does glm have? I'm working on a logistic regression solver (L-BFGS) in c and I've been using glm to check my results. I came across a data set that has a very high condition number (the data matrix transpose the data matrix) that when running my solver does not

Re: [R] glm fitting routine and convergence

2012-11-06 Thread David Winsemius
On Nov 6, 2012, at 1:44 PM, Christopher A. Simon wrote: What kind of special magic does glm have? I'm working on a logistic regression solver (L-BFGS) in c and I've been using glm to check my results. I came across a data set that has a very high condition number (the data matrix

[R] GLM and WLS

2012-11-05 Thread frespider
Hi I am running some simulation in R after resampling from a huge data set 500 columns and 86759 rows and fit these two model and calculate R-square fit - lm(Y~X,weights = Weights) bhat - coef(fit) Yhat - X%*%bhat SST - sum((Y - mean(Y))^2) SSE - sum((Y -

  1   2   3   4   >