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
I'm sorry to ask this silly question so long after you posted this response.
But I have also been trying to do this. What is the option to draw the
outlines the same color as the fill? I'm also using the "spdep" and
"maptools" libraries. I have shapefiles for Mexico (counties and read in the
spatia
Hi William,
This worked like a charm! I was thinking about using reshape(), but was
unsure on how to approach it. Though I have a whole lot of variables, I
decided to keep only those variables that contained both sexes'
characteristics, reshape it into wide format, and merge with the rest of the
d
Hi Josh,
I'm sorry, it was meant for you. I guess for now that error doesn't
matter...for now. Essentially, I want to repeat the conditions that state
the following, and continue doing so for several variables.
At the end of the day, I'm only going to keep the couple ID and remove the
duplicates.
Thanks Jim and David!
It seems like both were great options. Both of your suggestions of pasting
both IDs together worked well, keeping the pasting as a character is better.
Though, Jim's example was interesting, it gave me the following error:
Error in `$<-.data.frame`(`*tmp*`, "coupleid", value
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 unithome zsex
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
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
female2
help!
Carlos
On 6/10/2011 8:34 PM, jholtman [via R] wrote:
> you probably need to read the Introduction to R to understand indexing:
>
> > x
> Obs X Y Z
> 1 1 1 0 1
> 2 2 0 0 1
> 3 3 1 1 1
> 4 4 0 1 1
> 5 5 1 1 0
> 6 6 0 0 0
> > x[4, "
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
11 0 1
20 0 1
31 1 1
40 1 1
51 1 0
60 0 0
I would like to change the value of the 4th observation in t
Thanks so much. I really appreciate it.
Carlos
On 5/11/2011 3:18 PM, Thomas Lumley-2 [via R] wrote:
> On Thu, May 12, 2011 at 2:43 AM, jour4life <[hidden email]
> > wrote:
> > I have a follow up question. When using svyglm, it does not matter
> that I am
> > not u
I have a follow up question. When using svyglm, it does not matter that I am
not using survey design and only weights?
In other words,
fit<-svyglm(y~x1+x2+...xk,data=dataset,weights=weightvariable)
Or am I going to have to construct a survey design variable, using only the
weight variable?
Than
On 5/10/2011 3:12 PM, Thomas Lumley-2 [via R] wrote:
> On Tue, May 10, 2011 at 2:50 PM, jour4life <[hidden email]
> > wrote:
>
> > Hello all,
> >
> > I am wondering if there is a way to specify sampling weights for an ols
> > model using sample weights.
>
Hello all,
I am wondering if there is a way to specify sampling weights for an ols
model using sample weights.
For instance, right now, my code is:
fit.ex<-lm(y~x1+x2+x3+...xk,data=dataset,weights=weightvariable.)
summary(fit.ex)
But, there is almost no difference in the coefficients nor standa
14 matches
Mail list logo