Hello, I am working with a dataset with three variables and one binomial parameter. The glm function provides coefficients for these three variables, e.g. -1.5 | 27.2 | -2.9 If I'm not mistaken, $fitted.values gives me an estimate of how likely my parameter is to be true/1 . I would like to apply these coefficients on other variables to predict the binomial parameter but I'm not sure how to make use of them. To clarify a bit more I'm looking for a formula to calculate the chance that the parameter is true/1, based on the three variables/coefficients, something like -1.5*V1+27.2*V2-2.9*V2 I hope someone understands my awkwardly worded question and is able to help me out - thanks! -- View this message in context: http://r.789695.n4.nabble.com/Applying-glm-coefficients-Beginner-Question-tp4643737.html Sent from the R help mailing list archive at Nabble.com.
Windows XP (SP3) , R 2.15.1 32bit Hi ... I have a script which fails and closes my R session. Unfortunately, it bombs out at a different point each time I run it. I'm guessing that it may be something to do with memory management, or perhaps it's to do with the various .C dll's the script calls. Has anyone come across similar problems and if so, how did you track down the cause ? Pathetically grateful for any pointers ... Cheers Bob Kinley
On Sep 20, 2012, at 6:55 AM, SirRon wrote:> Hello, > I am working with a dataset with three variables and one binomial parameter. > The glm function provides coefficients for these three variables, e.g. > -1.5 | 27.2 | -2.9 > > If I'm not mistaken, $fitted.values gives me an estimate of how likely my > parameter is to be true/1 .Not at all how I would have expressed it.> I would like to apply these coefficients on > other variables to predict the binomial parameter but I'm not sure how to > make use of them.On other instances of similarly measured variables? Then use the new data argument to predict().> > To clarify a bit more I'm looking for a formula to calculate the chance that > the parameter is true/1, based on the three variables/coefficients, > something like > > -1.5*V1+27.2*V2-2.9*V2I am guessing you will be using the type="response" argument to predict(), but again is is not the case that this will be answer the question as you have expressed it and I have interpreted it. It is not going to return the probability that the "parameter is true", at least if the word "parameter" is what most people are calling "coefficient". ?predict.glm> I hope someone understands my awkwardly worded question and is able to help > me out - thanks!Awkwardly worded questions will get much better answers if they are accompanied by some test data. -- David Winsemius, MD Alameda, CA, USA
Weeell , you were absolutely right. Turns out I was trying to be too clever by allowing for a different sized array in each call to a .C dll within the same R script. Changed it to the max size the script can request and all is gas and gaiters. Thanks for the pointer. Cheers Bob kinley -----Original Message----- From: Patrick Burns [mailto:pburns at pburns.seanet.com] Sent: 21 September 2012 09:27 To: Robert Douglas Kinley Subject: Re: [R] puzzling script bug Bob, I haven't noticed if you've had any responses or not. The '.C' calls are almost surely the problem, and the problem with them is that there is probably a memory out of bounds problem. The best way to find those is to use valgrind on Linux. Trying to find them under Windows is hard. As in really hard. Good luck, Pat On 20/09/2012 16:34, Robert Douglas Kinley wrote:> Windows XP (SP3) , R 2.15.1 32bit > > Hi ... > > I have a script which fails and closes my R session. > > Unfortunately, it bombs out at a different point each time I run it. > > I'm guessing that it may be something to do with memory management, or > perhaps it's to do with the various .C dll's the script calls. > > Has anyone come across similar problems and if so, how did you track down the cause ? > > Pathetically grateful for any pointers ... > > Cheers Bob Kinley > > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Patrick Burns pburns at pburns.seanet.com twitter: @portfolioprobe http://www.portfolioprobe.com/blog http://www.burns-stat.com (home of 'Some hints for the R beginner' and 'The R Inferno')