data 4137 obs. of 12 variables : int 920 1170 810 940 1180 980 880 9.. : int 43 18 14 40 18 114 78 55 18 17 $ sat $ tothrs $ colgpa $ athlete : int $ verbmath: num $ hsize ... : num 2.04 4 1.78 2.42 2.61 ... 1 0 1 0 0 0 0 0 0 0 ... 0.484 0.828 0.884 0. 808 0.735 .... : num 0.1 9.4 1.19 5.71 2.14 2.68 3.1..

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I have a dataset with variables below. How do I write a code in RStudio using the lm function to perform the linear regression for

1) Female + Athelete; 2)Female + Nonathlete? 

data
4137 obs. of 12 variables
: int
: int 43 18 14 40 18 114 78 55 18 17
$ sat
$ tothrs
$ colgpa
$ athlete : int
$ verbmath: num
$ hsize
$ hsrank : int 4 191 42 252 86 41 161 101 161
$ hsperc
$ female
$ white
$ black
$ hsizesq : num
920 1170 810 940 1180 980 880 9...
...
: num
2.04 4 1.78 2.42 2.61
...
1 0 10 0 0 0 0 0 0 ...
0.484 0.828 0.884 0.808 0.735
....
: num
0.1 9.4 1.19 5.71 2.14 2.68 3.1...
...
: num
: int
: int
: int
40 20.3 35.3 44.1 40.2 ...
1 0 0 0 0 1 0 0 0 0
0 1 1 1 1 1 0 1 1 1
0 0 0 0 0 0 0 0 0 0 ...
0.01 88.36 1.42 32.6 4.58 ..
...
Transcribed Image Text:data 4137 obs. of 12 variables : int : int 43 18 14 40 18 114 78 55 18 17 $ sat $ tothrs $ colgpa $ athlete : int $ verbmath: num $ hsize $ hsrank : int 4 191 42 252 86 41 161 101 161 $ hsperc $ female $ white $ black $ hsizesq : num 920 1170 810 940 1180 980 880 9... ... : num 2.04 4 1.78 2.42 2.61 ... 1 0 10 0 0 0 0 0 0 ... 0.484 0.828 0.884 0.808 0.735 .... : num 0.1 9.4 1.19 5.71 2.14 2.68 3.1... ... : num : int : int : int 40 20.3 35.3 44.1 40.2 ... 1 0 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 ... 0.01 88.36 1.42 32.6 4.58 .. ...
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to Coding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education