similar to: How do I use the cut function to assign specific cut points?

Displaying 20 results from an estimated 1100 matches similar to: "How do I use the cut function to assign specific cut points?"

2011 May 08
1
Hosmer-Lemeshow 'goodness of fit'
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic regression model. I found some code here: http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html The R code is above is a little complicated for me but I'm having trouble with my answer: Hosmer-Lemeshow: p=0.6163585 le Cessie and Houwelingen test (Design library): p=0.2843620
2006 Sep 22
1
Propensity score and three treatments
Dear All, I would like to find something ( references, code,..) to implement a comparison of three treatments in an observational study using the 'Propensity Score'. Any help is much appreciated. Thanks! Giovanni -- dr. Giovanni Parrinello Department of Biotecnologies Medical Statistics Unit University of Brescia Viale Europa, 11 25123 Brescia email: parrinel at med.unibs.it Phone:
2005 Nov 29
2
permutation test for linear models with continuous covariates
Hi I was wondering if there is a permutation test available in R for linear models with continuous dependent covariates. I want to do a test like the one shown here. bmi<-rnorm(100,25) x<-c(rep(0,75),rep(1,25)) y<-rnorm(100)+bmi^(1/2)+rnorm(100,2)*x+bmi*x H0<-lm(y~1+x+bmi) H1<-lm(y~1+x+bmi+x*bmi) anova(H0,H1) summary(lm(y~1+x+bmi)) But I want to use permutation testing to
2011 Oct 06
1
error messages
Im doing a project using Rcommander. I have a dataset with 5 variables, BMI being one of them. I would like to find the variance, standard deviation, range, median, etc of BMI. However, everytime I type a command into the script window, (such as var(BMI$BMI,na.rm=TRUE) )an error message pops up saying Object "BMI" not found. I can graph it, work it, do t-test, etc,. It's listed as
2008 Mar 17
1
Std errors in glm models w/ and w/o intercept
I am doing a reanalysis of results that have previously been published. My hope was to demonstrate the value of adoption of more modern regression methods in preference to the traditional approach of univariate stratification. I have encountered a puzzle regarding differences between I thought would be two equivalent analyses. Using a single factor, I compare poisson models with and without
2011 Jan 23
2
Creating subsets of a matrix
Hello, Say I have 2 columns, bmi and gender, the first being all the values and the second being male or female. How would I subset this into males only and females only? I have searched these fora and read endlessly about select[] and split() functions but to no avail. Also the table is not ordered. bmi gender -> bmi gender + bmi gender 1 24.78 male
2015 Aug 02
3
ayuda con análisis de supervivencia
Hola a todos, -Estoy estudiando el efecto de dos genotipos (~tratamientos) en la aparición de síndrome metabólico (MetS) con datos longitudinales recogidos a tiempo 0,7,10,15,20 y 25 años. -He hecho un dataframe con las siguientes variables MetS: Síndrome Metabólico (Si=1,No=0) bmi: Indice de masa corporal (IMC) cuando se produce la conversión a MetS+ . Para los que permancen MetS-, esta variable
2005 Jun 02
3
How to change all name of variables
Dear R-helpers, First I apologize if my question is quite simple I have a large datasets which more 100 variables. For a research I need to change all name of variables with add one or more letters on each variables. For example, > data(Pima.tr) > Pima.tr[1:5,] npreg glu bp skin bmi ped age type 1 5 86 68 28 30.2 0.364 24 No 2 7 195 70 33 25.1 0.163 55 Yes 3 5
2009 May 15
2
help with as.numeric
hi everyone, wondering if you could help me with a novice problem. I have a data frame called subjects with a height and weight variable and want to calculate a bmi variable from the two. i have tried: attach(subjects) bmi <- (weight)/((height/100)^2) but it comes up with the error: Warning messages: 1: In Ops.factor(height, 100) : / not meaningful for factors 2: In Ops.factor((weight),
2006 Aug 03
2
run self written functions
Hello, I'm not sure if I'm in the right place with my question... I'm running R on Windows and wrote a function and saved it as .R file. It looks like this: bmi <- function(weight, height) { bmi <- weight / height^2 bmi } If I want to use this function, I have to mark everything and then press Ctrl-R. But then everything single line is executed on the command line,
2008 Jan 01
3
if statement problem
Hi All, I have a small dataset named das (43 cases) in which I am trying to create a binary outcome (1/0) based on the following code: if (das$age>65 && das$bmi>30) {das$danger<-1} else das$danger<-0 I am setting a flag called 'danger' to 1 of the subject is over 65 and has a BMI > 30. I find that my statement evaluates the first record in the data.frame and
2006 Apr 20
4
online tutorials
I work for a Investment group with a very extensive training program and we are having our new hires take a statistics course at University of Chicago where they have to complete some assignments with R. I was wondering if there are any online tutorials that exist where we could get our participants comfortable with R before the class itself? I appreciate any help at all. Thanks, Matt Maxon
2018 May 21
2
Bootstrap and average median squared error
Dear R-experts, I am trying to bootstrap (and average) the median squared error evaluation metric for a robust regression. I can't get it. What is going wrong ? Here is the reproducible example. ############################# install.packages( "quantreg" ) library(quantreg) crp <-c(12,14,13,24,25,34,45,56,25,34,47,44,35,24,53,44,55,46,36,67) bmi
2010 Oct 25
2
Question on passing the subset argument to an lm wrapper
Hello, How would you go about handling the following situation? This is on R 2.12.0 on Ubuntu 32-bit. I have a wrapper function to lm. I want to pass in a subset argument. First, I just thought I'd use "...". ## make example reproducible set.seed(123) df1 <- data.frame(age = rnorm(100, 50, 10), bmi = rnorm(100, 30, sd = 2)) ## create a wrapper using
2018 Apr 06
3
performance.cache-size for high-RAM clients/servers, other tweaks for performance, and improvements to Gluster docs
Hi, I'm trying to squeeze performance out of gluster on 4 80GB RAM 20-CPU machines where Gluster runs on attached block storage (Linode) in (4 replicate bricks), and so far everything I tried results in sub-optimal performance. There are many files - mostly images, several million - and many operations take minutes, copying multiple files (even if they're small) suddenly freezes up for
2018 Apr 06
0
performance.cache-size for high-RAM clients/servers, other tweaks for performance, and improvements to Gluster docs
Hi again, I'd like to expand on the performance issues and plead for help. Here's one case which shows these odd hiccups: https://i.imgur.com/CXBPjTK.gifv. In this GIF where I switch back and forth between copy operations on 2 servers, I'm copying a 10GB dir full of .apk and image files. On server "hive" I'm copying straight from the main disk to an attached volume
2012 Feb 17
1
smartd and smartctl
A few weeks ago, one of my servers started complaining, via smartd, that one drive had one unreadable sector. I umounted it, and ran an fsck -c, then remounted it. Error didn't go away. Now, what's really annoying is that I've gotten back to it today, and it's reporting the problem, as it has for weeks now, every half an hour. However, when I run > smartctl -q errorsonly -H -l
2012 May 02
1
DKIM Pass - Fail
Hi Dear Community Friends, it is few days now, i am trying to figure out why DKIM is working / not working. Any assistance would be very much appreciable. Server IP is not blacklisted ever, MX, PTR SPF, DKIM records are available in DNS. why it is working at Gmail, why failing at Yahoo? Gmail dkim=pass header.i=@digital-infotech.net Yahoo: domainkeys=neutral (no sig);
2010 Sep 23
1
How to pass a model formula as argument to with.mids
Hello I would like to pass a model formula as an argument to the with.mids function from the mice package. The with.mids functon fits models to multiply imputed data sets. Here's a simple example library(mice) #Create multiple imputations on the nhanes data contained in the mice package. imp <- mice(nahnes) #Fitting a linear model with each imputed data set the regular way works
2011 Feb 11
6
On-Hold Music
Hi gang, In 500 words or less (if possible), please explain what is a legal music-on-hold file? My boss hates the stuff provided with the distribution and I figure that I'm asking for trouble if I take my Les Mis tracks and run them through Audacity and SOX to make new files. Thanks in advance Danny Nicholas -------------- next part -------------- An HTML attachment was