similar to: Recoding using the memisc package

Displaying 20 results from an estimated 5000 matches similar to: "Recoding using the memisc package"

2012 Jul 24
3
package memisc: recode examples
Dear people, Yesterday I looked at the recode command in the memisc package and ran the following example stated in the manual: x <- as.item(sample(1:6,20,replace=TRUE), labels=c( a=1, b=2, c=3, d=4, e=5, f=6)) print(x) f <- as.factor(x) f recode(f,
2007 Jun 11
1
Recoding
I want to do some recoding of variables: code Age into groups and recode a factor into a smaller number of levels. There are a couple of options for recode functions, in the car package and in memisc, and I think in gmisc. Does anyone have any opinions on the the easiest, most reliable approach for these problems? David Scott _________________________________________________________________
2009 Jul 26
3
Sweave, cacheSweave, and data frame
Dear All, I have been using Sweave (mainly via the Sweave.sh script) and really like it. I am working a paper (using Sweave, of course) which includes several time-consuming computations, and it gets tedious to re-compile the whoel thing every time I made changes. Then I discover the "cacheSweave" package, which seems the right solution to my problem. I only have on problem. Here is
2008 Mar 13
2
recover masked functions?
Hi, I have loaded the packages car, memisc, Hmisc and all of these implement the function recode. The order in which the packages are loaded depends on the order I execute my scripts and thus is not always the same and the syntax of the recode function changes with the package. Is there any way to call specificly the memisc recode function? Or maybe it's better to detach all packages first
2011 Feb 13
1
Changes titles in ggplot2 plot
Dear Colleagues, In the following simple ggplot2 code: -------------------------------- m <- ggplot(d.fig, aes(time, prob)) m + stat_summary(fun.data = "median_hilow", conf.int = .95, geom = "smooth") + facet_wrap(~ Cohort, nrow=1) + coord_cartesian(ylim = c(0, .03)) -------------------------------- Is there a way to replace the y-axis label from "prob" to
2009 Apr 01
4
Recode of text variables
Hi all I am trying to do a simple recode which I am stumbling on. I figure there must be any easy way but haven't come across it. Given data of A","B","C","D","E","A" it would be nice to recode this into say three categories ie A and B becomes "Treat1", C becomes "Treat 2" and E becomes "Treat 3". I tried
2008 Aug 25
1
Output to Latex using Memisc almost works
Hello, I'm using memisc to output regression results to tables and latex. My problem is that the output that Latex needs must be in between $ $ so that it is read as formula but memisc does not output the result between $ $. For example, latex needs: $0.05^{***}$ and memisc outputs 0.05^{***} in an entry. I am new to Latex and I imagine it could also be a latex 'problem' and not
2010 Nov 02
5
Question about ggplot2
Dear All, I am trying to graph a simple scatter plot where the x axis is year and the y axis is a percentage (percentage of infant death). Instead of plotting the raw data, I want to plot summary statistics such as mean and median. Here is the problem: the value range of y is between 0 and 1, but since infant death is a rare event, the mean and median is very low (something like 5%), which shows
2012 Jul 25
1
Memisc package: imported varibles from SPSS have got wrong measurement
Dear list members, I have got another problem. I imported an SPSS file with the Memisc package using the following commands: mz <- spss.system.file("myspssfile.sav") mz <- subset(mz,select=c( bsex,balt,xurb,dtaet,kartab,bgeb,boseit,bgeblan,xnuts2,kausb,xerwstat, asbper,asbhh,ajahr,aquartal,bstaat,xwieoft,gew1,apkz,bpkzm,bpkzv)) Afterwards I checked the measurements of the
2010 Apr 07
2
recoding variables-recode not working
Hi, I have numerical variable that I want to recode into categories '0' and '1 and more' and do analysis with that data. I have tried various of possibilities to do so, but I am sucked and nothing is working. recode(Q12, "0='A';1:30='B'") cut(Q12, breaks=c(0,1,30), lables=c('0', '1 and more')) cat(Q12, "0=0;1-33=1") What should
2011 Jan 06
2
memisc-Tables with robost standard errors
Hello, I've got a question concerning the usage of robust standard errors in regression using lm() and exporting the summaries to LaTeX using the memisc-packages function mtable(): Is there any possibility to use robust errors which are obtained by vcovHC() when generating the LateX-output by mtable()? I tried to manipulate the lm-object by appending the "new" covariance
2010 Jan 28
1
Recoding Variables in R
VAR 980490 Some people have suggested placing new limits on foreign imports in order to protect American jobs. Others say that such limits would raise consumer prices and hurt American exports. Do you FAVOR or OPPOSE placing new limits on imports, or haven't you thought much about this? 1. Favor 5. Oppose 8. DK 9. NA; RF 0. Haven't thought much about this I am trying to
2005 Aug 23
1
Seeking help with an apparently simple recoding problem
Hello, I have struggled, for longer than I care to admit, with this seemingly simple problem, but I cannot find a solution other than the use of long drawn out ifelse statements. I know there has to be a better way. Here is stripped down version of the situation: I start with: a <- c(1,0,1,0,0,0,0) b <- c(1,1,1,1,0,0,0) c <- c(1,1,0,1,0,0,0) rbind(a,b,c) [,1] [,2] [,3] [,4] [,5]
2010 Jul 23
1
FW: recoding problem
Hi, I am trying to recode the output from a matrix(here is a small snippet of it): HGlt10RawPerc2008[1:20] [1] -5 0 -1 -1 0 2 3 -5 -2 0 2 0 1 -2 3 0 4 1 4 2 Here is the code I am using to recode it: HGBlt10Points2008 = recode(HGlt10RawPerc
2011 Feb 18
3
recoding a data in different way: please help
Dear R users The following question looks simple but I have spend alot of time to solve it. I would highly appeciate your help. I have following dataset from family dataset : Here we have individuals and their two parents and their marker scores (marker1, marker2,....and so on). 0 means that their parent information not available. Individual Parent1 Parent2 mark1 mark2 1 0 0
2013 Jan 25
1
Recoding variables (without recode() )
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130125/859c4520/attachment.pl>
2008 May 19
2
recoding data with loops
# I'm new to R and am trying to get the hang of how it handles # dataframes & loops. If anyone can help me with some simple tasks, # I'd be much obliged. # First, i'd like to generate some random data in a dataframe # to efficiently illustrate what I'm up to. # let's say I have six variables as listed below (I really # have hundreds, but a few will illustrate the point). #
2008 Jun 27
4
Recoding
Hi! Given a vector (or a factor within a df),i.e. v1 <- c(1,1,1,2,3,4,1,10,3) and a dictionary cbind(c(1,2,3),c(1001,1002,1003)) is there a function (on the same line than recode() in car) to get v2 as c(1001,1001,1001,1002,1003,4,1001,10,1003) ? I'm using myself a function based on match() since long ago (I think that thanks to advice by Prof. B. Ripley), but would like to know if there
2004 Jul 03
3
Recoding scores of negatively worded item
Hi, I'm new to R so please fogive if I write someting silly ... I need to recode a series of responses from a number of questionnaires. The data is read via ODBC from a database where all responses are coded as tables of the form (id, question, score). After dealing with recoding of missing values, I need to "invert" the scores of some questionnaire's item in the form x <-
2004 Mar 11
5
recoding variables
Hi, I was hoping someone could help me. I am a graduate student new to using R, and I'm trying to figure out how to recode a continuous variable to make it into an ordinal variable with 3 categories. I literally have no idea how to proceed--could anyone possibly advise me? Please copy me on any responses, as I have just subscribed to the R-help email list but don't know whether the