[R] Distribution, heteroskedasticity etc. tests for glm, tobit and heckit?

2013-05-29 Thread Michal Kvasnička
Hallo. Is there any package / code snippet to test the distribution assumption, heteroskedasticity, omitted variables, and linearity with the models estimated by maximum likelyhood? I especially need it for three type of models: * binary choice (probit and probit with non-normal distribution) --

[R] Quantile regression for binary choice and heckit

2013-05-29 Thread Michal Kvasnička
Hallo. Is there any package / code snippet to estimate quantile regression for a binary choice model (like probit) and selection model (like heckit)? I found that quantreg package can estimate tobit-like model, but I can't figure out how to tweak it for probit / heckit. Best wishes, Michal

[R] glmx specification of heteroskedasticity (and its use in Heckit)

2013-05-31 Thread Michal Kvasnička
Hallo. First many thanks to its authors for glmx package and hetglm() function especially. It is absolutely great. Now, let me ask my question: what model of heteroskedasticity hetglm() uses? Is the random part of the Gaussian probit model norm(0, sd = exp(X2*beta2)) where norm is the

Re: [R] glmx specification of heteroskedasticity (and its use in Heckit)

2013-05-31 Thread Michal Kvasnička
Hallo. Many thanks for your answer. Let me check please that I do understand it correctly. Does it mean that the estimated log-likelyhood function is (in the Gaussian case) sum y * log F(x'b / exp(z'g)) + sum (1 - y) * log(1 - F(x'b / exp(z'g)) where F is standard normal CDF, and the rest is

[R] Residuals of tobit{AER} and testing distribution normality

2014-03-25 Thread Michal Kvasnička
Hallo. What are the residuals returned by resid() in this code? library(AER) m - tobit(y ~ x1 + x2, data=dat) rr - resid(m2, type = response) Can I use them to test the normality of the random variable distribution this way? qqnorm(rr) shapiro.test(rr) And is it correct to handle

[R] step() and multicore

2013-08-14 Thread Michal Kvasnička
Hallo. I'm running step() on lm() in R version 2.15.1 within RStudio on my xUbuntu Linux computer with 4 core processor. Linux top command states that rsession (R) is using from 100 % to about 330 % of the processor, which (I think) means that R is using more than one core. Is it possible? I

[R] Voronoi/Thiessen polygon neighbors?

2014-10-29 Thread Michal Kvasnička
Hello. I have a set of points in 2D. I can construct Voronoi polygons around them with deldir package and function from this page: http://stackoverflow.com/questions/9403660/how-to-create-thiessen-polygons-from-points-using-r-packages What I need is to find the list of all polygon neighbors

[R] Knitr: how to find out from within a .Rmd file the output type?

2014-10-31 Thread Michal Kvasnička
Hi. Is there a way how to find out from within a .Rmd file what output format is generated? The reason is this: I write a paper in R markdown in RStudio. Sometimes I generate .html, sometimes .pdf. My paper presents a table of regression models using stargazer function. I've got the following

Re: [R] Knitr: how to find out from within a .Rmd file the output type?

2014-10-31 Thread Michal Kvasnička
#. rocks...1k --- Sent from my phone. Please excuse my brevity. On October 31, 2014 4:56:26 AM PDT, Michal Kvasnička prgo...@gmail.com wrote: Hi. Is there a way how to find out from within a .Rmd file what output format

[R] How are packages installed with install_github() updated in RStudio?

2015-08-18 Thread Michal Kvasnička
Hallo. I use RStudio. Because of a bug in the latest CRAN version of dplyr, I installed the GitHub version with install_github(). Now I wonder what happens when there is a new version. Does RStudio update the packages installed from GitHub? If so, does it replace it with the new CRAN version, or