search for: jour4life

Displaying 5 results from an estimated 5 matches for "jour4life".

2011 Jun 10
1
change value in one cell
Hello all, I am wondering if there is a way to change the value of one cell in R. For instance let's say I have a hypothetical data frame that looks like this: Obs X Y Z 1 1 0 1 2 0 0 1 3 1 1 1 4 0 1 1 5 1 1 0 6 0 0 0 I would like to change the value of the 4th observation in the Y column from 1 to 0. It should look like this: Obs X Y Z 1 1 0 1 2 0 0 1 3 1 1 1 4
2011 Jul 17
1
create multiple variables loop
Hello all, I am trying to figure out how to construct several new variables without having to write a code for each one. Specifically, I want to calculate ratios for several variables. For instance, let's say I have: df male1990 male1995 male2000 male2005 female1990 female1995 female2000 female2005 10 11 15 17 15 14
2011 Aug 31
1
looping by grouping variable
Hello all, I hope something is not already posted regarding this exact problem I am trying to solve. I've read through the forums and previous postings and am still confused as to how to approach this. Basically, what I am trying to do is construct variables that utilizes an average of a variable from a grouping, or higher order, variable. For instance, in my dataset I have variables, with
2011 Nov 13
4
identify duplicate from more than one column
Hi all, I've searched everywhere to try to find out how to do this and have had no luck. I am trying to construct identifiers for couples in a dataset. Essentially, I want to identify couples using more than one column as identifiers. Take for instance: obs unit home z sex age 1 015029 18 1 1 053 2 015029 18 1 2 049 3 015029 01 1 1 038 4 015029 01 1
2012 Apr 15
0
correct standard errors (heteroskedasticity) using survey design
Hello all, I'm hoping someone can help clarify how the survey design method works in R. I currently have a data set that utilized a complex survey design. The only thing is that only the weight is provided. Thus, I constructed my survey design as: svdes<-svydesign(id=~1, weights=~weightvar, data=dataset) Then, I want to run an OLS model, so: fitsurv<-svyglm(y~x1+x2+x3...xk,