Guia de curs: Descripció de dades, Inferència, Regressió Simple i Múltiple, Regressió Logística

Μέγεθος: px
Εμφάνιση ξεκινά από τη σελίδα:

Download "Guia de curs: Descripció de dades, Inferència, Regressió Simple i Múltiple, Regressió Logística"

Transcript

1 Guia de curs: Descripció de dades, Inferència, Regressió Simple i Múltiple, Regressió Logística Albert Satorra UPF, Mètodes Estadístics, 2015 Mètodes Estadístics, UPF, Hivern

2 Continguts 1 Descripció de dades i inferència estadística 2 Distribució bivariada: regressió simple 3 Regressió múltiple 4 Regressió en dades de paisos.sav Robust s.e. (Optional) 5 Regressió dades de pressupostos familiars, family.sav 6 Més exemple de regressió, amb dades de pressupostos familiars 7 Regressió Logística 8 Case Influence statistics 9 Multicolinealitat Multiple regression and multicolinearity 10 Case influence 11 Cluster effects: robust s.e. 12 Second data set: multiple regression and logistic regression 13 Another example of logistic regression Mètodes Estadístics, UPF, Hivern

3 Fitxer de Dades: dades de consum i renda Mostra aleatoria de mida n = 800 d una població Variables: despesa, renda, gènere (1/0, noi = 1), vot (1/0, partit A = 1) Fixer de dades és a la web (dues opcions.sav i el.txt): library(foreign) data=read.spss(" data= read.table(" header =T) names(data) "Lrenda" "Ldespeses" "Genere" "Vot" data=as.data.frame(data) > head(data) Lrenda Ldespeses Genere Vot > tail(data) Lrenda Ldespeses Genere Vot Mètodes Estadístics, UPF, Hivern

4 Fitxer de dades Lrenda Ldespeses Genere Vot Mètodes Estadístics, UPF, Hivern

5 Anàlisi Univariant (repliqueu amb SPSS) : attach(data) renda=exp(lrenda) despeses = exp(ldespeses) summary(renda) Min. 1st Qu. Median Mean 3rd Qu. Max summary(despeses) Min. 1st Qu. Median Mean 3rd Qu. Max Mitjanes i desviacions estàndard: apply(data,2,mean) Lrenda Ldespeses Genere Vot apply( data,2,sd) Lrenda Ldespeses Genere Vot Destribució univariant (renda, Ldespeses): summary(renda) Min. 1st Qu. Median Mean 3rd Qu. Max sd(renda) = summary(ldespeses) Min. 1st Qu. Median Mean 3rd Qu. Max sd(ldespeses) = Diagrama de dispersió: Lrenda vs Ldespeses. Mètodes Estadístics, UPF, Hivern

6 Histograma de la variable Renda Histograma (freq.) de variable renda Frequency e+00 1e+05 2e+05 3e+05 4e+05 5e+05 renda Figure : Mètodes Estadístics, UPF, Hivern

7 Histograma de la variable log de Renda Lrenda = log(renda) Histograma (freq.) de la variable log de renda Frequency log(renda) Mètodes Estadístics, UPF, Hivern

8 Inferència sobre la renda mitjana de la població x = 36940, s = s.e. = /sqrt(800) = ± / 800 = [ , ] 95% IC de la mitjana aritmètica de la renda 1 Noteu que: mean(lrenda)= , sd(lrenda) = mean(lrenda) + 2*sd(Lrenda)/sqrt(800) = ; mean(lrenda) - 2*sd(Lrenda)/sqrt(800)= El 95% IC de la mitjana poblacional de Lrenda és: (9.96, 10.10) 1 Hom es pot preguntar si no aldria estimar la mediana en lloc de la mitjana aritmètica Mètodes Estadístics, UPF, Hivern

9 Comenteu, en aquesta base de dades: 1 Tipus de variables, tipus de distribució de les variables continues 2 Estandardització de X: x = x i x s x ( scale(lrenda) ) 3 Inferència sobre la renda mitjana µ de la població (estimació, intèrval de confiança,... ) 4 Mida de mostra per una determinada precisió: inferència sobre la mitjana de renda,sobre la proporció de vot =1, i altres paràmetres de la població. Mètodes Estadístics, UPF, Hivern

10 Relació bivariant: diagrama de dispersió 0e+00 1e+05 2e+05 3e+05 4e+05 5e renda despeses Figure : Diagrama de dispersió de despeses vs renda Mètodes Estadístics, UPF, Hivern

11 Relació bivariant: diagrama de dispersió 0e+00 1e+05 2e+05 3e+05 4e+05 5e renda Ldespeses Figure : Diagrama de dispersió de Ldespeses vs renda Mètodes Estadístics, UPF, Hivern

12 Relació bivariant: diagrama de dispersió Lrenda Ldespeses Figure : Diagrama de dispersió de Ldespeses sobre Lrenda, dades estandarditzades Mètodes Estadístics, UPF, Hivern

13 Coeficient de correlació, r > cor(renda,despeses) [1] > cor(renda,ldespeses) [1] > cor(lrenda,ldespeses) [1] > round(cor(lrenda,ldespeses),2) [1] 0.44 > (cor(lrenda,ldespeses))^2 [1] El coeficient de rcorrelació r entre log de despesa i el log de renda és: r = 0.44 El quadrat r 2 del coeficient de correlació, el , és el coeficient de determinació R 2 del tema següent, la regressió Mètodes Estadístics, UPF, Hivern

14 Funció esperança condicionada: E(Y X ) Regressió lineal: Regressió lineal simple: Y = α + βx + ɛ on ɛ és independent (incorrelacionada) amb X Regressió lineal múltiple: Y = α + β 1 X 1 + β 2 X β k X k + ɛ on ɛ és independent (incorrelacionada) amb X 1,..., X k Nomenclatura: α és el terme independent (la constant, el intercept ); els βs són coeficients de regressió. En la regressió múltiple, β 1,..., β k són coeficients de regressió parcial. El ɛ és el terme de perturbació del model. Mètodes Estadístics, UPF, Hivern

15 Efecte de Regressio scale(lrenda) scale(ldespeses) Y=X regressio Figure : Efecte de regressió Mètodes Estadístics, UPF, Hivern

16 Figure : Dades de Francis Galton: ( ): Recta de regressió de Alçada de Fills vs. Alçada Pare Mètodes Estadístics, UPF, Hivern

17 Exemple de regressió simple (dades estandarditzades) library(texreg) texreg(lm(scale(ldespeses) ~ scale(lrenda))) Model 1 (Intercept) 0.00 scale(lrenda) 0.44 (0.03) R Num. obs. 800 Table : Fit of the simple regression with standardized data Mètodes Estadístics, UPF, Hivern

18 Exemple de regressió simple Model de regressió: Y = α + βx + ɛ, ɛ (0, σ 2 ɛ ), on Y = Ldespesa, X=Lrenda. Estimacions de α i β a: 2.08 b: 0.29 (0.02) R Num. obs. 800 Table : Taula de resultats 19% de la variació de Y ve explicada per la variació de X El coeficient de regressió de Y sobre X és positiu, 0.29, i altament significatiu (p < 0.001) Un increment de una unitat de X va associada a un increment de 0.29 del valor esperat de Y (variables expressades en logaritmes) Coeficients beta: de Lrenda, sqrt(0.19) = 0.44 Són els coeficients de regressió quan les variables són estandarditzades (en aquest cas, els α = 0 ) Mètodes Estadístics, UPF, Hivern

19 Regressió Múltiple re=lm(ldespeses ~ Lrenda + texreg(re) Genere) Model de regressió: Y = α + β 1 X 1 + β 2 X 2 + ɛ, ɛ (0, σ 2 ɛ ), on Y = Ldespesa, X1=Lrenda, X2=Gènere Table : Multiple regression Estimates (Intercept) 2.98 Lrenda 0.22 (0.02) Genere (0.04) R n 800 this is OLS analysis Mètodes Estadístics, UPF, Hivern

20 The linear multiple regression model (a bit of theory) It assumes, the regression function E(Y X ) is lineal in its inputs X 1, X 2,..., X k ; i.e. E(Y ) = α + β 1 X β k X k β 1 is the expected change in Y when we increase X 1 by one unit ceteris paribus all the other variables being constant. for prediction purposes, can sometimes outperform fancier more complicated models, specially in situations with small sample size it applies to transformed variables, so they encompass a large variety of functions for E(Y X ) for the X s variables, it requires them to be continuous or binary variables we have Y = E(Y X ) + ɛ, where the disturbance term ɛ is a random variable assumed to be independent of X, typically with variance that does not change with X (homoscedastic residuals) for the fitted model, we have Ŷ = a + b 1 X b k X k, where the bs are partial regression coefficients (obtained usually by OLS), and e = Y Ŷ define de residuals Note that E(Y X 1 ) is different than E(Y X 1, X 2 ) or E(Y X 1, X 2..., X k ). So, the regression coefficient b 1 for X 1 will typically change depending on which additional variables, besides X 1, we are conditioning. In causal analysis, researchers are interested in the change on Y 1 when we change X 1. This is a complicated issue that can only be answer properly with more context regarding the design of the data collection. So far we have been dealing only with a conditional expectation model (no elements have been introduced yet for proper causal analysis) Mètodes Estadístics, UPF, Hivern

21 Regressió Múltiple 1 35% de variació de Y és explicada per la variació conjunta de Lrenda i Genere 2 Comparem el coeficients de regressió de Lrenda de la regressió simple i múltiple: 0.29 versus Interpretació dels coeficients de regressió: coeficients de regressió parcials. Variació de Y quan variem X1 ceteris paribus (control) les altres var. explicatives 4 La despesa difereix per gènere? 5... Mètodes Estadístics, UPF, Hivern

22 Residuals vs Fitted 164 Residuals Fitted values lm(ldespeses ~ Lrenda + Genere) Mètodes Estadístics, UPF, Hivern

23 library(faraway); prplot(re,1) Lrenda beta*lrenda+res Figure : Partial regression plot: Y versus X1 Mètodes Estadístics, UPF, Hivern

24 library(faraway); prplot(re,2) Genere beta*genere+res Figure : Partial regression plot: Y versus X2 Mètodes Estadístics, UPF, Hivern

25 Exemple de regressió múltiple: dades Paisos.sav Pregunta: calories en la dieta afecta a l esperança de vida? Sintaxis de SPSS Mètodes Estadístics, UPF, Hivern

26 Lectura de dades library(foreign) data=read.spss( " use.value.labels = TRUE, to.data.frame = max.value.labels = Inf, trim.factor.names = FALSE, trim_values = TRUE, reencode = NA, use.missings = c(99999)) > attach(data) attach(data) names(data) CALORIES[(CALORIES == 9999)]=NA Mètodes Estadístics, UPF, Hivern

27 Variables $ESPVIDA [1] [17] [33] [113] [129] [145] $PIB [1] [14] [105] [118] [131] NA NA NA NA NA [144] NA NA NA NA NA NA NA NA NA NA NA NA NA [157] NA NA NA NA $ALFAB [1] [17] [33] [49] [145] Mètodes Estadístics, UPF, Hivern

28 Data frame > data=as.data.frame(data) > head(data) IDH NIVELL PAIS ESPVIDA PIB ALFAB CONT CALORIES HABMETG DIARIS TV baix Mozambique \300frica baix Tanzania \300frica baix Etiopia \300frica baix Sierra Leona \300frica baix Butan \300sia NA NA NA baix Nepal \300frica SANITAT AGRICULT INDUST NA > Mètodes Estadístics, UPF, Hivern

29 Diagrama de dispersió: Esper. vida vs. Calories CALORIES ESPVIDA Figure : Gràfic de dispersió: ESPEV versus CALORIES Mètodes Estadístics, UPF, Hivern

30 Regressió simple: ESPEV vs. CALORIES Model 1 (Intercept) CALORIES (0.0010) R Num. obs. 152 Table : Statistical models length(espvida)= 160 Mètodes Estadístics, UPF, Hivern

31 Regressió simple: ESPEV vs. CALORIES, ALFAB Model 1 (Intercept) CALORIES ( ) ALFAB (0.0227) R Num. obs. 152 Table : Fit of multiple regression Mètodes Estadístics, UPF, Hivern

32 plot matricial, variables en escala original ESPVIDA CALORIES PIB SANITAT HABMETG ALFAB DIARIS TV AGRICULT Figure : Matrix Plot Mètodes Estadístics, UPF, Hivern

33 plot matricial, variables en escala transformada ESPVIDA CALORIES LPIB SANITAT Lhabmetges ALFAB Ldiaris LTV AGRICULT Figure : Matrix Plot Mètodes Estadístics, UPF, Hivern

34 ESPEV regressed on CALORIES +LPIB + Lhabmetges +ALFAB Transformation of variables (linearizing regression): LPIB = log(pib); Lhabmetges = log(habmetg) (Intercept) Model CALORIES (0.0012) LPIB (0.4524) Lhabmetges (0.5231) ALFAB (0.0255) R Adj. R Num. obs. 120 p < 0.05 Table : Multivariate Regression res=lm(espvida ~ CALORIES +LPIB + Lhabmetges +ALFAB) texreg(re, stars=0.05, digits=4) ### residuls versus fitted y plot(res,1) Mètodes Estadístics, UPF, Hivern

35 Fitted values Residuals lm(espvida ~ CALORIES + LPIB + Lhabmetges + ALFAB) Residuals vs Fitted Figure : Residuals vs. fitted Y Mètodes Estadístics, UPF, Hivern

36 CALORIES beta*calories+res Figure : Gràfic de regressió parcial: ESPVI versus CALORIES Mètodes Estadístics, UPF, Hivern

37 Lhabmetges beta*lhabmetges+res Figure : Gràfic de regressió parcial: ESPVI versus Lhabmetges Mètodes Estadístics, UPF, Hivern

38 (Optional) Regression with regular s.e. r1=lm(ldespeses ~ Lrenda + Genere) Estimate Std. Error t value Pr(> t ) (Intercept) <2e-16 *** Lrenda <2e-16 *** Genere <2e-16 *** # get X matrix/predictors X <- model.matrix(r1) # number of obs n <- dim(x)[1] # n of predictors k <- dim(x)[2] # calculate stan errs as in the above # sq root of diag elements in vcov se <- sqrt(diag(solve(crossprod(x)) * as.numeric(crossprod(resid(r1))/(n-k)))) > se (Intercept) Lrenda Genere Mètodes Estadístics, UPF, Hivern

39 (Optional) Regression with heteroscedastic robust s.e. r1=lm(ldespeses ~ Lrenda + Genere) X <- model.matrix(r1) n <- dim(x)[1] k <- dim(x)[2] # residual vector u <- matrix(resid(r1)) # meat part Sigma is a diagonal with u^2 as elements meat1 <- t(x) %*% diag(diag(crossprod(t(u)))) %*% X # degrees of freedom adjust dfc <- n/(n-k) # like before se <- sqrt(dfc*diag(solve(crossprod(x)) %*% meat1 %*% solve(crossprod(x)))) > se (Intercept) Lrenda Genere Mètodes Estadístics, UPF, Hivern

40 (Optional) Regression with s.e. robust to clustering # clustered standard errors in regression #by : cl <- function(dat,fm, cluster){ require(sandwich, quietly = TRUE) require(lmtest, quietly = TRUE) M <- length(unique(cluster)) N <- length(cluster) K <- fm$rank dfc <- (M/(M-1))*((N-1)/(N-K)) uj <- apply(estfun(fm),2, function(x) tapply(x, cluster, sum)); vcovcl <- dfc*sandwich(fm, meat=crossprod(uj)/n) coeftest(fm, vcovcl) } Mètodes Estadístics, UPF, Hivern

41 (Optional) Regression with s.e. robust to clustering r1=lm(ldespeses ~ Lrenda + Genere) summary(r1) Estimate Std. Error t value Pr(> t ) (Intercept) <2e-16 *** Lrenda <2e-16 *** Genere <2e-16 *** clust= sample(1:40,800, replace=t) > tabulate(clust) [1] [26] cl(cbind(ldespesesa,genere, clust), fit, clust) Estimate Std. Error t value Pr(> t ) (Intercept) < 2.2e-16 *** Lrenda < 2.2e-16 *** Genere < 2.2e-16 *** Mètodes Estadístics, UPF, Hivern

42 Material addicional de regressió simple i multiple 1 web del curs M2014 M2012Setmanes12: Detalls de la regressió lineal simple i multiple + sintaxis SPSS 2 Idra UCLA: SPSS Web Books Regression with SPSS Mètodes Estadístics, UPF, Hivern

43 Regressió lineal simple Y i = α + βx i + ɛ i, i = 1,..., n Nomenclator α terme independent β coefficient de regressió E(Y i ) = α + βx i β és un increment en el valor esperat de Y d un augmenta unitari en la variable X terme de perturbació ɛ, variable estadística ɛ (0, σ 2 ɛ ), valor esperat zero i variància constant, ɛ i és un dels valors d aquesta variable Noteu que σ 2 ɛ representa la intensitat de variació de Y al voltant de la recta de regressió Y = α + βx i Ajust de la regressió Ŷ i = a + bx i, i = 1,..., n a = ; b = , a i b són estimacions de α i β respectivament. Mètodes Estadístics, UPF, Hivern

44 Regressió lineal simple (cont.) Totes les estimacions estan subjectes a un error tipus (standard error). En el nostre exemple: Paràmetre α β Estimació error tipus Coeficient de determinació múltiple, R 2 = És a dir, 3.4% de la variació de Y és deguda a la variable X. Residual standard error: on 1912 degrees of freedom Mètodes Estadístics, UPF, Hivern

45 Table of estimates of simple regression Estimate Std. Error t value Pr(> t ) (Intercept) NMEMB Mètodes Estadístics, UPF, Hivern

46 Regressió múltiple: Y versus X1 X2 Variable AGE OF HEAD of the family. summary(age1.1[index == FALSE]) Min. 1st Qu. Median Mean 3rd Qu. Max Estimate Std. Error t value Pr(> t ) (Intercept) NMEMB AGE Mètodes Estadístics, UPF, Hivern

47 Regressió lineal multiple Y i = β 0 + β 1 X 1i + β 2 X 2i + ɛ i, i = 1,..., n β 0 terme independent β 1, β 2 coefficients de regressió parcial E(Y i ) = β 0 + β 1 X 1i + β 2 X 2i β 2 és un increment en el valor esperat de Y d un augmenta unitari en la variable X 2 quan X 1 és manté constant (ceteris paribus X 1 ). Idem per β 1 (versus X 2 ) terme de perturbació ɛ, variable estadística ɛ (0, σɛ 2 ), valor esperat zero i variància constant, ɛ i és un dels valors d aquesta variable Noteu que σɛ 2 representa la intensitat de variació de Y al voltant de la recta de regressió Y = β 0 + β 1 X 1i + β 2 X 2i Regressió estimada Ŷ i = b 0 + b 1 X 1i + b 2 X 2i, i = 1,..., n b 0 = ; b 1 = ,b 2 = R 2 = és un 4.4% de variació de Y ve explicada per la variació conjunta de X 1 i X 2 Mètodes Estadístics, UPF, Hivern

48 Fitxer de Dades Enquesta de pressupostos famliars. Mostra aleatoria de families de la població Espanya. Mida de mostra, n = variables de tipus de despesa i característiques familiars. Fitxers a la web (.dta,.sav): Mètodes Estadístics, UPF, Hivern

49 Histogram: log despeses en Entertainment histograma: log(despeses en entertainment) Frequency log(exp7.1[index == FALSE]) Figure : Mètodes Estadístics, UPF, Hivern

50 Relació amb no. de membres de la familia The variable number of people in the family table(nmemb.1) NMEMB round(table(nmemb.1)/2640,2) NMEMB Mètodes Estadístics, UPF, Hivern

51 Relation with number of people in the family b= aggregate(log(exp7.1[index==false]), list(nmemb.1[index==false]), mean) A=cbind(round(b[,2],2),table(list(NMEMB.1[index==FALSE]))) colnames(a) =c("cond. mean", "size of cond. sample") t(a) cond. mean size of cond. sample cond. mean size of cond. sample Mètodes Estadístics, UPF, Hivern

52 Regressió lineal: log(despeses) versus no.membres familia Lrenda = log(renda) X Y Mètodes Estadístics, UPF, Hivern

53 Regressió lineal: log(despeses) versus no.membres familia Lrenda = log(renda) X Y Mètodes Estadístics, UPF, Hivern

54 Regressió lineal: log(despeses) versus no.membres familia Lrenda = log(renda) X Y Mètodes Estadístics, UPF, Hivern

55 Diagrama de dispersió: Consum versus no. membres familia X Y regression line conditional mean 2 sd cond. mean Mètodes Estadístics, UPF, Hivern

56 Regressió lineal: log(despeses) versus no.membres familia Lrenda = log(renda) NMEMB.1[index == FALSE] log(exp7.1[index == FALSE]) Mètodes Estadístics, UPF, Hivern

57 Relation with number of people in the family: Regression res=lm(log(exp7.1[index==false]) ~ NMEMB.1[index==FALSE]) > summary(res) Call: lm(formula = log(exp7.1[index == FALSE]) ~ NMEMB.1[index == FALSE]) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) <2e-16 NMEMB.1[index == FALSE] <2e-16 Residual standard error: on 1912 degrees of freedom Multiple R-squared: , Adjusted R-squared: F-statistic: on 1 and 1912 DF, p-value: < 2.2e-16 Mètodes Estadístics, UPF, Hivern

58 Regressió lineal simple Y i = α + βx i + ɛ i, i = 1,..., n Nomenclatura: α terme independent β coefficient de regressió E(Y i ) = α + βx i β és un increment en el valor esperat de Y d un augmenta unitari en la variable X terme de perturbació ɛ, variable estadística ɛ (0, σ 2 ɛ ), valor esperat zero i variància constant, ɛ i és un dels valors d aquesta variable Noteu que σ 2 ɛ representa la intensitat de variació de Y al voltant de la recta de regressió Y = α + βx i Ajust de la regressió Ŷ i = a + bx i, i = 1,..., n a = ; b = , a i b són estimacions de α i β respectivament. Mètodes Estadístics, UPF, Hivern

59 Regressió lineal simple (cont.) Totes les estimacions estan subjectes a un error tipus (standard error). En el nostre exemple: Paràmetre α β Estimació error tipus Coeficient de determinació múltiple, R 2 = És a dir, 3.4% de la variació de Y és deguda a la variable X. Residual standard error: on 1912 degrees of freedom Mètodes Estadístics, UPF, Hivern

60 Table of estimates of simple regression Estimate Std. Error t value Pr(> t ) (Intercept) NMEMB Mètodes Estadístics, UPF, Hivern

61 Regressió múltiple: Y versus X1 X2 Variable AGE OF HEAD of the family. summary(age1.1[index == FALSE]) Min. 1st Qu. Median Mean 3rd Qu. Max Estimate Std. Error t value Pr(> t ) (Intercept) NMEMB AGE Mètodes Estadístics, UPF, Hivern

62 Regressió lineal multiple Y i = β 0 + β 1 X 1i + β 2 X 2i + ɛ i, i = 1,..., n Nomenclatura: β 0 terme independent β 1, β 2 coefficients de regressió parcial E(Y i ) = β 0 + β 1 X 1i + β 2 X 2i β 2 és un increment en el valor esperat de Y d un augmenta unitari en la variable X 2 quan X 1 és manté constant (ceteris paribus X 1 ). Idem per β 1 (versus X 2 ) terme de perturbació ɛ, variable estadística ɛ (0, σ 2 ɛ ), valor esperat zero i variància constant, ɛ i és un dels valors d aquesta variable Noteu que σ 2 ɛ representa la intensitat de variació de Y al voltant de la recta de regressió Y = β 0 + β 1 X 1i + β 2 X 2i Ajust de la regressió Ŷ i = b 0 + b 1 X 1i + b 2 X 2i, i = 1,..., n b 0 = ; b 1 = ,b 2 = R 2 = és un 4.4% de Mètodes Estadístics, UPF, Hivern A. Satorra variació ( UPF, de Mètodes Y Estadístics, ve explicada 2015 ) per la variació conjunta de X 1 i X 2

63 Variable depenent Y binaria Fins ara Y era una variable continua Regressió logística (i la regressió probit ) Y és binaria Com en la regressió habitual, les variables explicatives poden ser continues o binaries Mètodes Estadístics, UPF, Hivern

64 No serveix la regressió lineal? La relació es no-lineal Els terme d error és heteroscedastics El terme d error no té distribució normal Exemple: Y = Vot, X = Lrenda Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) <2e-16 *** Lrenda <2e-16 *** Multiple R-squared: Ŷ = Lrenda + ɛ, R 2 =.22 Mètodes Estadístics, UPF, Hivern

65 Vot Lrenda Figure : Vot vs. Lrenda Mètodes Estadístics, UPF, Hivern

66 Regressió logística (el model) Suposem que Y i Bernoulli (π i ) π i = P(Y i = 1), i = 1,..., n probabilitats odds (probabilitats en contra) logit π o(odds) = π/(1 π) L(logit) = ln (o) L i = ln π i 1 π i π i = 1 1+e L i Model lineal logit: L i = β 0 + β 1 X 1 + β 2 X 2 + β 3 X 3 Model no-lineal de probabilitat: π i = e (β 0+β 1 X 1 +β 2 X 2 +β 3 X 3 ) Mètodes Estadístics, UPF, Hivern

67 Ajust de la regressió logística Exemple: Y = Vot, X = Lrenda π i = 1 1+e L i π i = 1 1+e Lrenda i glm(vot ~ Lrenda, family = "binomial") oefficients: Estimate Std. Error z value Pr(> z ) (Intercept) <2e-16 *** Lrenda <2e-16 *** Number of Fisher Scoring iterations: 4 ˆL = Lrenda Mètodes Estadístics, UPF, Hivern

68 Vot linear model logistic model Lrenda Figure : Vot vs. Lrenda: linear versus logistic fits Mètodes Estadístics, UPF, Hivern

69 Interpretació dels paràmetres ˆL = Lrenda exp(-1.208)= = Odds disminueixen en un 70% quan X X + 1 % d augment/decreixement odds (exp(β) 1) 100 Mètodes Estadístics, UPF, Hivern

70 Vot versus Lrenda + Genere glm(formula = Vot ~ Lrenda + Genere, family = "binomial") (Intercept) <2e-16 *** Lrenda <2e-16 *** Genere <2e-16 *** ˆL = Lrenda Genere > 100*(exp( )-1) [1] > 100*(exp( )-1) [1] Mètodes Estadístics, UPF, Hivern

71 Lrenda Lrenda+1 disminueix un 73% els odds de Vot = 1, controlant per gènere Els odds de Vot = 1 dels nois (Gènere = 1) són un 1266% superiors que els de les noies (Gènere = 0), controlant per Renda Mètodes Estadístics, UPF, Hivern

72 Vot Simple Mult. Homes Mult. Dones Lrenda Figure : Corbes logístiques, marginals (reg. simple) i condicionals (regr. múltiple) Mètodes Estadístics, UPF, Hivern

73 (Optional) More on logistic regression: lrm lrm( Vot ~ Lrenda + Genere, y =T, x=t) Logistic Regression Model Model Likelihood Discrimination Rank Discrim. Ratio Test Indexes Indexes Obs 800 LR chi R C d.f. 2 g Dxy Pr(> chi2) < gr gamma max deriv 5e-07 gp tau-a Brier Coef S.E. Wald Z Pr(> Z ) Intercept < Lrenda < Genere < Mètodes Estadístics, UPF, Hivern

74 (Optional) More on logistic regression: e b and the % of increment of odds Suppose the fitted logistic regression where L = x Logit2 = (x + 1)(e b 1) 100 = (e 2 1) 100 = 639% and an unit increase of x = 1, x x + 1. ### when p is around 0.5 x= 1 Logit1 = *x Logit2 = *(x+1) prob1= 1/(1+ exp( -Logit1)) prob2= 1/(1+ exp(-logit2 )) ((prob2-prob1)/prob1)*100 > prob1 [1] 0.5 > prob2 [1] ### p = molt baixa x= 1 Logit1 = *x Logit2 = *(x+1) (exp(2) -1)*100 prob1= 1/(1+ exp( -Logit1)) prob2= 1/(1+ exp(-logit2 )) A. Satorra ((prob2-prob1)/prob1)*100 ( UPF, Mètodes Estadístics, 2015 ) Mètodes Estadístics, UPF, Hivern

75 Optional: Case influence Y all exclude 2 and 11 exclude 1 exclude 1 and X Figure : Case influence in regression Mètodes Estadístics, UPF, Hivern

76 (Optional): multicolinearity datafile=read.table("/users/albertsatorra/rstudio/datasets/regressiomulticol.dat") reg=lm(y ~ X1+factor(X2)+X3) summary(reg) Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) X factor(x2) factor(x2) ** factor(x2) ** X Signif. codes: 0 *** ** 0.01 * Residual standard error: on 94 degrees of freedom Multiple R-squared: 0.433, Adjusted R-squared: F-statistic: on 5 and 94 DF, p-value: 1.961e-10 Mètodes Estadístics, UPF, Hivern

77 Multicolinearity and Principal Components 1 p. 83 de : Regressio amb SPSS 2 Un altre exemple de multicolinealitat: multicolinealitat 3 Emprant les dades paisos.sav, amb transformacio logarítmica per PIB, DIARIS, TV, HABMETGE, fes una regressió amb un indicador de nivell de literacy (LITERACY, diaris, TV, etc. ) 4 Emprant les dades CIS1524.SAV, fes una anàlisi de regressió emprant indicadors per variables per medi de PCA (per exemple, les variables INFL1... INFL4). Idem amb el fitxer GSS.SAV Mètodes Estadístics, UPF, Hivern

78 Regression with a principal component > F1 = princomp(cbind(x1,x2,x3,x4))$score[,1] > fit1 = lm(y1 ~ F1+X5+factor(X6)) > summary(fit1) Call: lm(formula = Y1 ~ F1 + X5 + factor(x6)) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) < 2e-16 *** F e-16 *** X factor(x6) < 2e-16 *** factor(x6) factor(x6) Signif. codes: 0 *** ** 0.01 * Residual standard error: on 994 degrees of freedom Multiple R-squared: , Adjusted R-squared: F-statistic: on 5 and 994 DF, p-value: < 2.2e-16 Mètodes Estadístics, UPF, Hivern

79 Optional: Case influence Y all exclude 2 and 11 exclude 1 exclude 1 and X Figure : Case influence in regression Mètodes Estadístics, UPF, Hivern

80 (Optional) s.e. robust to cluster effects: library rms library(rms ) fit =lrm( Vot ~ Lrenda + Genere, y =T, x=t) library(rms ) length(vot) [1] 800 # assume we have a variable clust clust= sample(1:40,800, replace=t) robcov(fit,cluster=clust) Logistic Regression Model Model Likelihood Discrimination Rank Discrim. Ratio Test Indexes Indexes Obs 800 LR chi R C d.f. 2 g Dxy Pr(> chi2) < gr gamma max deriv 5e-07 gp tau-a Brier Coef S.E. Wald Z Pr(> Z ) Intercept < Lrenda < Genere < Mètodes Estadístics, UPF, Hivern

81 (Optional) s.e. robust to cluster effects: bootstrap > bootcov(fit, cluster=clust) Logistic Regression Model lrm(formula = Vot ~ Lrenda + Genere, x = T, y = T) Coef S.E. Wald Z Pr(> Z ) Intercept < Lrenda < Genere < Mètodes Estadístics, UPF, Hivern

82 Material addicional de regressió logística 1 web del curs, M2014: Slides Logit Regression, més detalls sobre la regressió logistica + altre material en la secció de regressió logística. 2 Idra UCLA: SPSS Data Analysis Examples Logit Regression R Data Analysis Examples: Logit Regression Mètodes Estadístics, UPF, Hivern

83 Fitxer de Dades Mostra aleatoria de mida n = 1000 d una població Variables: data= read.table(" header =T) #data= read.spss(" #data=as.data.frame(data) names(data) "Y1" "Y2" "X1" "X2" "X3" "X4" "X5" "X6" head(data) > head(data) Y1 Y2 X1 X2 X3 X4 X5 X Y1 is logexpenses Y2 is voting X5 is home = 1 X6 is categorial X1 to X4 are indicators related with income (latent) Mètodes Estadístics, UPF, Hivern

84 Y Y2 X X2 X X X5 Figure : Matrix plot of the new data set Mètodes Estadístics, UPF, Hivern

85 Multiple regression fit1 = lm(y1 ~ X1+ X2+X3+X4+X5+factor(X6)) summary(fit1) Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) <2e-16 *** X X X X X factor(x6) <2e-16 *** factor(x6) factor(x6) Residual standard error: on 991 degrees of freedom Multiple R-squared: 0.454, Adjusted R-squared: F-statistic: 103 on 8 and 991 DF, p-value: < 2.2e-16 Mètodes Estadístics, UPF, Hivern

86 Multiple regression (excluding X2) fit1 = lm(y1 ~ X1+X3+X4+X5+factor(X6)) summary(fit1) Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) < 2e-16 *** X e-12 *** X X X factor(x6) < 2e-16 *** factor(x6) factor(x6) Residual standard error: on 992 degrees of freedom Multiple R-squared: , Adjusted R-squared: F-statistic: on 7 and 992 DF, p-value: < 2.2e-16 Mètodes Estadístics, UPF, Hivern

87 Diagnostic in linear multiple regression (Fox s library(car)) library(car) fit1 = lm(y1 ~ X1+X2+X3+X4+X5+factor(X6)) # Evaluate Collinearity vif(fit) # variance inflation factors sqrt(vif(fit)) > 2 # problem? VIF > 4? ncvtest(fit1) Non-constant Variance Score Test Variance formula: ~ fitted.values Chisquare = Df = 1 p = > durbinwatsontest(fit1) lag Autocorrelation D-W Statistic p-value Alternative hypothesis: rho!= 0 ## Multicolineality > vif(fit1) GVIF Df GVIF (1/(2*Df)) X X X X X factor(x6) # Evaluate Nonlinearity # component + residual plot crplots(fit1) Mètodes Estadístics, UPF, Hivern

88 X1 Component+Residual(Y1) X2 Component+Residual(Y1) X3 Component+Residual(Y1) X4 Component+Residual(Y1) X5 Component+Residual(Y1) factor(x6) Component+Residual(Y1) Component + Residual Plots Figure : component + residual plot Mètodes Estadístics, UPF, Hivern

89 Logistic Regression library(rms) lrm(formula = Y2 ~ X1 + X2 + X3 + X4 + X5 + factor(x6)) Model Likelihood Discrimination Rank Discrim. Ratio Test Indexes Indexes Obs 1000 LR chi R C d.f. 8 g Dxy Pr(> chi2) < gr gamma max deriv 1e-07 gp tau-a Brier Coef S.E. Wald Z Pr(> Z ) Intercept X X < X X X X6= < X6= X6= Mètodes Estadístics, UPF, Hivern

90 Logistic Regression library(rms) lrm(formula = Y2 ~ X1 + X2 + X3 + X4 + X5 + factor(x6)) Model Likelihood Discrimination Rank Discrim. Ratio Test Indexes Indexes Obs 1000 LR chi R C d.f. 8 g Dxy Pr(> chi2) < gr gamma max deriv 1e-07 gp tau-a Brier Coef S.E. Wald Z Pr(> Z ) Intercept X X < X X X X6= < X6= X6= Mètodes Estadístics, UPF, Hivern

TEORIA BÀSICA I EXEMPLES: REGRESSSIÓ

TEORIA BÀSICA I EXEMPLES: REGRESSSIÓ TEORIA BÀSICA I EXEMPLES: REGRESSSIÓ SIMPLE, MÚLTIPLE I LOGÍSTICA Mètodes Estadístics, UPF, Hivern 2014 1 Descripció de dades i inferència estadística 2 3 Robust s.e. (Optional) 4 Case Influence statistics

Διαβάστε περισσότερα

Biostatistics for Health Sciences Review Sheet

Biostatistics for Health Sciences Review Sheet Biostatistics for Health Sciences Review Sheet http://mathvault.ca June 1, 2017 Contents 1 Descriptive Statistics 2 1.1 Variables.............................................. 2 1.1.1 Qualitative........................................

Διαβάστε περισσότερα

η π 2 /3 χ 2 χ 2 t k Y 0/0, 0/1,..., 3/3 π 1, π 2,..., π k k k 1 β ij Y I i = 1,..., I p (X i = x i1,..., x ip ) Y i J (j = 1,..., J) x i Y i = j π j (x i ) x i π j (x i ) x (n 1 (x),..., n J (x))

Διαβάστε περισσότερα

Statistics 104: Quantitative Methods for Economics Formula and Theorem Review

Statistics 104: Quantitative Methods for Economics Formula and Theorem Review Harvard College Statistics 104: Quantitative Methods for Economics Formula and Theorem Review Tommy MacWilliam, 13 tmacwilliam@college.harvard.edu March 10, 2011 Contents 1 Introduction to Data 5 1.1 Sample

Διαβάστε περισσότερα

Wan Nor Arifin under the Creative Commons Attribution-ShareAlike 4.0 International License. 1 Introduction 1

Wan Nor Arifin under the Creative Commons Attribution-ShareAlike 4.0 International License. 1 Introduction 1 Poisson Regression A Short Course on Data Analysis Using R Software (2017) Wan Nor Arifin (wnarifin@usm.my), Universiti Sains Malaysia Website: sites.google.com/site/wnarifin Wan Nor Arifin under the Creative

Διαβάστε περισσότερα

Wan Nor Arifin under the Creative Commons Attribution-ShareAlike 4.0 International License. 1 Introduction 1

Wan Nor Arifin under the Creative Commons Attribution-ShareAlike 4.0 International License. 1 Introduction 1 Linear Regression A Short Course on Data Analysis Using R Software (2017) Wan Nor Arifin (wnarifin@usm.my), Universiti Sains Malaysia Website: sites.google.com/site/wnarifin Wan Nor Arifin under the Creative

Διαβάστε περισσότερα

Table 1: Military Service: Models. Model 1 Model 2 Model 3 Model 4 Model 5 Model 6 Model 7 Model 8 Model 9 num unemployed mili mili num unemployed

Table 1: Military Service: Models. Model 1 Model 2 Model 3 Model 4 Model 5 Model 6 Model 7 Model 8 Model 9 num unemployed mili mili num unemployed Tables: Military Service Table 1: Military Service: Models Model 1 Model 2 Model 3 Model 4 Model 5 Model 6 Model 7 Model 8 Model 9 num unemployed mili mili num unemployed mili 0.489-0.014-0.044-0.044-1.469-2.026-2.026

Διαβάστε περισσότερα

5.1 logistic regresssion Chris Parrish July 3, 2016

5.1 logistic regresssion Chris Parrish July 3, 2016 5.1 logistic regresssion Chris Parrish July 3, 2016 Contents logistic regression model 1 1992 vote 1 data..................................................... 1 model....................................................

Διαβάστε περισσότερα

Queensland University of Technology Transport Data Analysis and Modeling Methodologies

Queensland University of Technology Transport Data Analysis and Modeling Methodologies Queensland University of Technology Transport Data Analysis and Modeling Methodologies Lab Session #7 Example 5.2 (with 3SLS Extensions) Seemingly Unrelated Regression Estimation and 3SLS A survey of 206

Διαβάστε περισσότερα

MATHACHij = γ00 + u0j + rij

MATHACHij = γ00 + u0j + rij Stata output for Hierarchical Linear Models. ***************************************. * Unconditional Random Intercept Model. *************************************** MATHACHij = γ00 + u0j + rij. mixed

Διαβάστε περισσότερα

Supplementary Appendix

Supplementary Appendix Supplementary Appendix Measuring crisis risk using conditional copulas: An empirical analysis of the 2008 shipping crisis Sebastian Opitz, Henry Seidel and Alexander Szimayer Model specification Table

Διαβάστε περισσότερα

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science.

Bayesian statistics. DS GA 1002 Probability and Statistics for Data Science. Bayesian statistics DS GA 1002 Probability and Statistics for Data Science http://www.cims.nyu.edu/~cfgranda/pages/dsga1002_fall17 Carlos Fernandez-Granda Frequentist vs Bayesian statistics In frequentist

Διαβάστε περισσότερα

519.22(07.07) 78 : ( ) /.. ; c (07.07) , , 2008

519.22(07.07) 78 : ( ) /.. ; c (07.07) , , 2008 .. ( ) 2008 519.22(07.07) 78 : ( ) /.. ;. : -, 2008. 38 c. ( ) STATISTICA.,. STATISTICA.,. 519.22(07.07),.., 2008.., 2008., 2008 2 ... 4 1...5...5 2...14...14 3...27...27 3 ,, -. " ", :,,,... STATISTICA.,,,.

Διαβάστε περισσότερα

ST5224: Advanced Statistical Theory II

ST5224: Advanced Statistical Theory II ST5224: Advanced Statistical Theory II 2014/2015: Semester II Tutorial 7 1. Let X be a sample from a population P and consider testing hypotheses H 0 : P = P 0 versus H 1 : P = P 1, where P j is a known

Διαβάστε περισσότερα

SECTION II: PROBABILITY MODELS

SECTION II: PROBABILITY MODELS SECTION II: PROBABILITY MODELS 1 SECTION II: Aggregate Data. Fraction of births with low birth weight per province. Model A: OLS, using observations 1 260 Heteroskedasticity-robust standard errors, variant

Διαβάστε περισσότερα

FORMULAS FOR STATISTICS 1

FORMULAS FOR STATISTICS 1 FORMULAS FOR STATISTICS 1 X = 1 n Sample statistics X i or x = 1 n x i (sample mean) S 2 = 1 n 1 s 2 = 1 n 1 (X i X) 2 = 1 n 1 (x i x) 2 = 1 n 1 Xi 2 n n 1 X 2 x 2 i n n 1 x 2 or (sample variance) E(X)

Διαβάστε περισσότερα

Statistical Inference I Locally most powerful tests

Statistical Inference I Locally most powerful tests Statistical Inference I Locally most powerful tests Shirsendu Mukherjee Department of Statistics, Asutosh College, Kolkata, India. shirsendu st@yahoo.co.in So far we have treated the testing of one-sided

Διαβάστε περισσότερα

Μηχανική Μάθηση Hypothesis Testing

Μηχανική Μάθηση Hypothesis Testing ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Μηχανική Μάθηση Hypothesis Testing Γιώργος Μπορμπουδάκης Τμήμα Επιστήμης Υπολογιστών Procedure 1. Form the null (H 0 ) and alternative (H 1 ) hypothesis 2. Consider

Διαβάστε περισσότερα

Does anemia contribute to end-organ dysfunction in ICU patients Statistical Analysis

Does anemia contribute to end-organ dysfunction in ICU patients Statistical Analysis Does anemia contribute to end-organ dysfunction in ICU patients Statistical Analysis Xue Han, MPH and Matt Shotwell, PhD Department of Biostatistics Vanderbilt University School of Medicine March 14, 2014

Διαβάστε περισσότερα

Modern Regression HW #8 Solutions

Modern Regression HW #8 Solutions 36-40 Modern Regression HW #8 Solutions Problem [25 points] (a) DUE: /0/207 at 3PM This is still a linear regression model the simplest possible one. That being the case, the solution we derived before

Διαβάστε περισσότερα

EE512: Error Control Coding

EE512: Error Control Coding EE512: Error Control Coding Solution for Assignment on Finite Fields February 16, 2007 1. (a) Addition and Multiplication tables for GF (5) and GF (7) are shown in Tables 1 and 2. + 0 1 2 3 4 0 0 1 2 3

Διαβάστε περισσότερα

Γενικευμένα Γραμμικά Μοντέλα (GLM) Επισκόπηση

Γενικευμένα Γραμμικά Μοντέλα (GLM) Επισκόπηση Γενικευμένα Γραμμικά Μοντέλα (GLM) Επισκόπηση Γενική μορφή g( E[ Y X ]) Xb Κατανομή της Υ στην εκθετική οικογένεια Ανεξάρτητες παρατηρήσεις Ενας όρος για το σφάλμα g(.) Συνδετική συνάρτηση (link function)

Διαβάστε περισσότερα

HW 3 Solutions 1. a) I use the auto.arima R function to search over models using AIC and decide on an ARMA(3,1)

HW 3 Solutions 1. a) I use the auto.arima R function to search over models using AIC and decide on an ARMA(3,1) HW 3 Solutions a) I use the autoarima R function to search over models using AIC and decide on an ARMA3,) b) I compare the ARMA3,) to ARMA,0) ARMA3,) does better in all three criteria c) The plot of the

Διαβάστε περισσότερα

Supplementary figures

Supplementary figures A Supplementary figures a) DMT.BG2 0.87 0.87 0.72 20 40 60 80 100 DMT.EG2 0.93 0.85 20 40 60 80 EMT.MG3 0.85 0 20 40 60 80 20 40 60 80 100 20 40 60 80 100 20 40 60 80 EMT.G6 DMT/EMT b) EG2 0.92 0.85 5

Διαβάστε περισσότερα

Estimation for ARMA Processes with Stable Noise. Matt Calder & Richard A. Davis Colorado State University

Estimation for ARMA Processes with Stable Noise. Matt Calder & Richard A. Davis Colorado State University Estimation for ARMA Processes with Stable Noise Matt Calder & Richard A. Davis Colorado State University rdavis@stat.colostate.edu 1 ARMA processes with stable noise Review of M-estimation Examples of

Διαβάστε περισσότερα

Generalized additive models in R

Generalized additive models in R www.nr.no Generalized additive models in R Magne Aldrin, Norwegian Computing Center and the University of Oslo Sharp workshop, Copenhagen, October 2012 Generalized Linear Models - GLM y Distributed with

Διαβάστε περισσότερα

Introduction to the ML Estimation of ARMA processes

Introduction to the ML Estimation of ARMA processes Introduction to the ML Estimation of ARMA processes Eduardo Rossi University of Pavia October 2013 Rossi ARMA Estimation Financial Econometrics - 2013 1 / 1 We consider the AR(p) model: Y t = c + φ 1 Y

Διαβάστε περισσότερα

Άσκηση 10, σελ. 119. Για τη μεταβλητή x (άτυπος όγκος) έχουμε: x censored_x 1 F 3 F 3 F 4 F 10 F 13 F 13 F 16 F 16 F 24 F 26 F 27 F 28 F

Άσκηση 10, σελ. 119. Για τη μεταβλητή x (άτυπος όγκος) έχουμε: x censored_x 1 F 3 F 3 F 4 F 10 F 13 F 13 F 16 F 16 F 24 F 26 F 27 F 28 F Άσκηση 0, σελ. 9 από το βιβλίο «Μοντέλα Αξιοπιστίας και Επιβίωσης» της Χ. Καρώνη (i) Αρχικά, εισάγουμε τα δεδομένα στο minitab δημιουργώντας δύο μεταβλητές: τη x για τον άτυπο όγκο και την y για τον τυπικό

Διαβάστε περισσότερα

Solution Series 9. i=1 x i and i=1 x i.

Solution Series 9. i=1 x i and i=1 x i. Lecturer: Prof. Dr. Mete SONER Coordinator: Yilin WANG Solution Series 9 Q1. Let α, β >, the p.d.f. of a beta distribution with parameters α and β is { Γ(α+β) Γ(α)Γ(β) f(x α, β) xα 1 (1 x) β 1 for < x

Διαβάστε περισσότερα

Other Test Constructions: Likelihood Ratio & Bayes Tests

Other Test Constructions: Likelihood Ratio & Bayes Tests Other Test Constructions: Likelihood Ratio & Bayes Tests Side-Note: So far we have seen a few approaches for creating tests such as Neyman-Pearson Lemma ( most powerful tests of H 0 : θ = θ 0 vs H 1 :

Διαβάστε περισσότερα

5.4 The Poisson Distribution.

5.4 The Poisson Distribution. The worst thing you can do about a situation is nothing. Sr. O Shea Jackson 5.4 The Poisson Distribution. Description of the Poisson Distribution Discrete probability distribution. The random variable

Διαβάστε περισσότερα

6.3 Forecasting ARMA processes

6.3 Forecasting ARMA processes 122 CHAPTER 6. ARMA MODELS 6.3 Forecasting ARMA processes The purpose of forecasting is to predict future values of a TS based on the data collected to the present. In this section we will discuss a linear

Διαβάστε περισσότερα

Exercises to Statistics of Material Fatigue No. 5

Exercises to Statistics of Material Fatigue No. 5 Prof. Dr. Christine Müller Dipl.-Math. Christoph Kustosz Eercises to Statistics of Material Fatigue No. 5 E. 9 (5 a Show, that a Fisher information matri for a two dimensional parameter θ (θ,θ 2 R 2, can

Διαβάστε περισσότερα

!"!"!!#" $ "# % #" & #" '##' #!( #")*(+&#!', & - #% '##' #( &2(!%#(345#" 6##7

!!!!# $ # % # & # '##' #!( #)*(+&#!', & - #% '##' #( &2(!%#(345# 6##7 !"!"!!#" $ "# % #" & #" '##' #!( #")*(+&#!', '##' '# '## & - #% '##'.//0 #( 111111111111111111111111111111111111111111111111111 &2(!%#(345#" 6##7 11111111111111111111111111111111111111111111111111 11111111111111111111111111111111111111111111111111

Διαβάστε περισσότερα

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM Solutions to Question 1 a) The cumulative distribution function of T conditional on N n is Pr T t N n) Pr max X 1,..., X N ) t N n) Pr max

Διαβάστε περισσότερα

Homework for 1/27 Due 2/5

Homework for 1/27 Due 2/5 Name: ID: Homework for /7 Due /5. [ 8-3] I Example D of Sectio 8.4, the pdf of the populatio distributio is + αx x f(x α) =, α, otherwise ad the method of momets estimate was foud to be ˆα = 3X (where

Διαβάστε περισσότερα

Λογιστική Παλινδρόµηση

Λογιστική Παλινδρόµηση Κεφάλαιο 10 Λογιστική Παλινδρόµηση Στο κεφάλαιο αυτό ϑα δούµε την µέθοδο της λογιστικής παλινδρόµησης η οποία χρησιµεύει στο να αναπτύξουµε σχέση µίας δίτιµης ανεξάρτητης τυχαίας µετα- ϐλητής και συνεχών

Διαβάστε περισσότερα

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions SCHOOL OF MATHEMATICAL SCIENCES GLMA Linear Mathematics 00- Examination Solutions. (a) i. ( + 5i)( i) = (6 + 5) + (5 )i = + i. Real part is, imaginary part is. (b) ii. + 5i i ( + 5i)( + i) = ( i)( + i)

Διαβάστε περισσότερα

Aquinas College. Edexcel Mathematical formulae and statistics tables DO NOT WRITE ON THIS BOOKLET

Aquinas College. Edexcel Mathematical formulae and statistics tables DO NOT WRITE ON THIS BOOKLET Aquinas College Edexcel Mathematical formulae and statistics tables DO NOT WRITE ON THIS BOOKLET Pearson Edexcel Level 3 Advanced Subsidiary and Advanced GCE in Mathematics and Further Mathematics Mathematical

Διαβάστε περισσότερα

Interpretation of linear, logistic and Poisson regression models with transformed variables and its implementation in the R package tlm

Interpretation of linear, logistic and Poisson regression models with transformed variables and its implementation in the R package tlm Interpretation of linear, logistic and Poisson regression models with transformed variables and its implementation in the R package tlm Jose Barrera-Gómez a jbarrera@creal.cat a Centre for Research in

Διαβάστε περισσότερα

APPENDICES APPENDIX A. STATISTICAL TABLES AND CHARTS 651 APPENDIX B. BIBLIOGRAPHY 677 APPENDIX C. ANSWERS TO SELECTED EXERCISES 679

APPENDICES APPENDIX A. STATISTICAL TABLES AND CHARTS 651 APPENDIX B. BIBLIOGRAPHY 677 APPENDIX C. ANSWERS TO SELECTED EXERCISES 679 APPENDICES APPENDIX A. STATISTICAL TABLES AND CHARTS 1 Table I Summary of Common Probability Distributions 2 Table II Cumulative Standard Normal Distribution Table III Percentage Points, 2 of the Chi-Squared

Διαβάστε περισσότερα

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Partial Differential Equations in Biology The boundary element method. March 26, 2013 The boundary element method March 26, 203 Introduction and notation The problem: u = f in D R d u = ϕ in Γ D u n = g on Γ N, where D = Γ D Γ N, Γ D Γ N = (possibly, Γ D = [Neumann problem] or Γ N = [Dirichlet

Διαβάστε περισσότερα

Lampiran 1 Output SPSS MODEL I

Lampiran 1 Output SPSS MODEL I 67 Variables Entered/Removed(b) Lampiran 1 Output SPSS MODEL I Model Variables Entered Variables Removed Method 1 CFO, ACCOTHER, ACCPAID, ACCDEPAMOR,. Enter ACCREC, ACCINV(a) a All requested variables

Διαβάστε περισσότερα

ΑΝΑΛΥΣΗ Ε ΟΜΕΝΩΝ. 7. Παλινδρόµηση

ΑΝΑΛΥΣΗ Ε ΟΜΕΝΩΝ. 7. Παλινδρόµηση ΑΝΑΛΥΣΗ Ε ΟΜΕΝΩΝ 7. Παλινδρόµηση Γενικά Επέκταση της έννοιας της συσχέτισης: Πώς µπορούµε να προβλέπουµε τη µια µεταβλητή από την άλλη; Απλή παλινδρόµηση (simple regression): Κατασκευή µοντέλου πρόβλεψης

Διαβάστε περισσότερα

( ) ( ) STAT 5031 Statistical Methods for Quality Improvement. Homework n = 8; x = 127 psi; σ = 2 psi (a) µ 0 = 125; α = 0.

( ) ( ) STAT 5031 Statistical Methods for Quality Improvement. Homework n = 8; x = 127 psi; σ = 2 psi (a) µ 0 = 125; α = 0. STAT 531 Statistical Methods for Quality Improvement Homework 3 4.8 n = 8; x = 17 psi; σ = psi (a) µ = 15; α =.5 Test H : µ = 15 vs. H 1 : µ > 15. Reject H if Z > Z α. x µ 17 15 Z = = =.88 σ n 8 Z α =

Διαβάστε περισσότερα

6. MAXIMUM LIKELIHOOD ESTIMATION

6. MAXIMUM LIKELIHOOD ESTIMATION 6 MAXIMUM LIKELIHOOD ESIMAION [1] Maximum Likelihood Estimator (1) Cases in which θ (unknown parameter) is scalar Notational Clarification: From now on, we denote the true value of θ as θ o hen, view θ

Διαβάστε περισσότερα

Math 6 SL Probability Distributions Practice Test Mark Scheme

Math 6 SL Probability Distributions Practice Test Mark Scheme Math 6 SL Probability Distributions Practice Test Mark Scheme. (a) Note: Award A for vertical line to right of mean, A for shading to right of their vertical line. AA N (b) evidence of recognizing symmetry

Διαβάστε περισσότερα

Γραµµική Παλινδρόµηση

Γραµµική Παλινδρόµηση Κεφάλαιο 8 Γραµµική Παλινδρόµηση Η γραµµική παλινδρόµηση είναι ένα από τα πιο σηµαντικά ϑέµατα της Στατιστική ϑεωρείας. Στη συνέχεια αυτή η πολύ γνωστή µεθοδολογία ϑα αναπτυχθεί στην R µέσω των τύπων για

Διαβάστε περισσότερα

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch: HOMEWORK 4 Problem a For the fast loading case, we want to derive the relationship between P zz and λ z. We know that the nominal stress is expressed as: P zz = ψ λ z where λ z = λ λ z. Therefore, applying

Διαβάστε περισσότερα

Reminders: linear functions

Reminders: linear functions Reminders: linear functions Let U and V be vector spaces over the same field F. Definition A function f : U V is linear if for every u 1, u 2 U, f (u 1 + u 2 ) = f (u 1 ) + f (u 2 ), and for every u U

Διαβάστε περισσότερα

Numerical Analysis FMN011

Numerical Analysis FMN011 Numerical Analysis FMN011 Carmen Arévalo Lund University carmen@maths.lth.se Lecture 12 Periodic data A function g has period P if g(x + P ) = g(x) Model: Trigonometric polynomial of order M T M (x) =

Διαβάστε περισσότερα

PENGARUHKEPEMIMPINANINSTRUKSIONAL KEPALASEKOLAHDAN MOTIVASI BERPRESTASI GURU TERHADAP KINERJA MENGAJAR GURU SD NEGERI DI KOTA SUKABUMI

PENGARUHKEPEMIMPINANINSTRUKSIONAL KEPALASEKOLAHDAN MOTIVASI BERPRESTASI GURU TERHADAP KINERJA MENGAJAR GURU SD NEGERI DI KOTA SUKABUMI 155 Lampiran 6 Yayan Sumaryana, 2014 PENGARUHKEPEMIMPINANINSTRUKSIONAL KEPALASEKOLAHDAN MOTIVASI BERPRESTASI GURU TERHADAP KINERJA MENGAJAR GURU SD NEGERI DI KOTA SUKABUMI Universitas Pendidikan Indonesia

Διαβάστε περισσότερα

TABLES AND FORMULAS FOR MOORE Basic Practice of Statistics

TABLES AND FORMULAS FOR MOORE Basic Practice of Statistics TABLES AND FORMULAS FOR MOORE Basic Practice of Statistics Exploring Data: Distributions Look for overall pattern (shape, center, spread) and deviations (outliers). Mean (use a calculator): x = x 1 + x

Διαβάστε περισσότερα

1 1 1 2 1 2 2 1 43 123 5 122 3 1 312 1 1 122 1 1 1 1 6 1 7 1 6 1 7 1 3 4 2 312 43 4 3 3 1 1 4 1 1 52 122 54 124 8 1 3 1 1 1 1 1 152 1 1 1 1 1 1 152 1 5 1 152 152 1 1 3 9 1 159 9 13 4 5 1 122 1 4 122 5

Διαβάστε περισσότερα

The Simply Typed Lambda Calculus

The Simply Typed Lambda Calculus Type Inference Instead of writing type annotations, can we use an algorithm to infer what the type annotations should be? That depends on the type system. For simple type systems the answer is yes, and

Διαβάστε περισσότερα

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required) Phys460.nb 81 ψ n (t) is still the (same) eigenstate of H But for tdependent H. The answer is NO. 5.5.5. Solution for the tdependent Schrodinger s equation If we assume that at time t 0, the electron starts

Διαβάστε περισσότερα

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Chapter 6: Systems of Linear Differential. be continuous functions on the interval Chapter 6: Systems of Linear Differential Equations Let a (t), a 2 (t),..., a nn (t), b (t), b 2 (t),..., b n (t) be continuous functions on the interval I. The system of n first-order differential equations

Διαβάστε περισσότερα

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8  questions or comments to Dan Fetter 1 Eon : Fall 8 Suggested Solutions to Problem Set 8 Email questions or omments to Dan Fetter Problem. Let X be a salar with density f(x, θ) (θx + θ) [ x ] with θ. (a) Find the most powerful level α test

Διαβάστε περισσότερα

Homework 3 Solutions

Homework 3 Solutions Homework 3 Solutions Igor Yanovsky (Math 151A TA) Problem 1: Compute the absolute error and relative error in approximations of p by p. (Use calculator!) a) p π, p 22/7; b) p π, p 3.141. Solution: For

Διαβάστε περισσότερα

Επιστηµονική Επιµέλεια ρ. Γεώργιος Μενεξές. Εργαστήριο Γεωργίας. Viola adorata

Επιστηµονική Επιµέλεια ρ. Γεώργιος Μενεξές. Εργαστήριο Γεωργίας. Viola adorata One-way ANOVA µε το SPSS Επιστηµονική Επιµέλεια ρ. Γεώργιος Μενεξές Τοµέας Φυτών Μεγάλης Καλλιέργειας και Οικολογίας, Εργαστήριο Γεωργίας Viola adorata To call in a statistician after the experiment is

Διαβάστε περισσότερα

Repeated measures Επαναληπτικές μετρήσεις

Repeated measures Επαναληπτικές μετρήσεις ΠΡΟΒΛΗΜΑ Στο αρχείο δεδομένων diavitis.sav καταγράφεται η ποσότητα γλυκόζης στο αίμα 10 ασθενών στην αρχή της χορήγησης μιας θεραπείας, μετά από ένα μήνα και μετά από δύο μήνες. Μελετήστε την επίδραση

Διαβάστε περισσότερα

χ 2 test ανεξαρτησίας

χ 2 test ανεξαρτησίας χ 2 test ανεξαρτησίας Καθηγητής Ι. Κ. ΔΗΜΗΤΡΙΟΥ demetri@econ.uoa.gr 7.2 Το χ 2 Τεστ Ανεξαρτησίας Tο χ 2 τεστ ανεξαρτησίας (όπως και η παλινδρόμηση) είναι στατιστικά εργαλεία για τον εντοπισμό σχέσεων μεταξύ

Διαβάστε περισσότερα

DirichletReg: Dirichlet Regression for Compositional Data in R

DirichletReg: Dirichlet Regression for Compositional Data in R DirichletReg: Dirichlet Regression for Compositional Data in R Marco J. Maier Wirtschaftsuniversität Wien Abstract Full R Code for Maier, M. J. (2014). DirichletReg: Dirichlet Regression for Compositional

Διαβάστε περισσότερα

Εργαστήριο στατιστικής Στατιστικό πακέτο S.P.S.S.

Εργαστήριο στατιστικής Στατιστικό πακέτο S.P.S.S. Σημειώσεις για το μάθημα Εργαστήριο στατιστικής Στατιστικό πακέτο S.P.S.S. Παπάνα Αγγελική E mail: papanagel@yahoo.gr, agpapana@gen.auth.gr Α.Τ.Ε.Ι. Θεσσαλονίκης ΠΑΡΑΡΤΗΜΑ ΚΑΤΕΡΙΝΗΣ Τμήμα Τυποποίησης και

Διαβάστε περισσότερα

2. ΧΡΗΣΗ ΣΤΑΤΙΣΤΙΚΩΝ ΠΑΚΕΤΩΝ ΣΤΗ ΓΡΑΜΜΙΚΗ ΠΑΛΙΝΔΡΟΜΗΣΗ

2. ΧΡΗΣΗ ΣΤΑΤΙΣΤΙΚΩΝ ΠΑΚΕΤΩΝ ΣΤΗ ΓΡΑΜΜΙΚΗ ΠΑΛΙΝΔΡΟΜΗΣΗ 2. ΧΡΗΣΗ ΣΤΑΤΙΣΤΙΚΩΝ ΠΑΚΕΤΩΝ ΣΤΗ ΓΡΑΜΜΙΚΗ ΠΑΛΙΝΔΡΟΜΗΣΗ Η χρησιμοποίηση των τεχνικών της παλινδρόμησης για την επίλυση πρακτικών προβλημάτων έχει διευκολύνει εξαιρετικά από την χρήση διαφόρων στατιστικών

Διαβάστε περισσότερα

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

6.1. Dirac Equation. Hamiltonian. Dirac Eq. 6.1. Dirac Equation Ref: M.Kaku, Quantum Field Theory, Oxford Univ Press (1993) η μν = η μν = diag(1, -1, -1, -1) p 0 = p 0 p = p i = -p i p μ p μ = p 0 p 0 + p i p i = E c 2 - p 2 = (m c) 2 H = c p 2

Διαβάστε περισσότερα

Μενύχτα, Πιπερίγκου, Σαββάτης. ΒΙΟΣΤΑΤΙΣΤΙΚΗ Εργαστήριο 5 ο

Μενύχτα, Πιπερίγκου, Σαββάτης. ΒΙΟΣΤΑΤΙΣΤΙΚΗ Εργαστήριο 5 ο Κατανομές Στατιστικών Συναρτήσεων Δύο ανεξάρτητα δείγματα από κανονική κατανομή Έστω Χ= ( Χ, Χ,..., Χ ) τ.δ. από Ν( µ, σ ) μεγέθους n και 1 n 1 1 Y = (Y, Y,..., Y ) τ.δ. από Ν( µ, σ ) 1 n 1 Χ Y ( µ µ )

Διαβάστε περισσότερα

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS CHAPTER 5 SOLVING EQUATIONS BY ITERATIVE METHODS EXERCISE 104 Page 8 1. Find the positive root of the equation x + 3x 5 = 0, correct to 3 significant figures, using the method of bisection. Let f(x) =

Διαβάστε περισσότερα

C.S. 430 Assignment 6, Sample Solutions

C.S. 430 Assignment 6, Sample Solutions C.S. 430 Assignment 6, Sample Solutions Paul Liu November 15, 2007 Note that these are sample solutions only; in many cases there were many acceptable answers. 1 Reynolds Problem 10.1 1.1 Normal-order

Διαβάστε περισσότερα

Απλή Ευθύγραµµη Συµµεταβολή

Απλή Ευθύγραµµη Συµµεταβολή Απλή Ευθύγραµµη Συµµεταβολή Επιστηµονική Επιµέλεια ρ. Γεώργιος Μενεξές Τοµέας Φυτών Μεγάλης Καλλιέργειας και Οικολογίας, Εργαστήριο Γεωργίας Viola adorata Εισαγωγή Ανάλυση Παλινδρόµησης και Συσχέτιση Απλή

Διαβάστε περισσότερα

LAMPIRAN. Fixed-effects (within) regression Number of obs = 364 Group variable (i): kode Number of groups = 26

LAMPIRAN. Fixed-effects (within) regression Number of obs = 364 Group variable (i): kode Number of groups = 26 LAMPIRAN Lampiran 1 Uji Chow Test Model Pertama Hipotesis: Ho: Pooled Least Square Ha: Fixed Effect Method Decision Rule: Tolak Ho apabila P-value < α Fixed-effects (within) regression Number of obs =

Διαβάστε περισσότερα

Λογαριθμικά Γραμμικά Μοντέλα Poisson Παλινδρόμηση Παράδειγμα στο SPSS

Λογαριθμικά Γραμμικά Μοντέλα Poisson Παλινδρόμηση Παράδειγμα στο SPSS Λογαριθμικά Γραμμικά Μοντέλα Poisson Παλινδρόμηση Παράδειγμα στο SPSS Ο παρακάτω πίνακας παρουσιάζει θανάτους από καρδιακή ανεπάρκεια ανάμεσα σε άνδρες γιατρούς οι οποίοι έχουν κατηγοριοποιηθεί κατά ηλικία

Διαβάστε περισσότερα

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM Solutions to Question 1 a) The cumulative distribution function of T conditional on N n is Pr (T t N n) Pr (max (X 1,..., X N ) t N n) Pr (max

Διαβάστε περισσότερα

Summary of the model specified

Summary of the model specified Program: HLM 7 Hierarchical Linear and Nonlinear Modeling Authors: Stephen Raudenbush, Tony Bryk, & Richard Congdon Publisher: Scientific Software International, Inc. (c) 2010 techsupport@ssicentral.com

Διαβάστε περισσότερα

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation Overview Transition Semantics Configurations and the transition relation Executions and computation Inference rules for small-step structural operational semantics for the simple imperative language Transition

Διαβάστε περισσότερα

Lecture 7: Overdispersion in Poisson regression

Lecture 7: Overdispersion in Poisson regression Lecture 7: Overdispersion in Poisson regression Claudia Czado TU München c (Claudia Czado, TU Munich) ZFS/IMS Göttingen 2004 0 Overview Introduction Modeling overdispersion through mixing Score test for

Διαβάστε περισσότερα

Figure A.2: MPC and MPCP Age Profiles (estimating ρ, ρ = 2, φ = 0.03)..

Figure A.2: MPC and MPCP Age Profiles (estimating ρ, ρ = 2, φ = 0.03).. Supplemental Material (not for publication) Persistent vs. Permanent Income Shocks in the Buffer-Stock Model Jeppe Druedahl Thomas H. Jørgensen May, A Additional Figures and Tables Figure A.: Wealth and

Διαβάστε περισσότερα

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =? Teko Classes IITJEE/AIEEE Maths by SUHAAG SIR, Bhopal, Ph (0755) 3 00 000 www.tekoclasses.com ANSWERSHEET (TOPIC DIFFERENTIAL CALCULUS) COLLECTION # Question Type A.Single Correct Type Q. (A) Sol least

Διαβάστε περισσότερα

Μαντζούνη, Πιπερίγκου, Χατζή. ΒΙΟΣΤΑΤΙΣΤΙΚΗ Εργαστήριο 5 ο

Μαντζούνη, Πιπερίγκου, Χατζή. ΒΙΟΣΤΑΤΙΣΤΙΚΗ Εργαστήριο 5 ο Κατανομές Στατιστικών Συναρτήσεων Δύο δείγματα από κανονική κατανομή Έστω Χ= ( Χ, Χ,..., Χ ) τ.δ. από Ν( µ, σ ) μεγέθους n και 1 n 1 1 Y = (Y, Y,...,Y ) τ.δ. από Ν( µ, σ ) 1 n 1 Χ Y ( µ µ ) S σ Τ ( Χ,Y)

Διαβάστε περισσότερα

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ ΕΛΕΝΑ ΦΛΟΚΑ Επίκουρος Καθηγήτρια Τµήµα Φυσικής, Τοµέας Φυσικής Περιβάλλοντος- Μετεωρολογίας ΓΕΝΙΚΟΙ ΟΡΙΣΜΟΙ Πληθυσµός Σύνολο ατόµων ή αντικειµένων στα οποία αναφέρονται

Διαβάστε περισσότερα

Homework 8 Model Solution Section

Homework 8 Model Solution Section MATH 004 Homework Solution Homework 8 Model Solution Section 14.5 14.6. 14.5. Use the Chain Rule to find dz where z cosx + 4y), x 5t 4, y 1 t. dz dx + dy y sinx + 4y)0t + 4) sinx + 4y) 1t ) 0t + 4t ) sinx

Διαβάστε περισσότερα

Appendix A3. Table A3.1. General linear model results for RMSE under the unconditional model. Source DF SS Mean Square

Appendix A3. Table A3.1. General linear model results for RMSE under the unconditional model. Source DF SS Mean Square Appendix A3 Table A3.1. General linear model results for RMSE under the unconditional model. Source DF SS F Value Pr > F Model 107 374.68 3.50 8573.07

Διαβάστε περισσότερα

Δεδομένα (data) και Στατιστική (Statistics)

Δεδομένα (data) και Στατιστική (Statistics) Δεδομένα (data) και Στατιστική (Statistics) Η Στατιστική (Statistics) ασχολείται με την ανάλυση δεδομένων (data analysis): Πρόσφατες παιδαγωγικές εξελίξεις υποδεικνύουν ότι η Στατιστική πρέπει και να διδάσκεται

Διαβάστε περισσότερα

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων Εξάμηνο 7 ο Procedures and Functions Stored procedures and functions are named blocks of code that enable you to group and organize a series of SQL and PL/SQL

Διαβάστε περισσότερα

Αν οι προϋποθέσεις αυτές δεν ισχύουν, τότε ανατρέχουµε σε µη παραµετρικό τεστ.

Αν οι προϋποθέσεις αυτές δεν ισχύουν, τότε ανατρέχουµε σε µη παραµετρικό τεστ. ΣΤ. ΑΝΑΛΥΣΗ ΙΑΣΠΟΡΑΣ (ANALYSIS OF VARIANCE - ANOVA) ΣΤ 1. Ανάλυση ιασποράς κατά µία κατεύθυνση. Όπως έχουµε δει στη παράγραφο Β 2, όταν θέλουµε να ελέγξουµε, αν η µέση τιµή µιας ποσοτικής µεταβλητής διαφέρει

Διαβάστε περισσότερα

Οδηγίες χρήσης του R, μέρος 2 ο

Οδηγίες χρήσης του R, μέρος 2 ο ΟδηγίεςχρήσηςτουR,μέρος2 ο Ελληνικά Ανπροσπαθήσουμεναγράψουμεελληνικάήναανοίξουμεκάποιοαρχείοδεδομένωνμε ελληνικούςχαρακτήρεςστοr,μπορείαντίγιαελληνικάναδούμελατινικούςχαρακτήρεςμε τόνουςήάλλακαλλικαντζαράκια.τότεδίνουμετηνπαρακάτωεντολήγιαναγυρίσειτοrστα

Διαβάστε περισσότερα

1. Ιστόγραμμα. Προκειμένου να αλλάξουμε το εύρος των bins κάνουμε διπλό κλικ οπουδήποτε στο ιστόγραμμα και μετά

1. Ιστόγραμμα. Προκειμένου να αλλάξουμε το εύρος των bins κάνουμε διπλό κλικ οπουδήποτε στο ιστόγραμμα και μετά 1. Ιστόγραμμα Δεδομένα από το αρχείο Data_for_SPSS.xls Αλλαγή σε Variable View (Κάτω αριστερά) και μετονομασία της μεταβλητής σε NormData, Type: numeric και Measure: scale Αλλαγή πάλι σε Data View. Graphs

Διαβάστε περισσότερα

Example of the Baum-Welch Algorithm

Example of the Baum-Welch Algorithm Example of the Baum-Welch Algorithm Larry Moss Q520, Spring 2008 1 Our corpus c We start with a very simple corpus. We take the set Y of unanalyzed words to be {ABBA, BAB}, and c to be given by c(abba)

Διαβάστε περισσότερα

An Inventory of Continuous Distributions

An Inventory of Continuous Distributions Appendi A An Inventory of Continuous Distributions A.1 Introduction The incomplete gamma function is given by Also, define Γ(α; ) = 1 with = G(α; ) = Z 0 Z 0 Z t α 1 e t dt, α > 0, >0 t α 1 e t dt, α >

Διαβάστε περισσότερα

Marginal effects in the probit model with a triple dummy variable interaction term

Marginal effects in the probit model with a triple dummy variable interaction term Marginal effects in the probit model with a triple dummy variable interaction term Thomas Cornelißen and Katja Sonderhof Leibniz Universität Hannover, Discussion Paper No. 386 January 2008 ISSN: 0949 9962

Διαβάστε περισσότερα

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits. EAMCET-. THEORY OF EQUATIONS PREVIOUS EAMCET Bits. Each of the roots of the equation x 6x + 6x 5= are increased by k so that the new transformed equation does not contain term. Then k =... - 4. - Sol.

Διαβάστε περισσότερα

Μενύχτα, Πιπερίγκου, Σαββάτης. ΒΙΟΣΤΑΤΙΣΤΙΚΗ Εργαστήριο 6 ο

Μενύχτα, Πιπερίγκου, Σαββάτης. ΒΙΟΣΤΑΤΙΣΤΙΚΗ Εργαστήριο 6 ο Παράδειγμα 1 Ο παρακάτω πίνακας δίνει τις πωλήσεις (ζήτηση) ενός προϊόντος Υ (σε κιλά) από το delicatessen μιας περιοχής και τις αντίστοιχες τιμές Χ του προϊόντος (σε ευρώ ανά κιλό) για μια ορισμένη χρονική

Διαβάστε περισσότερα

[2] T.S.G. Peiris and R.O. Thattil, An Alternative Model to Estimate Solar Radiation

[2] T.S.G. Peiris and R.O. Thattil, An Alternative Model to Estimate Solar Radiation References [1] B.V.R. Punyawardena and Don Kulasiri, Stochastic Simulation of Solar Radiation from Sunshine Duration in Srilanka [2] T.S.G. Peiris and R.O. Thattil, An Alternative Model to Estimate Solar

Διαβάστε περισσότερα

ΧΩΡΙΚΑ ΟΙΚΟΝΟΜΕΤΡΙΚΑ ΥΠΟΔΕΙΓΜΑΤΑ ΣΤΗΝ ΕΚΤΙΜΗΣΗ ΤΩΝ ΤΙΜΩΝ ΤΩΝ ΑΚΙΝΗΤΩΝ SPATIAL ECONOMETRIC MODELS FOR VALUATION OF THE PROPERTY PRICES

ΧΩΡΙΚΑ ΟΙΚΟΝΟΜΕΤΡΙΚΑ ΥΠΟΔΕΙΓΜΑΤΑ ΣΤΗΝ ΕΚΤΙΜΗΣΗ ΤΩΝ ΤΙΜΩΝ ΤΩΝ ΑΚΙΝΗΤΩΝ SPATIAL ECONOMETRIC MODELS FOR VALUATION OF THE PROPERTY PRICES 1 ο Συνέδριο Χωρικής Ανάλυσης: Πρακτικά, Αθήνα, 013, Σ. Καλογήρου (Επ.) ISBN: 978-960-86818-6-6 ΧΩΡΙΚΑ ΟΙΚΟΝΟΜΕΤΡΙΚΑ ΥΠΟΔΕΙΓΜΑΤΑ ΣΤΗΝ ΕΚΤΙΜΗΣΗ ΤΩΝ ΤΙΜΩΝ ΤΩΝ ΑΚΙΝΗΤΩΝ Μαριάνθη Στάμου 1*, Άγγελος Μιμής και

Διαβάστε περισσότερα

Dr. D. Dinev, Department of Structural Mechanics, UACEG

Dr. D. Dinev, Department of Structural Mechanics, UACEG Lecture 4 Material behavior: Constitutive equations Field of the game Print version Lecture on Theory of lasticity and Plasticity of Dr. D. Dinev, Department of Structural Mechanics, UACG 4.1 Contents

Διαβάστε περισσότερα

Tridiagonal matrices. Gérard MEURANT. October, 2008

Tridiagonal matrices. Gérard MEURANT. October, 2008 Tridiagonal matrices Gérard MEURANT October, 2008 1 Similarity 2 Cholesy factorizations 3 Eigenvalues 4 Inverse Similarity Let α 1 ω 1 β 1 α 2 ω 2 T =......... β 2 α 1 ω 1 β 1 α and β i ω i, i = 1,...,

Διαβάστε περισσότερα

8.1 The Nature of Heteroskedasticity 8.2 Using the Least Squares Estimator 8.3 The Generalized Least Squares Estimator 8.

8.1 The Nature of Heteroskedasticity 8.2 Using the Least Squares Estimator 8.3 The Generalized Least Squares Estimator 8. 8.1 The Nature of Heteroskedastcty 8. Usng the Least Squares Estmator 8.3 The Generalzed Least Squares Estmator 8.4 Detectng Heteroskedastcty E( y) = β+β 1 x e = y E( y ) = y β β x 1 y = β+β x + e 1 Fgure

Διαβάστε περισσότερα

An Introduction to Splines

An Introduction to Splines An Introduction to Splines Trinity River Restoration Program Workshop on Outmigration: Population Estimation October 6 8, 2009 An Introduction to Splines 1 Linear Regression Simple Regression and the Least

Διαβάστε περισσότερα

1. A fully continuous 20-payment years, 30-year term life insurance of 2000 is issued to (35). You are given n A 1

1. A fully continuous 20-payment years, 30-year term life insurance of 2000 is issued to (35). You are given n A 1 Chapter 7: Exercises 1. A fully continuous 20-payment years, 30-year term life insurance of 2000 is issued to (35). You are given n A 1 35+n:30 n a 35+n:20 n 0 0.068727 11.395336 10 0.097101 7.351745 25

Διαβάστε περισσότερα

22 .5 Real consumption.5 Real residential investment.5.5.5 965 975 985 995 25.5 965 975 985 995 25.5 Real house prices.5 Real fixed investment.5.5.5 965 975 985 995 25.5 965 975 985 995 25.3 Inflation

Διαβάστε περισσότερα