similar to: glm - predict logistic regression - entering the betas manually.

Displaying 20 results from an estimated 6000 matches similar to: "glm - predict logistic regression - entering the betas manually."

2012 Nov 21
1
remote connection to an Oracle database - using RODBC - RMySQL..?
Dear users, I can access an database oracle database using sql developer. This was done by importing an xml file that contains the login details - username, password and specifies that it uses the KERBEROS_AUTHENTICATION. I'm trying to connect R - so that it can access this database - do sql queries and convert the resulting tables into dataframes. I am a novice in SQL and database access
2010 Sep 10
1
lattice package - wireframe plot : adding more than one surface and addiding a curve overlaid on the plot
Dear R help, Suppose I have a dataframe with three columns named p, v and C. Here C is a function of both p and v. I can plot the surface C(p,v) using the package lattice using the function wireframe. Now if I have another dataframe - with 2 columns named p_ind and v_ind and pind is a function of v_ind. I would like to overlay the plot of the curve p_ind, v_ind and C(p_ind, v_ind) onto my
2012 Mar 27
1
survplot function
Dear R-helpers I am wondering if there is an option to the survplot function in the design package that allows for drawing Kaplan-Meier plots starting from 0 instead of 1, similar like fun = 'event' in the standard plotting function used on a survfit object. I apologize in advance for having missed any obvious informational sources but I really didn't find anything in the
2010 Nov 18
3
Plotting number of patients at risk below survival curve
Dear list, does anyone know of a R-package that has implemented the increasingly popular inclusion of the number of patients at risk below Kaplan-Meier curves like in http://bloodjournal.hematologylibrary.org/content/vol116/issue19/images/large/zh89991058760001.jpeg any hint (or negative answer) is much appreciated. Thanks Thorsten -- Thorsten Raff 2nd Medical Department, University
2011 Jul 31
2
XML and odfWeave
Dear R-helpers, this is just a notice to inform everyone that the current versions of XML and odfWeave don't seem to be playing nice with each other. Since it took me quite some time to figure that out, I thought that I let you know. In my case it helped to install an older version of XML but your mileage of course may vary. Best regards Thorsten -- Thorsten Raff 2nd Medical
2008 Nov 12
3
R- transform data frame into matrix
Hello I have the problem that I want to transform a dataframe as generated by diagnosis <- rep(diagnosis[1:3], 3) marker <- gl(3,3) values <- rnorm(9) dataframe <- cbind(diagnosis, marker, values) dataframe <- dataframe[c(1:5, 7:9), ] into a matrix where levels(diagnosis) is indicating the rows of the matrix, levels(marker) the columns and values are the actual content of the
2004 Mar 01
1
glm logistic model, prediction intervals on impact af age 60 compared to age 30
Dear R-list. I have done a logistic glm using Age as explanatory variable for some allergic event. #the model model2d<-glm(formula=AEorSAEInfecBac~Age,family=binomial("logit"),data=emrisk) #predictions for age 30 and 60 preds<-predict(model2d,data.frame(Age=c(30,60)),se.fit=TRUE) # prediction interval
2013 Feb 24
0
BA.plot with logarithmic axes (MethComp)
Dear R-helpers, I am trying to plot a Bland-Altman-Plot using the BA.plot function from the package MethComp. While there is a function to transform the values for analysis as shown in the snippet below, I would like to have logarithmic axes for display as well. The usual log = 'xy' does not work because of the properties of the y-asxis (positive and negative values). I am sure that
2008 Sep 16
0
Package implementing unconditional tests for comparing two binomials
Hello, I am looking for a package implementing unconditional tests for comparing two binomials (Barnard's test or derivatives). As I am looking for rare genotypes within my groups, my number of subjects in one of the cells of the 2x2 table is often 2-4 resulting in a too conservative result by Fisher's exact test due to the discrete sample space of the test statistic. As I want to use
2000 Jul 08
1
Question about predict.glm
I am trying to use predict.glm to validate a logistic model. Using predictions <- predict.glm(logit.model, type="response", dataframe="validate") I get the predictions from the original dataframe, not the validation data frame. Am I missing an input to the method or is this what is supposed to happen?
2012 Apr 14
1
basic question predict GLM offset
Hi, I know this is probably a basic question... But I don't seem to find the answer. I'm fitting a GLM with a Poisson family, and then tried to get a look at the predictions, however the offset does seem to be taken into consideration: model_glm=glm(cases~rhs(data$year,2003)+lhs(data$year,2003), offset=(log(population)), data=data, subset=28:36, family=poisson()) predict
2010 Aug 24
1
Time and space considerations in using predict.glm.
Hello, I am using R to train a logistic regression model and save the resulting model to disk. I am then subsequently reloading these saved objects, and using predict.glm on them in order to make predictions about single-row data frames that are generated in real-time from requests arriving at an HTTP server. The following code demonstrates the sort of R calls that I have in mind: > cases
2018 Apr 27
5
predict.glm returns different results for the same model
Hi all, Very surprising (to me!) and mystifying result from predict.glm(): the predictions vary depending on whether or not I use ns() or splines::ns(). Reprex follows: library(splines) set.seed(12345) dat <- data.frame(claim = rbinom(1000, 1, 0.5)) mns <- c(3.4, 3.6) sds <- c(0.24, 0.35) dat$wind <- exp(rnorm(nrow(dat), mean = mns[dat$claim + 1], sd = sds[dat$claim + 1])) dat <-
2000 Feb 17
3
se from predict.glm
I am not sure whether it is a design decision or just an oversight. When I ask for the standard errors of the predictions with predict(budwm.lgt,se=TRUE) where budwm.lgt is a logistic fit of the budworm data in MASS, I got Error in match.arg(type) : ARG should be one of response, terms If one is to construct a CI for the fitted binomial probability, wouldn't it be more natural to do
2001 Apr 05
1
predict.glm
Hello, Probably a stupidly easy question, but I have done the following in order to make predictions from a fitted glm with new data: my.glm <- glm(lt96~so296[,1:17],family=binomial(link=logit)) p96 <- predict.glm(my.glm,newdata=so293[,1:17],type="response") but I always get the fitted linear predictors from the original model, ie there doesn't seem to be acknowledgement of
2004 Sep 29
1
glm.fit and predict.glm: error ' no terms component'
Hi when I fit a glm by glm.fit(x,y,family = binomial()) and then try to use the object for prediction of newdata by: predict.glm(object, newdata) I get the error: Error in terms.default(object) : no terms component I know I can use glm() and a formula, but for my case I prefer glm.fit(x,y)... thanks for a hint christoph $platform [1] "i686-pc-linux-gnu" $arch [1]
2006 Sep 01
1
difference between ns and bs in predict.glm
I am fittling a spline to a variable in a regression model, I am then using the predict.glm funtion to make some predictions. When I use bs to fit the spline I don't have any problems using the predict.glm function however when I use ns I get the following error: Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ (found for
2004 Sep 22
5
Issue with predict() for glm models
[This email is either empty or too large to be displayed at this time]
2005 Oct 31
2
why does glm.predict give values over 1 ?
Hi, This is a newbie question. I have been using glm to perform some logistic regression. However, if I take the fitted parameters (as part of the glm object) and pass them on the glm.predict function, for some test cases I am getting predicted values that are a little over 1. This is a bit puzzling for me, because my understanding was that these numbers are probabilities and so should be
2008 Dec 12
1
aggregate and median
Hello R-experts, I have a simple question: how do I aggregate data using the median function with na.rm = TRUE, i.e. aggregate(x, list(x$y, x$z), FUN = '????') I have tried 'median(x, na.rm = TRUE)' but that doesn't help. Any suggestions are very much appreciated, Thorsten