similar to: question about scale() function

Displaying 20 results from an estimated 10000 matches similar to: "question about scale() function"

2010 Feb 22
3
scale(x, center=FALSE) (PR#14219)
Full_Name: Maria Rizzo Version: 2.10.1 (2009-12-14) OS: Windows XP SP3 Submission from: (NULL) (72.241.75.222) platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 2 minor
2007 Oct 03
2
Forcing zero intercept in two predictor case - stat question not R question
When one is doing simple regression and needs to force a zero intercept ( for whatever reason. I realize it's a controversial issue ), then subtracting the means of the left hand side and the right hand side from themselves does the trick. Does anyone know if there is a similar trick when the RHS has two variables ? Thanks. -------------------------------------------------------- This is
2013 Oct 16
7
Is there something wrong with R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"?
Hi, pnorm(-1.53,0,1) under version 3.0.2 gives 0.05155075. I am pretty sure it should be 0.063. Is there something wrong with this version of R? I am using: R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) -- Tom [[alternative HTML version deleted]]
2006 Oct 19
4
Question about random sampling in R
Hi, I looked up the help file on sample(), but didn't find the info I was looking for. When sample() is used to resample from a distribution, e.g., bootstrap, how does it do it? Does it use an uniform distribution, e.g., runif(), or something else? And, when the help file says:"sample(x) generates a random permutation of the elements of x (or 1:x)", would I be correct if I
2008 May 09
1
Which gls models to use?
Hi, I need to correct for ar(1) behavior of my residuals of my model. I noticed that there are multiple gls models in R. I am wondering if anyone has experience in choosing between gls models. For example, how should one decide whether to use lm.gls in MASS, or gls in nlme for correcting ar(1)? Does anyone have a preference? Any advice is appreciated! Thanks, -- Tom [[alternative HTML
2004 Feb 04
1
center or scale before analyzing using pls.pcr
Dear all, I found pls.pcr package will give different results if the data are centered and scaled using scale(). I am not sure about when I should scale my data, and whether the dependent variable should be scaled. If the dependent variable is scaled, how I give a prediction to the real data? I appreciate for any suggestions and comments. Best regards, Jinsong ===== (Mr.) Jinsong Zhao Ph.D.
2010 Feb 07
1
mboost: Interpreting coefficients from glmboost if center=TRUE
I'm running R 2.10.1 with mboost 2.0 in order to build predictive models . I am performing prediction on a binomial outcome, using a linear function (glmboost). However, I am running into some confusion regarding centering. (I am not aware of an mboost-specific mailing list, so if the main R list is not the right place for this topic, please let me know.) The boost_control() function allows
2008 Apr 29
2
function to generate weights for lm?
Hi, I would like to use a weighted lm model to reduce heteroscendasticity. I am wondering if the only way to generate the weights in R is through the laborious process of trial and error by hand. Does anyone know if R has a function that would automatically generate the weights need for lm? Thanks, -- Tom [[alternative HTML version deleted]]
2007 Dec 31
3
stack charts right on top of each other
Hi, I tried to stack two charts on top of each other using the following R functions: par(mfrow=c(2,1)) plot(rnorm(1:3),xaxt="n",xlab="") plot(rnorm(1:3)) This created two charts, one on top of the other, but there is too much space between them. Does anyone know how to elimiate the space in between the charts? Thanks, -- Tom [[alternative HTML version deleted]]
2010 Oct 28
1
clustering on scaled dataset or not?
Hi, just a general question: when we do hierarchical clustering, should we compute the dissimilarity matrix based on scaled dataset or non-scaled dataset? daisy() in cluster package allow standardizing the variables before calculating dissimilarity matrix; but dist() doesn't have that option at all. Appreciate if you can share your thoughts? Thanks John [[alternative HTML
2006 Oct 21
2
how do I find the row index number, or row name, of a given value in a vector?
Hi, I noticed that max(x) returns the maximum value of a vector, but the function doesn't give the user the option of retrieving the row index number instead. If I used max(x) to find the maximum value of vector x, then is there a function I can use to find the index number, or row name, of the maximum value? Thanks, Tom [[alternative HTML version deleted]]
2007 Dec 01
2
R function for percentrank
Hi, Does anyone know if R has a built-in function that is equvalent to Excel's percentrank, i.e., returns the rank of a value in a data set as a percentage of the data set? Thanks, -- Tom [[alternative HTML version deleted]]
2008 Mar 09
2
format numbers into percentages
Hi, I am currently using the following to formate numbers into percentages: x=0.00112 paste(round(x*100,2),"%",sep="") I am wondering if there is a built in R function that does the same. Does anyone know? Thanks, -- Tom [[alternative HTML version deleted]]
2007 Aug 28
1
FW: How to fit an linear model withou intercept
Hi Mark, I don't know wether you recived a sufficient reply or not, so here are my comments to your problem. Supressing the constant term in a regression model will probably lead to a violation of the classical assumptions for this model. From the OLS normal equations (in matrix notation) (1) (X'X)b=X'y and the definition of the OLS residuals (2) e = y-Xb you get - by
2006 Nov 01
4
Problem with data type recognition and conversion
Hi, I have a CSV file with two columns; the first column is date, second column is numbers. I used read.csv() to load the file into the variable temp. Somehow, R could not recognize my numbers as double. Instead, it thinks these numbers are integer even though they all have decimal points (isn't that strange?). The problem I ran into is that if I tried to convert the numbers to double using
2006 Oct 19
2
use date as x-axis
Hi, I have the following data in two columns. The first column is the date, the second is data. Date Data 3-Jan-95 459.21 4-Jan-95 459.13 5-Jan-95 460.73 6-Jan-95 460.38 9-Jan-95 460.67 10-Jan-95 460.9 11-Jan-95 461.68 12-Jan-95 461.64 13-Jan-95 461.64 16-Jan-95 465.97 17-Jan-95 469.38 18-Jan-95 470.05 19-Jan-95 469.72 20-Jan-95 466.95 23-Jan-95 464.78 24-Jan-95 465.81 25-Jan-95 465.86 I would
2008 May 07
2
cross-correlation lag.plot?
Hi, Does anyone know if R has a function that is similar to lag.plot but instead of auto-correlation, it plots cross-correlation with lags? Thanks, -- Tom [[alternative HTML version deleted]]
2008 Apr 07
2
How to add background color of a 2D chart by quadrant
Hi, I have a 2D chart that is divided into four quadrants, I, II, III, IV: plot(1:10,ylim=c(0,10),xlim=c(0,10),type="n") abline(v=5,h=5) text(x=c(7.5,7.5,2.5,2.5),y=c(2.5,7.5,7.5,2.5),labels=c("I","II","III","IV")) I would like to fill each quadrant with a background color unique to the quadrant. Does anyone know how to do this in R? Thanks, --
2008 Jan 23
3
How to do more advanced cross tabulation in R?
Hi, I am trying to reproduce some functionalities of Excel pivot table in R, sadly, I couldn't figure out how to do it. I am wondering if this is even possible in R. Does anyone know? Here is an example: year=rep(2003,16) quarter=rep(1:4,each=4) sales=1:16 company=rep(c("a","b","c","d"),4) df=data.frame(year,quarter,sales,company) #this is the
2009 Apr 20
8
bug when subtracting decimals?
Try this: 0.7-0.3==0.4 (We get FALSE) 0.7-0.3<0.4 (We get TRUE) but 0.8-0.3==0.5 (TRUE) 0.8-0.3<0.5 (FALSE) Funny, he? There is a way around: round(0.7-0.3,1)==0.4 (TRUE) Obviously there is a problem with some combinations of decimal subtractions, that - we have the feeling - shouldt be solved. Best regards Sven & Wolfgang -- View this message in context: