#už je toho moc... ncvTest(ModelNPAS) ?ncvTest #jestli to dobre chapu tak muj signifikatni vysledek (p = 0.038) znaci ze nebyla dodrzena podminka nezavislosti rozptylu "If the test statistic has a p-value below an appropriate threshold (e.g. p<0.05) then the null hypothesis of homoskedasticity is rejected and heteroskedasticity assumed." https://en.wikipedia.org/wiki/Breusch%E2%80%93Pagan_test --- # Ověřte výskyt outlierů a vlivných případů v rámci vámi zvoleného modelu. # Výsledek rovněž stručně slovně interpretujte. Byl identifikován jeden vlivný případ (ID 442), ukázalo se nekonzistentní skórování na položkách, chybný záznam (věk 38882), chyba v datech - smazat. --- Suprese library(multilevel) sobel(nerd.omit.0$university, nerd.omit.0$VCL.sum, nerd.omit.0$NPAS.sum) # vychází signifikantne, mela by tedy mediace platit # z hlediska techto výsledku je slovní zásoba supresorem vztahu mezi vzdeláním a nerdy personality # težko ríct, jak to interpretovat, možná tím, že první efekt byl dost malý, asi není tak složité dojít k supresi (2) Suppression: Suppression variables increase the predictive validity of another variable by its inclusion into a regression equation. For example, higher intelligence scores (X) cause a decrease in errors made at work on an assembly line (Y). However an increase in intelligence (X) could cause an increase in errors made on an assembly line (Y) as it may also relate to an increase in boredom while at work (Z) thereby introducing an element of carelessness resulting in a higher percentage of errors made on the job. Such a suppressor variable will lead to an increase in magnitude of the relationship between two variables. --- #analýza mediace se mi nepodařila, ani jedna z výše napsaných funkci nedoběhla dokonce... nejsem si jist jsem to udělal špatně nebo jen chyběla výpočetní síla. library(multilevel) --- outlierTest(ModelNerda) # jeden outlier, 422. Je to jeho ID, nebo řádek v data framu? Číslo řádku odpovídá implicitnímu ID v data frame. --- Ověření předpokladů použití: https://www.r-bloggers.com/r-regression-diagnostics-part-1/ Component residual plots Component residual plots, an extension of partial residual plots, are a good way to see if the predictors have a linear relationship to the dependent variable. A partial residual plot essentially attempts to model the residuals of one predictor against the dependent variable. A component residual plot adds a line indicating where the line of best fit lies. A significant difference between the residual line and the component line indicates that the predictor does not have a linear relationship with the dependent variable. A good way to generate these plots in R is the car package. Bonferroni-adjusted outlier test The Bonferroni-adjusted outlier test in car tests the largest absolute studentized residual. It is now quite clear that X (observation Y) is an outlier, but as of yet we have not assessed whether it influences the regression line. http://math.furman.edu/~dcs/courses/math47/R/library/car/html/outlier.test.html Influence plot If points are identified, returns a data frame with the hat values, Studentized residuals and Cook's distance of the identified points. If no points are identified, nothing is returned. This function is primarily used for its side-effect of drawing a plot. Leverage - https://en.wikipedia.org/wiki/Leverage_(statistics) Cook's D - https://en.wikipedia.org/wiki/Cook%27s_distance Hat values - http://polisci.msu.edu/jacoby/icpsr/regress3/lectures/week3/11.Outliers.pdf https://www.statmethods.net/stats/rdiagnostics.html --- Poměrně velký problém mi ale činil i výběr prediktorů. --- Vůbec jsem si nevěděla rady s provedením mediace či moderace. https://is.muni.cz/auth/el/1423/podzim2017/PSY252/um/PSY252_S4_Regrese_2017.pdf?studium=719084