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 RStudio while running chunk for auxiliary regression in Lab4 #7

Open wskamanda opened 3 years ago

wskamanda commented 3 years ago

Hello I am trying to run the chunks for Lab4, but the chunk for estimating auxiliary regression kept showing this error below;

Error in .stargazer.wrap(..., type = type, title = title, style = style, : object 'm.auxiliary' not found

Is there anything I can do to fix it? Please help Thanks William

lecy commented 3 years ago

Please review the discussion board etiquette:

https://ds4ps.org/cpp-523-sum-2021/help/

This is not meant as a nit-picky request, but is a professional norm of communication within the field.

To assess the problem we need to see the code that is producing the error. Which chunk are you getting stuck on specifically?

lecy commented 3 years ago
m.full <- lm( SWB ~ ND + PSS, data=dat )
m.naive <- lm( SWB ~ ND, data=dat )
m.auxiliary <- # your model here

It can't find object m.auxiliary because you haven't specified it yet. You need to add the proper variables to create the auxiliary regression.

kidistbetter105 commented 3 years ago

Am facing the problem?

kidistbetter105 commented 3 years ago

m.auxiliary <- # your model here Do I have to add the model in here?

lecy commented 3 years ago

Correct!

kidistbetter105 commented 3 years ago

I did , but still the same . <- lm( ND ~ SWB, data=dat )

lecy commented 3 years ago

Did you assign the model to the new object called m.auxiliary?

m.auxiliary <- lm( ND ~ SWB, data=dat )
kidistbetter105 commented 3 years ago

yes!

Am I wrong?

On Thu, Jun 10, 2021 at 4:55 PM Jesse Lecy @.***> wrote:

Did you assign the model to the new object called m.auxiliary?

m.auxiliary <- lm( ND ~ SWB, data=dat )

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DS4PS/cpp-523-sum-2021/issues/7#issuecomment-859161590, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATZH47VQD2H2NXYU25XRZSLTSFGHXANCNFSM46LID4IA .

lecy commented 3 years ago

That’s correct, should resolve the error you were getting. Are you still receiving an error?

kidistbetter105 commented 3 years ago

yes ! am still receiving the Error.

lecy commented 3 years ago

Can you please share your code from the chunk and the error?

kidistbetter105 commented 3 years ago

ok

On Thu, Jun 10, 2021 at 7:48 PM Jesse Lecy @.***> wrote:

Can you please share your code from the chunk and the error?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DS4PS/cpp-523-sum-2021/issues/7#issuecomment-859222264, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATZH47SPWS5TC6MRF6BIZGLTSF2OJANCNFSM46LID4IA .

kidistbetter105 commented 3 years ago
On Thu, Jun 10, 2021 at 9:15 PM Kidist Gondel ***@***.***> wrote: > ok > > On Thu, Jun 10, 2021 at 7:48 PM Jesse Lecy ***@***.***> > wrote: > >> Can you please share your code from the chunk and the error? >> >> — >> You are receiving this because you commented. >> Reply to this email directly, view it on GitHub >> , >> or unsubscribe >> >> . >> >
kidistbetter105 commented 3 years ago

This is what I get when I run the chunk.

On Thu, Jun 10, 2021 at 9:31 PM Kidist Gondel @.***> wrote:

DV: PSS
ND
SWB0.03***
(0.01)
Constant5.04***
(0.32)
Observations389
Adjusted R20.02
Standard errors in parentheses*p<0.1; **p<0.05; ***p<0.01
On Thu, Jun 10, 2021 at 9:15 PM Kidist Gondel ***@***.***> wrote: > ok > > On Thu, Jun 10, 2021 at 7:48 PM Jesse Lecy ***@***.***> > wrote: > >> Can you please share your code from the chunk and the error? >> >> — >> You are receiving this because you commented. >> Reply to this email directly, view it on GitHub >> , >> or unsubscribe >> >> . >> >
lecy commented 3 years ago

That’s correct - it’s stargazer output. If you knit the file it will look proper (it’s HTML code that creates the table).

if you want to preview output in the document change the stargazer argument to type=“text” and it will create a basic view. Just change it back to type=“html” before you knit.

kidistbetter105 commented 3 years ago

Ok now I understand! Thanks for the help!

Sent from my iPhone

On Jun 10, 2021, at 11:16 PM, Jesse Lecy @.***> wrote:

 That’s correct - it’s stargazer output. If you knit the file it will look proper (it’s HTML code that creates the table).

if you want to preview output in the document change the stargazer argument to type=“text” and it will create a basic view. Just change it back to type=“html” before you knit.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

DV: PSS
ND
SWB0.03***
(0.01)
Constant5.04***
(0.32)
Observations389
Adjusted R20.02
Standard errors in parentheses*p<0.1; **p<0.05; ***p<0.01