Re: [R] first time poster

2009-03-28 Thread jdeisenberg


rilleyel wrote:
 
 
 i am trying to answer the following question, and having no luck:
 Focus your analysis on a comparison between respondents labeled “Low”
 (coded 1) on attend4 and respondents labeled “High” (coded 4). Then,
 examine the variance of distributions. That is, run a command var.test.
 I feel like I need to recode somehow and create 2 new variables, one for
 the low responses, one for the high responses. I do not know how to 'get
 into' the variable to deal with just the answers...
 
 

I'm  not sure I understand what you want, but I'm guessing you have a data
frame with data like this, where the attend4 column has the high or low
ratings, and you want to compare variances on some other variable (called
score in this example):

 d - data.frame( attend4=c(1,4,1,1,4), score=c(20,30,21,22,24))
 d  
  attend4 score  
1   120  
2   430  
3   121  
4   122  
5   424

To separate the scores for people who had low scores vs. high scores, do
something like this:
 lows - d$score[d$attend4 == 1]
 lows
[1] 20 21 22
 highs - d$score[d$attend4 == 4]
 highs
[1] 30 24

Now you can do a var.test on lows vs. highs.

Hope this helps.

-- 
View this message in context: 
http://www.nabble.com/first-time-poster-tp22745190p22762547.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] first time poster

2009-03-27 Thread rilleyel

hi, so, please bear with me as I am new to the wonderful world of
computers...

i am trying to answer the following question, and having no luck:
Focus your analysis on a comparison between respondents labeled “Low” (coded
1) on attend4 and respondents labeled “High” (coded 4). Then, examine the
variance of distributions. That is, run a command var.test.
I feel like I need to recode somehow and create 2 new variables, one for the
low responses, one for the high responses. I do not know how to 'get into'
the variable to deal with just the answers...

I hope this makes enough sense for someone out there to help me

-- 
View this message in context: 
http://www.nabble.com/first-time-poster-tp22745190p22745190.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.