Open asukajames opened 3 years ago
Comma is in the wrong place:
table( dat$f1, dat$gender )
numeric variable would be a t-test not a chi-square
Sorry, not online or I’d go into more detail but there should be examples in the notes.
@lecy Thank you for the quick response! I got the t-test coding from the notes and was able to run the date to interpret :-)
Since this is another Lab 2 question I figured I'd jump on this same chain: For Question #7 the table I'm generating for income is REALLY long so I'm wondering if that is a full data set and according to the submission instructions we are not supposed to print it like that. Is there a way to condense it or is this what I'm supposed to be seeing?
@ebossert note that you will create table when your outcome is binary (yes/no) or categorical. If your outcome is continuous then you should be comparing the two groups using t-tests, not tables.
You will find an example of code for a t-test in the notes.
@lecy I haven't taken Intro to Programming yet and I don't know how to construct a contrast in R. Can you provide some type of resource that will help me get through this lab?
All of the code you need should be in the lab already. I’ll post a template in a few minutes if that helps
Yes, that would be very helpful. Thanks!
You can right-click on this link and "save-as" then same it as an RMD file on your computer:
https://raw.githubusercontent.com/Watts-College/cpp-524-fall-2021/main/labs/lab-02-template.rmd
Double-check to make sure the questions have not changed. They are updated on occasion. But the template should get you started at least.
I keep getting this error message when entering the code:
What code are you running when you get that error?
The option for more accurate p-values pertains to the chi-square test only. There is no equivalent option for the t-test because there is a closed-form mathematical solution for t-tests so the p-values do not need to be simulated. The first t-test you ran is all you need.
Thank you!!
Hello,
I want to make sure that I am using the correct coding for Lab2
Also, I get an error with library( ggplot2 ) when I run this chunk.
Additionally, I am not sure how I can change or if I need to change coding for numeric variable type.