Back
OtherItalian

Laboratorio 3 Regressione Logistica

Study material for Modelli e Metodi dell'Inferenza Statistica, shared by the Studwiz community and reviewed by moderators.

Modelli e Metodi dell'Inferenza StatisticaOther

Document information

What's included in this study material

Study material for Modelli e Metodi dell'Inferenza Statistica, shared by the Studwiz community and reviewed by moderators.

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

Laboratorio conR-3 Metodi e Modelli per l’Inferenza Statistica - Ing. Matematica - a.a. 2019-20 Contents 0. Librerie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Reference: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1. Regressione logistica semplice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. Regressione logistica multipla . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3. Curva ROC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 0. Librerie library( rms ) library(arm) library(ResourceSelection) library(pROC) Reference: Agresti, A. (2003). Categorical data analysis (Vol. 482). John Wiley & Sons. 1. Regressione logistica semplice Prendiamo in esame il dataset relativo ad uno studio clinico su pazienti a etti da disturbi coronarici. In particolare, l’obiettivo dello studio consiste nello spiegare la presenza o l’assenza di significativi disturbi coronarici (CHD) in funzione dell’età (variabile AGE) dei pazienti. I dati si riferiscono a 100 pazienti. Le variabili del database sono descritte nel fileCHDAGE_data_description.txt: •CHDvariabile dipendente binaria: 1 se il disturbo è presente, 0 se il disturbo è assente; •AGEvariabile indipendente ( continua ). Sito da cui trarre dati e datasethttp://www.umass.edu/statdata/statdata/ Soluzione Importiamo i dati. chd =read.table("CHDAGE_data.txt",head =TRUE) str( chd ) ## data.frame : 100 obs. of 3 variables: ## $ ID : int 1 2 3 4 5 6 7 8 9 10 ... ## $ AGE: int 20 23 24 25 25 26 26 28 28 29 ... ## $ CHD: int 0 0 0 0 1 0 0 0 0 0 ... head( chd ) ## ID AGE CHD ## 1 1 20 0 1 ## 2 2 23 0 ## 3 3 24 0 ## 4 4 25 0…

Preview

First page of the document.

First page: Laboratorio 3 Regressione Logistica