similar to: Advice on recoding a variable depending on another which contains NAs

Displaying 13 results from an estimated 13 matches similar to: "Advice on recoding a variable depending on another which contains NAs"

2010 Aug 04
4
Passing the name of a variable to a function
Dear colleagues, I have a problem which has bitten me occasionally. I often need to prepare graphs for many variables in a data set, but seldom for all. or for any large number of sequential or sequentially named variables. Often I need several graphs for different subsets of the dataset for a given variable. I run into similar problems with other needs besides graphing. What I would like to
2002 Feb 04
2
Help with accessing elements of a list
Hi, As part of the analysis of a longitudinal study, I have a list, called wg, on R 1.3.1 for windows created as follows - wg <- by(xx, xx$mrn, function(xx) lm(xx$maternal.wt ~ xx$gestation, data=xx)) xx is a data.frame, and so wg contains the results of 293 linear regressions, as lm objects. Now what I want is to extract the 293 intercepts and regression coefficients as a vector, and
2005 Oct 14
1
Predicting classification error from rpart
Hi, I think I'm missing something very obvious, but I am missing it, so I would be very grateful for help. I'm using rpart to analyse data on skull base morphology, essentially predicting sex from one or several skull base measurements. The sex of the people whose skulls are being studied is known, and lives as a factor (M,F) in the data. I want to get back predictions of gender, and
2003 Nov 20
3
Problem with Trellis graphics in nlme
Hi, I would be grateful for help with a problem which is irritating me. I am quite sure that I am doing something stupid, but I can't see what it is. I am running R 1.7 on Windows 2000. The graphics device is the PC screen. The graphics from the nlme demonstration in Bates an Pinheiro's manual work just as advertised. The CO2 data and the Orthodont data dsiplay
2006 Jul 18
1
Classification error rate increased by bagging - any ideas?
Hi, I'm analysing some anthropometric data on fifty odd skull bases. We know the gender of each skull, and we are trying to develop a predictor to identify the sex of unknown skulls. Rpart with cross-validation produces two models - one of which predicts gender for Males well, and Females poorly, and the other does the opposite (Females well, and Males poorly). In both cases the error
2007 Feb 16
1
SPSS and library(foreign)
Hi, I have a valid SPSS .sav file (which I can open happily in SPSS v11 on Windows XP). Opening it in R2.41 on Linux we get this message :- > HSE3023 <- read.spss("HSE.sav") Error in read.spss("HSE.sav") : error reading system-file header In addition: Warning message: HSE.sav: Variable X234 indicates variable label of invalid length 256 Now variable X234 has indeed a
2011 Jan 05
3
Advice on obscuring unique IDs in R
Dear colleagues, This may be a question with a really obvious answer, but I can't find it. I have access to a large file with real medical record identifiers (mixed strings of characters and numbers) in it. These represent medical events for many thousands of people. It's important to be able to link events for the same people. It's much more important that the real record numbers
2007 Feb 09
1
Using variable names in for loops - Generating plots semi-automatically from a series of variables Partly solved
Hi, This code is trying to produce a series of graphics files, with plots of male and female disease rates by age, one plot per disease. The dataframe contains a variable 'Age' and a set of variables called 'Male_CVD, Female_CVD,Male_RTA,Female_RTA, and so on. For each disease, I want to pull out the column of data containing the word 'Male' and plot this against age, and then
2012 Mar 10
0
Help with confidence intervals for gam model using mgcv
Hi, I would be very grateful for advice on getting confidence intervals for the ordinary (non smoothed) parameter estimates from a gam. Motivation I am studying hospital outcomes in a large data set. The outcomes of interest to me are all binary variables. The one in the example here, Dead30d, is death within 30 days of admission. Sexf is gender (M or F), Age is age in years at the start
2009 Jun 08
1
[LLVMdev] Replacing unconditional branches with conditional ones
Hi all, Somewhat of a newbie's question, hope you can help me out. I'm trying to turn unconditional BranchInst's into conditional ones (with a condition I'm supplying) branching between the original target and a basic block of my choice. Apparently the way to do that is to create a new conditional BranchInst and remove the unconditional one from its basic block. However when
2010 Jan 26
1
Maptools runs out of memory installing the help files for spCbind-methods
Hi, I'd be grateful for help with the following:- Running R version 2.9.2 (2009-08-24) on Gentoo Linux, on an x86 PC. I am trying to install maptools, (via CRAN from maptools_0.7-29.tar.gz'), for the first time. All runs smoothly until the installation gets to "*** installing help indices" for spCbind-methods, about two thirds of the way through the help files, at which point
2010 Aug 13
1
Installing rJava fails on Gentoo (amd64) with Sun JDK - checking JNI data types... error
Installing rJava fails consistently, whether installed via the command line as below, or through "install.packages( 'rJava' )", and whether 0.84 or 0.85 is used, with the message :- "checking JNI data types... configure: error: One or more JNI types differ from the corresponding native type. You may need to use non-standard compiler flags or a different compiler in order to
2008 May 21
0
Errors in using gdb (PR#11496)
> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3294209241_521622 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have been unable to find any discussion regarding this issue, but I have been able to reproduce it on two different machines. Both computer are Macs running