similar to: Multiple regression script

Displaying 20 results from an estimated 400 matches similar to: "Multiple regression script"

2010 Jan 15
2
How to delete matrix rows based on NA frequency?
Hi all, I would like to remove rows from a matrix, based on the frequency of missing values. If there are more than 10 % missing values, the row should be deleted. I use the following to calculate the frequencies, thereby getting a new matrix with the frequencies: freqNA=rowMeans(is.na(exprdata)) But is there a shorter way to remove the rows based on "(1-freqNA)>0.1"
2009 Nov 11
1
Loadings and scores from fastICA?
Hi all, Does anyone know how to get the independent components and loadings from an Independent Component Analysis (ICA), as well as principal components and loadings from a Pricipal Component analysis (PCA) using the fastICA package? Or perhaps if there's another way to do ICAs in R? Below is an example from the fastICA manual (http://cran.r-project.org/web/packages/fastICA/fastICA.pdf)
2010 Jan 28
2
NA Replacement by lowest value?
Hi all, I need to replace missing values in a matrix by 10 % of the lowest available value in the matrix. I've got a function I've used earlier to replace negative values by the lowest value, in a data frame, but I'm not sure how to modify it... nonNeg = as.data.frame(apply(orig.df, 2, function(col) # Change negative values to a small value, close to zero { min.val =
2009 Nov 05
1
Set colors in a PCA plot based on a gradient vector
Hi all, I'm making a PCA plot with eight variables (columns taken from a larger data frame "fieldTrial0809[idx,c(39:46)]"). I then want the symbols in the plot to be colored as a gradient from red to blue, depending on the value of another column in "fieldTrial0809[idx, c(48)]" containg temperatures from -12.1 to -5.4. I don't want to use the heat.colors(n)
2009 Oct 16
2
Division of data frame and deletion of values from column
Hi all, I guess this might be an easy question, but I've searched multiple help pages without finding any answear... so now I put my trust in you! I have a data frame (36 variables and 556 observations). One column contains three factors, and I would like to divide the data frame into three new ones, based on the value of the factors, thereby having only one value for all elements of the
2009 Dec 17
2
Exchange NAs for mean
Hi all, I'm have a matrix (X) with observations as rows and parameters as columns. I'm trying to exchange all missing values in a column by the column mean using the code below, but so far, nothing happens with the NAs... Can anyone see where the problem is? N<-nrow(X) # Calculate number of rows = 108 p<-ncol(X) # Calculate number of columns = 88 # Replace by columnwise
2009 Nov 04
2
PCA with tow response variables
Hi all, I'm new to PCA in R, so this might be a basical thing, but I cannot find anything on the net about it. I need to make a PCA plot with two response variables (df$resp1 and df$resp2) against eight metabolites (df$met1, df$met2, ...) and I don't have a clue how to do... and I've only used the simplest PCAs before, like this: pcaObj=prcomp(t(df[idx, c(40:47)]))
2009 Oct 27
1
Exclude rows in xyplot
Hi all, I'm searching for a way to exclude outliers from my dataset while making xyplots. While plotting using pairs(), I exclude specific row in my data frame and save the settings as a variable which I later include as an argument: # Discard outliers and save settings as idx idx=with(fieldTrial0809, which(Pro>0 & Pro<0.95 & Fum>0 & Fum<0.4 & Mal>0.1 &
2009 Oct 14
1
Plot overview xy plots from data frame?
Hi, I've got a data frame (556 rows and 36 columns) from which I need to create several xy plots and print to pdf, in order to detect outliers and trends in the data. 16 of the columns contains numerical values, and I would like to create graphs for all combinations. It can be done manually, but creating 256 plots by hand takes time... I guess I have to iterate through the data frame, but
2010 Oct 15
2
AIC in bestglm, glm, and lm - why do they differ?
I recently found the "bestglm" package while trolling CRAN for a function to save some keystrokes with simple (k<10) nested models. I am interested in using the best of several nested linear models which I have explored using lm(), glm() and now bestglm(). When I compare the AIC values for the 'best' candidate model I get the same AIC values with lm() and glm() but a
2011 Oct 24
1
bestglm function and output in R
Hi all, I have been trying to run a bestglm in R for a while now and am struggling to get it to run. When I thought I had succeeded, the "output" it gave me was "NULL" and that's it. Below is my code: bestglmtest<-read.table("C:\\Documents and Settings\\clyons\\Desktop\\bestglmtest.txt",header=T,row.names=1) > names(bestglmtest) [1] "acc"
2011 Aug 04
3
Automatic creation of binary logistic models
Dear All, Suppose that you are trying to create a binary logistic model by trying different combinations of predictors. Has R got an automatic way of doing this, i.e., is there some way of automatically generating different tentative models and checking their corresponding AIC value? If so, could you please direct me to an example? Thanks in advance, Paul
2009 Oct 23
5
Change positions of columns in data frame
Hi all, Probably a simple question, but I just can't find a simple answear in the older threads or anywhere else. I've added some new vectors as columns in a data frame using cbind(). As they're all put as the last columns inte the data frame, I would like to move them to specific positions. How do you do to change the position of a column in a data frame? I know I can use
2012 Feb 13
2
best subset selection on random effects model
Hi, I know leaps() computes the best subset selection for linear model, and the bestglm() computes the best subset selection for generalized linear model. Is there any package for best subset selection on random effects model, or mixed effects model? Thank you so much. Tao [[alternative HTML version deleted]]
2009 Nov 19
2
3D plot, rotatable and with adjustable symbols
Hi all, I've tried to make a 3D plot, but have run into some problems. I'd like to have a plot that I can rotate interactively using the mouse, which is possible using the plots3d {R.basic}. However, I would like to change the symbols used as the points, but there's no pch in plot3d(). If I use the Scatterplot3d package, I'm able to change this, but not able to rotate
2009 Oct 27
2
Print several xyplots to the same page in a pdf file
Hello everybody, I'm using the lattice package and the xyplot to make several graphs like below. However, I can just print the three grouped plots onto one page as I'm putting them into a pdf-file, which gives me a huge amount of pages... Is it possible to put them all, or at least more than one on the same page, for instance put three groups beside each other like columns? ...
2007 Apr 27
2
Limit on vector evaluation
Dear R Experts, Why I try to run this expression: x<-sapply(rnorm(rep(10,100000),mean=9,sd=1.5),mean) it evaluates the first 10000 values and then stops, but does not return to the command prompt. My cpu keeps running at 100%. When I exit the expression with CTL-C, I then see that x holds 10000 values. How can I evalute the expression 100000 times, or more if I want? Thanks in advance.
2012 Feb 13
1
Any package for best subset selection on random effects model?
Hi Pros, I know leaps() computes the best subset selection for linear model, and the bestglm() computes the best subset selection for generalized linear model. Is there any package for best subset selection on random effects model, or mixed effects model? Thank you so much. -- View this message in context:
2004 Mar 05
4
Command Line Expressions
Hi, Is it possible to run R in command line to evalute R expressions and return results to stdout, something like >R CMD -e "R.version$minor" then you got return >"8.1" Or do a simple calculation >R CMD -e "sin(1.2)" >0.932039 Thanks. -- Pingping Zheng Department of Mathematics and Statistics Fylde College Lancaster University Lancaster LA1 4YF
2023 Jul 14
1
ComputerSecureChannel -Verbose False since windows 10/11 update 07/2023
Mandi! Ralph Boehme via samba In chel di` si favelave... > just fyi: > https://lists.samba.org/archive/cifs-protocol/2023-July/004004.html I see the reference from a Microsoft man on an internal ticket: TrackingID#2307130040007086 Can be plausible a client-side solution, via a registry/policy patch? Someone have some clue? Thanks. -- Il backup ? quella cosa che andava fatta