similar to: RE: z-scores for different factor levels

Displaying 20 results from an estimated 2000 matches similar to: "RE: z-scores for different factor levels"

2002 Jan 18
1
RE: z-scores for different factor levels
Hi Stuart, I often use this small function standardize <- function(x) ( x - mean(x, na.rm=T) ) / sqrt(var(x, na.rm=T)) to standardize variables. You should be able to use this to do what you want by splitting the data frame into sections based on the factor level, using standardize() to create a new variable in each section, then paste the data frame back together. Something like: #
2002 Feb 21
1
Factor analysis of categorical or mixed categorical/continuous data in
Are there any suitable routines that perform factor analysis of categorical or mixed categorical/continuous data in R? Stuart Dr Stuart Leask MA MB BChir (Cantab) MRCPsych Clinical Lecturer in Psychiatry, University of Nottingham Dept Psychiatry Duncan Macmillan House, Porchester Road, Nottingham. NG3 6AA. UK tel. 00 44 115 969 1300 xtn 40784 fax 0115 955 5352
2002 Jan 08
3
Finding functions in uninstalled libraries
(Many thanks to David Barron & Jonathan Baron for pointing me to 'recode' in the 'car' package). I think I've been told this before, but how do I search for a function/keyword in libraries I don't yet have installed? (ie. on the CRAN site I tried the search engines with "recode" etc., but didn't pick up the car package this way) Stuart Dr Stuart Leask
2001 Sep 18
4
help in a separate window under linux
Hi there. R v1.3.0, Slackware linux 7.1 or Windows 98SE, PII 266, 64Mb RAM. I notice that under windows, R puts help info (ie. the response to '?<function>') into a new window, whereas under linux, it puts it into the main console window. I find the former much more helpful when checking a function's syntax. Is there a simple way of configuring R under linux to put its help
2002 Jan 09
1
value labels from read.spss()?
>From owner-r-help at stat.math.ethz.ch Wed Jan 9 10:08:44 2002 > >Does anyone know how to access/list the value labels stored in a SPSS .sav >file? >At the moment I can read in variables using read.spss() (foreign package), >but have to power up SPSS to check value labels. > >Stuart There may be a solution to this in R, and I would love to hear it, but I was just faced
2012 Jun 22
3
removing NA from a data frame
Removing rows with NAs, using na.omit(), doesn't seem to be working for me. Dataset: > str ( ex10s ) 'data.frame': 2189576 obs. of 5 variables: $ LOPNR : int 58 58 58 58 64 64 64 64 64 64 ... $ DIAGNOS: Factor w/ 173 levels "F20","F200","F2000",..: 128 128 128 128 105 105 105 160 105 105 ... $ X_DATE : int 20060821 20061207 20080102 20090904
2003 May 23
1
Fw: write.table only writes the first 256 variables/columns
Thanks. I was "believing" an Excel import of the file - as you say, a re-import into R still has 333 columns. I shall look elsewhere for the cause of the mysterious truncation. Stuart > ----- Original Message ----- > From: "Thomas Lumley" <tlumley at u.washington.edu> > To: "Stuart Leask" <stuart.leask at nottingham.ac.uk> > Cc:
2003 Mar 06
1
[stuart.leask@nottingham.ac.uk: R in your pocket on a Sharp Zaurus]
Ah, but the interesting thing is that they are coming out with a 'clam' version like the 5MX. Details are limited at the moment, but that could mean the combination of 5MX usability with a supported linux distro. I am drooling in anticipation. Sounds like a "I've finally finished my PhD and deserve a treat" situation to me :) Dave On Thu, Mar 06, 2003 at 09:17:20AM
2002 Feb 21
2
Re: Factor analysis of categorical or mixed categorical/continuousdata in
I am looking to fit one or more latent categorical variables to data that is a mixture of categorical and continuous variables. Factor analysis would work for continuous data, latent class analysis for categorical data. I understand that in a package such as MPlus I could perform a single analysis of both data types. Are there similar routines available in R? Stuart -----Original Message-----
2001 Mar 23
0
Re: Finding functions (eg. 'lag')
Many thanks to those who gave me a loaf, and others who taught me how to fish! Stuart > > > From: "Dr Stuart Leask" <stuart.leask at nottingham.ac.uk> > > To: "R-help" <r-help at stat.math.ethz.ch> > > Subject: [R] 'lag' in R? > > Date: Thu, 22 Mar 2001 16:46:18 -0000 > > X-Priority: 3 > > X-MSMail-Priority: Normal
2001 Dec 03
0
Summary on R script editor
Thanks for the advice, folks! Shravan Vasishth <vasishth at ling.ohio-state.edu> Try pico. There's no substitute for/comparison with emacs, though, IMHO. but just to be sure: you don't have to have ESS to use (x)emacs for editing R scripts. Sven Garbade <garbade at psy.uni-muenchen.de> ESS can be installed via rpm on Mandrake. baron at cattell.psych.upenn.edu (Jonathan
2002 Jan 07
0
Recoding variable levels in R
>From: "Stuart Leask" <stuart.leask at nottingham.ac.uk> > >Hi there. When I wished to recode two variables in SPSS, I could use the >command RECODE: > >recode VAR1 VAR2 VAR3 etc. (1=0) (2=1) (3,MISSING=SYSMIS) (else=0). > >In R, I can 'hand-crank' each variable (using ifelse, or if the data is in a >matrix by logical tests, or no doubt numerous
2002 Nov 18
1
R on Sharp Zaurus 5500?
For what it is worth, here are my experiences. When I first got my zaurus I compiled R version 1.4.0 for the it. It took some time to do, but managed with the skiffclusters at familiar.org. (libf2c was the hardest part). Compilation should be easier now that there are onboard compilers but I haven't tried. I thought this would be neat to have in the classroom. (It did get one student to buy
2012 Oct 23
10
How to pick colums from a ragged array?
I have a large dataset (~1 million rows) of three variables: ID (patient's name), DATE (of appointment) and DIAGNOSIS (given on that date). Patients may have been assigned more than one diagnosis at any one appointment - leading to two rows, same ID and DATE but different DIAGNOSIS. The diagnoses may change between appointments. I want to subset the data in two ways: - define groups
2012 Jul 18
3
'symbols' not plotting correct circle radii
Hi there. I have been plotting some circles using 'symbols', with radii representing my data, but the radii looked incorrect. It seems to happen with a single circle too: Symbols ( 0, 0, circles = 40, xlim = c(-40, 40), ylim= c(-40, 40)) If I put a ruler up to my monitor (technology!) to compare the radius with the axes, the circle isn't radius 40; it is closer to 15... I
2010 Feb 12
1
validate (rms package) using step instead of fastbw
Dear All, For logistic regression models: is it possible to use validate (rms package) to compute bias-corrected AUC, but have variable selection with AIC use step (or stepAIC, from MASS), instead of fastbw? More details: I've been using the validate function (in the rms package, by Frank Harrell) to obtain, among other things, bootstrap bias-corrected estimates of the AUC, when variable
2013 Feb 15
2
Making the plot window wider and using the predict function
Hello, I am new to R and have a couple of questions. My data set contains the variables "Bwt" and "Hwt", which are bodyweight and heartweight, respectively, of a group of cats. With the following code, I am making two plots, both to be viewed in the same plot window in R: library(MASS) maleData <- subset(cats, Sex == "M") linreg0 <- lm(maleData$Hwt ~
2008 Dec 19
0
"parm" argument in confint.multinom () nnet package
Dear R users, The nnet package includes the multinom method for the confint function. The R Help file (?confint) for the generic function in the stats package and the help files for the glm and nls methods in the MASS package indicate that one can use the "parm" argument as "a specification of which parameters are to be given confidence intervals, either a vector of numbers or
2009 Aug 04
0
Problems with lqs()
Dear List-Members, I have a problem with the function lqs() from package MASS. In some cases it produces different results for the same settings and needs a random seed to be set, in other cases not. I really cannot understand, why this happens. As well I do not understand what exactly you need the random seed for. Is it a starting point for iterations? Or do different results occur because of
2010 Mar 19
0
Different results from survreg with version 2.6.1 and 2.10.1
---------------------------- Original Message ---------------------------- Subject: Different results from survreg with version 2.6.1 and 2.10.1 From: nathalcs at ulrik.uio.no Date: Fri, March 19, 2010 16:00 To: r-help at r-project.org -------------------------------------------------------------------------- Dear all I'm using survreg command in package survival.