12.07.2015 Views

R dummies

R dummies

R dummies

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

time specifying the margin argument.Take a look at the table again. You want to calculate the proportions overeach row, because each row represents one category of behavior. So, to get thecorrect proportions, you specify margin=1 like this:> prop.table(trial.table, margin=1)sick healthyrisk 0.7906977 0.2093023no_risk 0.2558140 0.7441860In every row, the proportions sum up to 1. Now you can see that 79 percent ofthe people showing risk behavior got sick. Well, it isn’t big news that risky behaviorcan cause diseases, and the proportions shown in the last result point in thatdirection. Yet, scientists believe you only if you can back it up in a more objectiveway. That’s the point at which you should consider doing some statistical testing.We show you how that’s done in the next chapter.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!