similar to: variable selection in linear regression

Displaying 20 results from an estimated 700 matches similar to: "variable selection in linear regression"

2011 Aug 15
1
ggplot in a function confusion!
Whats going on here? df<-data.frame(x=1:10,y=1:10) ggplot()+geom_point(data=df,aes(x=x,y=y)) ## this is the normal usage right? ggplot()+geom_point(data=df,aes(x=df[,1],y=df[,2])) ## but I can also feed it column indices ggplot()+geom_point(aes(x=df[,'x'],y=df[,'y'])) ## or column names. ## but if i wrap it in a function... plot.func.one<-function(dff,x.var,y.var){
2004 Jun 30
1
AS_NUMERIC and as.numeric - Could someone explain?
Dear List, I stepped into a strange effect which I can't explain to myself (probably due to lack of knowledge on R internals). I have four vectors a,b,c and z of size 10000 each. With these vectors I call .Call("hyp2f1forrey", a, b, b, z, PACKAGE = "hyp2f1") to access SEXP hyp2f1forrey(SEXP a, SEXP b, SEXP c, SEXP x) { int i,n; double *xa, *xb, *xc, *xx,
2008 Mar 13
3
Splitting a set of vectors in a list
I have a set of character vectors of uneven length that I have stored in a list. I can easily enough get any column of them using lapply but what I want is to be able to create a matrix of them. Other than some kind of brute force looping approach I have drawn a blank. Would somebody please suggest something? Thanks Example. mylist <- list(aa=c("cat","peach" ),
2012 Jul 25
2
Nested Models
Hey, I'm an R noobie and I have been trying calculate SSEr and SSEc in order to determine if there is sufficient evidence to include second-order terms in my model, but I have no idea what command to use. Any help with this would be much appreciated. -- View this message in context: http://r.789695.n4.nabble.com/Nested-Models-tp4637855.html Sent from the R help mailing list archive at
2009 May 13
1
Overlaying two plots
Hi useR's, I want to overlay an image plot over a world map and I can do it, but just not the way I need to do it. Here is the code I am using (with data file attached) to create my baseline map: library(sp) load("TM_WORLD_BORDERS_SIMPL-0.2.RData") par(bty="l") plot(wrld_simpl, axes = TRUE, ylim = c(-90, 90), xlim=c(-180, 180), asp=1.5) lim <- par("usr")
2013 Feb 13
5
spearman correlation and p-value as a matrix
I have two data matrices that I want to make the correlation between each column from data1 and each column from data 2 and also calculate the p-value Matrices dont have the same size and I tried such a script. > bg <- read.table (file.choose(), header=T, row.names) > bg > Otu00022 Otu00029 Otu00039 Otu00042 Otu00101 Otu00105 Otu00125 Otu00131 Otu00137 Otu00155 Otu00158 Otu00172
2011 Jul 28
0
_: how to replace values in x by means in subgroups created in ...(not loops)
Re:_: how to replace values in x by means in subgroups created in ...(not loops) Thanks, below some code and reply: #_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_# #------------------------------------------------------- # my slow function with loops: # replace_x_by_locallyMean_x_4_0s_in_y.f(x,y) #-------------------------------------------------------
2009 Nov 25
0
Possible bug in "unsplit" (PR#14084)
Dear R-bug-people I have encountered a problem with "unsplit", which I believe may be caused by a bug in the function. However, unexpericend with bug-reports I apologise if this is barely a user problem rather than a problem within R. The problem occurs if an object is split by several grouping factors with levels not occuring in the data, and using drop = TRUE. This may appear as
2008 Apr 01
4
NEW: Sociolects in R
The R translation teams have done a great job in making R usable for people who do not have English as their mother tongue. However, even within English speaking countries, there are groups which have trouble with the language, and it may be valuable to support the Sociolects of these groups too. Thanks to a generous contribution from Lars Polifo, these features will be made available in an
2013 Feb 01
29
cumulative sum by group and under some criteria
Thank you very much for your reply. Your code work well with this example. I modified a little to fit my real data, I got an error massage. Error in split.default(x = seq_len(nrow(x)), f = f, drop = drop, ...) : Group length is 0 but data length > 0 On Thu, Jan 31, 2013 at 12:21 PM, arun kirshna [via R] < ml-node+s789695n4657196h87@n4.nabble.com> wrote: > Hi, > Try this: >
2000 Mar 13
0
listing shares
I don't know what I have changed, NT does not list the shares anymore!! I can access them by directly connecting to \\SERVER\share but cannot browse them!! Win98 does just fine! Which option is the problem?? Here's a snipped of my config: [global] keep alive = 30 log file = /var/log/smbd.log lock directory = /var/lock/samba bind interfaces only = yes interfaces = eth0 interfaces =
2008 Dec 01
1
factanal question
Dear R users: I'm wondering if it's possible to get the residual correlation matrix when using factanal. Since factanal assumes that the errors are normally distributed and independent (provided the factor model fits the data) this would be useful. Of course you would need to submit the data to the function to get the residuals (not just their correlation matrix), but it should be possible
2003 Nov 13
1
Problem with 3.7.1p2 on Reliant Unix
Hi Group, recently I upgraded to v 3.7.1p2 on Reliant Unix (former SINIX). With sser root everything works fine, but with a "normal" user the session terminates.. I put the logfile of the "sshd -dddd" at the end. What is wrong? regard Stephan --------------- debug2: read_server_config: filename /etc/sshd_config debug1: sshd version OpenSSH_3.7.1p2 debug1: private host key:
2005 Aug 03
7
call fortran in R
Hello, I used a mac G5, R.2.1.1, and G77 3.4.4 and I would like to use and call a fortran subroutine. The trouble is that it seems I am not able to correctly load the compiled code. Here is what I have done: In the terminal this how I compiled my fortran code: R CMD SHLIB ~/Desktop/Fortan_kmeans/kmeans3.f There is the wrapper I have paste inside de kmeans3.f file: c
2011 Nov 04
4
How to delete only those rows in a dataframe in which all records are missing
Hi, Imagine I have the following data frame: > a <- c(1,NA,3) > b <- c(2,NA,NA) > c <- data.frame(cbind(a,b)) > c a b 1 1 2 2 NA NA 3 3 NA I want to delete the second row. If I use na.omit, that would also affect the third row. I tried to use a loop and an ifelse clause with is.na to get R identify that row in which all records are missing, as opposed to the first
2013 Feb 28
11
new question
Hi, directory<- "/home/arunksa111/data.new" #first function filelist<-function(directory,number,list1){ setwd(directory) filelist1<-dir(directory) direct<-dir(directory,pattern = paste("MSMS_",number,"PepInfo.txt",sep=""), full.names = FALSE, recursive = TRUE) list1<-lapply(direct, function(x) read.table(x,header=TRUE, sep =
2010 Oct 04
2
i have aproblem --thank you
dear professor: thank you for your help,witn your help i develop the nomogram successfully. after that i want to do the internal validation to the model.i ues the bootpred to do it,and then i encounter problem again,just like that.(´íÎóÓÚerror to :complete.cases(x, y, wt) : ²»ÊÇËùÓеIJÎÊý¶¼Ò»Ñù³¤(the length of the augment was different)) i hope you tell me where is the mistake,and maybe i have
2012 Oct 04
1
Ops.factor(point1, point2) : - not meaningful for factors
Hi, can anyone help me in this problem :(. I am a total beginner in R software. It took me 2 days just to look into this problem. Due to this problem. I cant do looping. i want to find the distance between x and DSi > DSi i Si 1 1 (5, 20) 2 2 (20, 2) 3 3 (25, 32) 4 4 (8, 39) 5 5 (10, 17) 6 6 (35, 20) 7 7 (38, 10) > str (DSi) 'data.frame': 7 obs. of 2 variables: $ i
2006 Nov 05
3
struggling to plot subgroups
Hi Folks, I have data that looks like this: freq gender xBar 1000 m 2.32 1000 f 3.22 2000 m 4.32 2000 f 4.53 3000 m 3.21 3000 f 3.44 4000 m 4.11 4000 f 3.99 I want to plot two lines (with symbols) for the two groups "m" and "f". I have tried the following: plot(xBar[gender=="m"]~freq[gender=="f"]) followed by
2010 Oct 04
0
2010年10月4日 19:14:45 自动保存草稿
dear professor: thank you for your help,witn your help i develop the nomogram successfully. after that i want to do the internal validation to the model.i ues the bootpred to do it,and then i encounter problem again,just like that.(´íÎóÓÚerror to :complete.cases(x, y, wt) : ²»ÊÇËùÓеIJÎÊý¶¼Ò»Ñù³¤(the length of the augment was different)) i hope you tell me where is the mistake,and maybe i have