similar to: Calculating odds ratios from logistic GAM model

Displaying 20 results from an estimated 9000 matches similar to: "Calculating odds ratios from logistic GAM model"

2010 Jul 31
3
I have a problem
dear£º in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by red line.And how to compile the program(L <- .4*(sex=='male') + .045*(age-50) + (log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))). n <- 1000 # define sample size set.seed(17) # so can reproduce the results age <- rnorm(n, 50, 10)
2005 Aug 22
1
How to add legend of plot.Design function (method=image)? (if (!.R.) )
Hi, When running z <- plot(fit, age=NA, cholesterol=NA, perim=boundaries, method='image') Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)), zlab='Probability') And after pointing the cursor to the plot() screen in R, I obtain the following message: Using function "locator(2)" to place opposite corners of image.legend Error in
2018 Jan 03
1
summary.rms help
Dear All, using the example from the help of summary.rms library(rms) n <- 1000 # define sample size set.seed(17) # so can reproduce the results age <- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120, 15) cholesterol <- rnorm(n, 200, 25) sex <- factor(sample(c('female','male'), n,TRUE)) label(age) <- 'Age'
2010 Aug 14
1
How to add lines to lattice plot produced by rms::bplot
I have a plot produced by function bplot (package = rms) that is really a lattice plot (class="trellis"). It is similar to this plot produced by a very minor modification of the first example on the bplot help page: requiere(rms) n <- 1000 # define sample size set.seed(17) # so can reproduce the results age <- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120,
2002 Sep 13
1
design package (plot problems)
Hi, just making some experiments with design library i get an error if i want plot(fit) - show below from onlineHelp !? ..perhaps is here another mask problem?, but label from xtable which was my first problem is now off ! Thanks for advance & regards, Christian $ n <- 1000 # define sample size $ set.seed(17) # so can reproduce the results $ age <- rnorm(n, 50, 10)
2008 May 29
2
Troubles plotting lrm output in Design Library
Dear R-helpers, I'm having a problem in using plot.design in Design Library. Tho following example code produce the error: > n <- 1000 # define sample size > set.seed(17) # so can reproduce the results > age <- rnorm(n, 50, 10) > blood.pressure <- rnorm(n, 120, 15) > cholesterol <- rnorm(n, 200, 25) > sex <-
2009 Aug 26
2
Statistical question about logistic regression simulation
Hi R help list I'm simulating logistic regression data with a specified odds ratio (beta) and have a problem/unexpected behaviour that occurs. The datasets includes a lognormal exposure and diseased and healthy subjects. Here is my loop: ors <- vector() for(i in 1:200){ # First, I create a vector with a lognormally distributed exposure: n <- 10000 # number of study subjects
2009 Jul 17
1
c-index validation from Design library
Hi Group, I have a question about obtaining the bias-corrected c-index using validate from the Design library. As an example, consider the example from help page: library(Design) ?validate.lrm n <- 1000 age <- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120, 15) cholesterol <- rnorm(n, 200, 25) sex <- factor(sample(c('female','male'),
2003 Oct 09
3
simulate binary data from a logistic regression model
Hi. How can i simulate a binary data set from a logistic regression model?I need to manipulate parameters and so obtain my set of data. I want to show the improve in analyzing binary data with GLM(binomial) model instead of classical ANOVA or NON-MODELS procedures(relative risk-odds ratio-Pearson test of godness of fit...) Can you say me what is the right function to use? Do you know any
2005 Aug 22
0
How to add legend of plot.Design function ( method=image)?
Dear Rlist, How can the Legend of the plot.Design() function can be visualized? Following the documentation in R, I did the following (see below), only the 'Legend' function doesn't visualize the legend of the plot (method='image') of the lrmfit. I tried to change par( margin setting) but this didn’t solve it. How can this be solved? Thanks a lot, Jan
2018 Feb 14
0
Unexpected behaviour in rms::lrtest
Hello. One of my teaching assistants was experimenting and encountered unexpected behaviour with the lrtest function in the rms package. It appears that when you have a pair of non-nested models that employ an RCS, the error checking for non-nested models appears not to work. Here is a reproducible example. > library(rms) Loading required package: Hmisc Loading required package: lattice
2010 Oct 06
2
A problem --thank you
dear:teacher i have a problem which about the polr()(package "MASS"), if the response must have 3 or more levels? and how to fit the polr() to 2 levels? thank you. turly yours [[alternative HTML version deleted]]
2010 Jul 29
1
I need the dataset--thank you
dear: I am a user of R project.And now ,I have a problem. I want to know what is the name of the datasets in the web page--"Draw a Nomogram Representing a Regression Fit" which come from the R-home(http://www.r-project.org/ Package rms version 3.0-0). And can you supply the dataset to me? wish for your help,thank you!
2005 Jul 26
1
Difficulty getting standard deviation of ALL odds ratios with glm function, logistic regression, need cov of parameters
I am trying to do logistic regression with a categorical predictor variable with the glm() function, family=binomial. Using glm() I would like to be able to calculate the confidence intervals of all three possible odds ratios for a factor (the factor has three categories). Three categories imply two columns of 0's and 1's in the design matrix, and two parameter estimates with their
2010 Dec 08
3
Confidence Intervals for Odds Ratios in multivariate logistic regression
Hi all, I am trying to fit a logistic regression for a bivariate response using five independent variables in a stepwise procedure. My outputs look okay but does any one know (or is there any literature on) how the confidence intervals are calculated for the reported odds ratios..? Thanks! [[alternative HTML version deleted]]
2010 Feb 06
4
Plot of odds ratios obtained from a logistic model
Hi all! I am trying to develop a plot a figure in which I would like to show the odds ratios obtained from a logistic model. I have tried with the dotplot option but no success. Could you help me? Is there any option when modelling the logistic model in R? Thank you in advance
2008 Apr 17
1
Error in Design package: dataset not found for options(datadist)
Hi, Design isn't strictly an R base package, but maybe someone can explain the following. When lrm is called within a function, it can't find the dataset dd: > library(Design) > age <- rnorm(30, 50, 10) > cholesterol <- rnorm(30, 200, 25) > ch <- cut2(cholesterol, g=5, levels.mean=TRUE) > fit <- function(ch, age) + { + d <- data.frame(ch, age) +
2012 Dec 30
3
Odds Ratio and Logistic Regression
Dear All, I am learning the ropes about logistic regression in R. I found some interesting examples http://bit.ly/Vq4GgX http://bit.ly/W9fUTg http://bit.ly/UfK73e but I am a bit lost. I have several questions. 1) For instance, what is the difference between glm.out = glm(response ~ poverty + gender, family=binomial(logit), data=mydata) and glm.out = glm(response ~ poverty * gender,
2010 Sep 19
1
odds ratios for n-way tables: seeking an *apply-able method
I'm looking for a way to generalize the calculation of (log) odds ratios for 2 x 2 x {strata} frequency tables in vcd::oddsratio() to R x C x {strata} tables. For an R x C table, F, odds ratios can be defined in several ways; one simple way, particularly for tables with ordered factors, is to calculate the set of continuation odds ratios, based on the (R-1)x(C-1) set of 2x2 tables with
2013 Feb 06
2
calculating odds ratio in logistic regression with interaction terms
Dear all, How can i obtain odds ratio in logistic regression when the model contains interaction terms in R? how can i obtain OR for a special case? Thanks in advance for any help. Amin