similar to: how to categorize continuous variable when useing regression

Displaying 20 results from an estimated 10000 matches similar to: "how to categorize continuous variable when useing regression"

2009 Mar 04
5
how to create many variables at one time?
Hi: I need to create many variables at one time,how to do this in R? for eg ,X1,X2.......X100? Thanks~ [[alternative HTML version deleted]]
2008 Jun 04
3
create many variables at one time~
I need to create 100 variable ,whose name is id.1,id.2~~~~id.100 then I need to let a vector say id<-c(id.1,id.2....id.100) any easy way to do this? thanks a lot~ [[alternative HTML version deleted]]
2008 Jun 04
2
linear model in the repeated data type~
here is the data: y<-c(5,2,3,7,9,0,1,4,5) id<-c(1,1,6,6,7,8,15,15,19) t<-c(50,56,50,56,50,50,50,60,50) table1<-data.frame(y,id,t)//longitudinal data what I want to do is to use the linear model for each id ,then get the estimate value,like: fit1<-lm(y~t,data=table1,subset=(id==1)) but ,you can see the variable "id" is quite irregular,they are not arranaged in order
2008 Jun 18
3
multiple multiplication in R
hi: just a very simple quesion,how to do multiple multiplication in R x<-c(1,2,3,4,5,6) how to get 1*2*3*4*5*6? I checked the Arithmetic Operators in R,but did not found the operators for this function,anyway can do this except the loop? [[alternative HTML version deleted]]
2008 Jun 19
1
try to find the MLE of a function
Hi everyone: I have a density function f(x|theta)=theta*x^(theta-1),where 0<x<1,0<theta<infinite I want to pratice on R to find the MLE of this function,here is my code: x <- (0:10)/10 f<-function(theta) prod(theta*x^(theta-1)) mle(f) and r gave me :Error in eval(expr, envir, enclos) : argument is missing, with no default what mistake I just made?and how to add a
2007 Nov 24
1
Project proposal/idea: Categorize traffic by behavior
Back in 2003/2004 when finding the topic for my masters thesis, I had a secondary project idea, perhaps its about time to do something about the idea, and hear if anyone else thinks its a good idea? The basic idea is to: "Categorize traffic by behavior" The categorization should be based upon things like packet timing characteristics and packet size, rather than standard port
2009 Mar 10
5
Cholesky Decomposition in R
Hi everyone: I try to use r to do the Cholesky Decomposition,which is A=LDL',so far I only found how to decomposite A in to LL' by using chol(A),the function Cholesky(A) doesnt work,any one know other command to decomposte A in to LDL' My r code is: library(Matrix) A=matrix(c(1,1,1,1,5,5,1,5,14),nrow=3) > chol(A) [,1] [,2] [,3] [1,] 1 1 1 [2,] 0 2 2
2013 Mar 04
3
What package can I use to help me categorize comment responses?
Hi, We have comment questions from a survey that we need to categorize. What package and functions can I use in R to help do this? Daniel Lopez Lawrence Livermore Labs SHRM [[alternative HTML version deleted]]
2009 Nov 23
2
categorisation of continuous variables in R
Dear all, I'm looking for a function comparable to switch, to categorize a continuous variable in a few levels. Off course that can be done with a series of ifelse statements, but that looks rather clumsy. I looked at switch, but couldn't figure out how to use it for this. I guess that's not possible, as it only works with characters or integers, not with intervals. Basically,
2012 May 16
1
Hmisc improveProb() and PredictABEL reclassification () function and continuous NRI
Dear Sirs. I am working with the R packages Hmisc and PredictABEL to make NRI estimates from my Cox models with and without a specific biomarker. According to Pencina et al (Statistics in Medicine 2010, DOI: 0.1002/sim.4085 ), a continuous/non-categorical NRI (NRI>0) is to be used when there are no obvious reason to categorize risk, such as the risk of future cardiovascular events in patients
2008 Jun 04
1
how to extract a specific group of data from a table?
a table with three varialbe:treatment (low,high),size(large,small),response y I want all response y with treatment=low and size=large, I try to write as : treatment<-c("low","low","high","high") size<-c("small","large","small","large") y<-c(1,2,4,5) table1<-data.frame(treatment,size,y)
2005 Apr 21
2
Deciles and R
Hi everyone, I'm a new R user (if this is a really basic question, please do excuse me...) and I'm having some questions regarding a deciles problem. I have a variable which I need to categorize according to its deciles (X). However, this categorization should be made into another variable (call it NewVar). Ex. for the quartiles case (just for the sake of exposition, since I need
2007 May 10
5
Segmentation fault on large index
I''m getting a segmentation fault on a large index (15GB). I''m running ferret 0.11.4 on OpenSuSE 10.2 with ruby 1.8.6. The segmentation fault appeared after I optimized the index, see further below for the error message I got before that. Ferret works perfectly on other (smaller) indexes. Is this a known issue, and if so, is there a workaround? --------------------- after
2008 Jun 04
1
linear model with the repeated data type~
here is the data: y<-c(5,2,3,7,9,0,1,4,5) id<-c(1,1,6,6,7,8,15,15,19) t<-c(50,56,50,56,50,50,50,60,50) table1<-data.frame(y,id,t)//longitudinal data the above is only part of data. what I want to do is to use the linear model for each id ,then get the estimate value,like: fit1<-lm(y~t,data=table1,subset=(id==1)) but ,you can see the variable "id" is quite
2012 Jan 26
2
How do I use the cut function to assign specific cut points?
I am new to R, and I am trying to cut a continuous variable BMI into different categories and can't figure out how to use it. I would like to cut it into four groups: <20, 20-25, 25-30 and >= 30. I am having difficulty figuring the code for <20 and >=30? Please help. Thank you. -- View this message in context:
2010 Jul 16
3
how to collapse categories or re-categorize variables?
I am sure this is a very basic question: I have 600,000 categorical variables in a data.frame - each of which is classified as "0", "1", or "2" What I would like to do is collapse "1" and "2" and leave "0" by itself, such that after re-categorizing "0" = "0"; "1" = "1" and "2" =
2009 Mar 06
3
how to omit NA without using ifelse
I have a 50*50 matrix,some entry are NAs,I want to replace these NA by 0,so can I use some syntax to do so other than using ifelse? I tried to use replace(a,NA,0),it didnt work~~(a is matrix name) Thanks~ [[alternative HTML version deleted]]
2013 Apr 04
6
categorized complete list of R commands?
every time I read the R release notes for the next release, I see many functions that I had forgotten about and many functions that I never knew existed to begin with. (who knew there were bibtex facilities in R? obviously, everyone except me.) I wonder whether there is a complete list of all R commands (incl the standard packages) somewhere, preferably each with its one-liner AND
2011 Sep 14
1
Can 'mosaic' be used with a continuous variable?
Hello, I'm wondering if the 'mosaic' plot of the vcd package (or any other function for that matter) can be used with a continuous variable that should be represented via various categorical variables.  All the documentation I've read lead me to believe that it only works with counts of categories. Alternatively, I've thought of first creating a contingency table where the
2012 Jul 12
1
using glmnet for the dataset with numerical and categorical
Dear R users, if all my numerical variables in my datasets having the same units, may I leave them unnormalized, just do cv.glmnet directly(cv.glmnet(data,standardize=FALSE))? i know normally if there is a mixture of numerical and categorical , one has to standardize the numerical part before applying cv.glmnet with standardize=fase, but that's due to the different units in the numerical