Hmm, I think we’ll need to see more of your code to understand why bph
isn’t defined. One possibility: if it’s a column in a data frame, then you’ll need to refer to it as your_dataframe_name$bph
.
Here are some resources that might be helpful for making the transition from Stata-land to the R-chipelago:
- This book: http://r4stats.com/books/r4stata/
- And its associated DataCamp course: https://www.datacamp.com/courses/r-for-sas-spss-and-stata-users-r-tutorial
- This thread: What's your favorite intro to R?
- These pages with sample code for some common analyses in R/Stata/SAS/SPSS: https://stats.idre.ucla.edu/other/dae/ and https://stats.idre.ucla.edu/other/mult-pkg/whatstat/