DS4PS / cpp-523-sum-2021

Course shell for CPP 523 Foundations of Program Eval I
http://ds4ps.org/cpp-523-sum-2021/
0 stars 2 forks source link

Error Code in R Studio while trying to plot #4

Open RoseMurphy237 opened 3 years ago

RoseMurphy237 commented 3 years ago

Hello,

My second and third plots came out just fine but the first one keeps giving me the error:

Error in draw_ci(b1, se, plot.title = "Model 1") : could not find function "draw_ci"

I see the draw_ci code, so I'm not sure what the issue is. I've checked to ensure I've downloaded all appropriate packages, but it still will not function. Should I close out and restart or is there a way for me to bypass this or fix it?

Thank you, Rose Murphy

lecy commented 3 years ago

You need to load the draw_ci() function, which is in one of the first chunks early in the RMD template. It might be in a source command.

RoseMurphy237 commented 3 years ago

Got it. Thank you!

lecy commented 3 years ago

No problem!

We leave issues open so they are visible in case others have the same question.

kidistbetter105 commented 3 years ago

Question 2? lab 3 can you guys explain this part of number two question? "What happened to the strength of the relationship? Why?"

lecy commented 3 years ago

The question is about what happens to a model when you add a second variable X2:

MODEL 1:    y = b0 + b1(X1) + e1
MODEL 2:    y = B0 + B1(X1) + B2(X2) + e2

You have different types of controls. One type does not impact the slope and the other type does.

image

image

Strength of the relationship would be a higher correlation between X1 and Y after adding X2 as a control.

Which case would cause this to happen?

image