search for: kapetanakis

Displaying 17 results from an estimated 17 matches for "kapetanakis".

2011 Jul 12
2
apply (or similar preferred) for multiple columns
Dear all, I would like to use the apply or a similar function belonging to this family, but applying for each column (or row) but let say for each q columns. For example I would like to apply a function FUN for the first q columns of matrix X then for q+1:2*q and so on. If I do apply (X, 2, FUN) it applies for each column and not for every q columns. Is that possible with any similar function?
2012 Feb 15
2
integrate (error: evaluation of function gave a result of wrong length)
Dear all, I am trying to use the integrate function in R but it seems that it does not work in my example and I cannot figure out why. I create a function Mu1 (which works fine) and try to integrate by the code: n <- 100 Ctrl <- as.matrix(cbind(runif(n, -30, 30))) W <- Ctrl + as.matrix(rnorm(n)) Rsp <- (W>as.matrix(sample(10, n, T)))*1 Mu1 <- function(x, Y=Rsp, Xc=Ctrl){ x
2012 Oct 05
1
glm (probit/logit) optimizer
Dear all, I am using glm function in order to estimate a logit model i.e. glm(Y ~ data[,2] + data[,3], family = binomial(link = "logit")). I also created a function that estimates logit model and I would like it to compare it with the glm function. So, does anyone know what optimizer or optimization method glm uses in order to derive the result? Thank you Dimitris -- View this
2011 Oct 06
1
sum of functions
Dear all, I would like to create a code for semiparametric Klein and Spady's estimator. For that I created a function that provides the log-likelihood function for each observation (so it is a function of betas and i, where i denotes the observation). Now, in order to maximize the log-likelihood function, I have to sum these log-likelihood functions for each i and so to get another function
2011 Jul 31
2
memory problem; Error: cannot allocate vector of size 915.5 Mb
Dear all, I am trying to make some matrix operations (whose size I think is smaller than what R allows) but the operations are not feasible when they run in one session but it is feasible if they run separately while each operation is totally independent of the other. I run the code in one session the error that appears is: Error: cannot allocate vector of size 915.5 Mb R(16467,0xa0421540)
2010 May 26
2
mixture of virtual and plain users
Hi, I have a mail server (postfix/dovecot) running so far with normal local /etc/passwd users for domain example.com. mail_location = maildir:~/Maildir passdb pam { } userdb passwd { } Is it possible to add virtual domains/users to my setup without changing example.com to a virtual domain? I can do the postfix part with http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox but
2012 Jul 12
1
apply() to a function that has more than 2 arguments
Dear all, I created a function which it has many arguments i.e. Mu(x, Y, B, X, P) where Mu is the function. This function works perfect but when I am trying to use it in the apply() function in the manner apply(Matr, 1, Mu, Y=y, B=b, X=x, P=p) it does not work and the output is: Error in match.fun(FUN) : '1' is not a function, character or symbol When I transform the function Mu to have
2010 Mar 14
2
Create vectors from a vector
Dear all, I would like to create a number of vectors which contain the the first n elements of an existing vector. For example I have the vectors vnk (200x1) and vro(200x1) and I want to create 200 vectors that contain the 1st till the n_th element of the vectors and thus be able to create a vector s with 200 elements which are the product of all these vectors: i.e s1<-vnk[1]%*%vro[1]
2009 Feb 16
1
incl.non.slopes=FALSE does not work at predict.lm
Dear all, I am trying to estimate the prediction from a fixed effects model and their confidence intervals as well. Though I do not want to include in the prediction and at the confidence intervals the intercept. For that reason I used the argument incl.non.slopes=FALSE. But either if it is TRUE or FALSE it does not have any difference and also the system does not provide any warning. I really
2008 Sep 30
1
Quantile Regression for Longitudinal Data. Warning message: In rq.fit.sfn
Hi, I am trying to estimate a quantile regression using panel data. I am trying to use the model that is described in Dr. Koenker's article. So I use the code the that is posted in the following link: http://www.econ.uiuc.edu/~roger/research/panel/rq.fit.panel.R While this code run perfectly, it does not work for my data providing a warning message: In rq.fit.sfn(D, y, rhs = a) : tiny
2008 Oct 07
1
Mac crash- Probably memory problem
Dear all, I am running a code using bootstraps for estimating standard errors but the mac crashes. When I use small number of bootstraps (100) it works fine but if I increase that number it crashes. Thanks in advance dimitris The code, the error and my mac characteristics are the following: ##############code##################### qr.1<- rq(y~factor(year)+factor(state)+x1+I(x^2)+I(x^3),
2008 Oct 06
0
Computationally singular [provides coefficients but not covariance matrix]
Hi, I am estimating a regression but the summary command is unable to provide me results, while the coefficients are available from the coefficients value. I suppose that it cannot estimate the covariance matrix. Is there any command that I can relax the tolerance so it can estimate the covariance matrix. The code and the error of R is: eq1<-rq(y~factor(year)+factor(state)+x1+x2+x3,
2011 Jul 18
0
np package, estimating the standard errors of Klein and Spady's estimator
Dear all, I would like to estimate the standard errors of Klein and Spady's estimator for that I am using: library(np) N<-100 X<-matrix(c(rnorm(N,1,1), rnorm(N,0,1)), ncol=2) BETA <-matrix(1,2,1) Z<-X%*%BETA L<-rlogis(N,location=0, scale=1) Y <-as.vector(X%*%BETA+L>=0)*1 KS <- npindexbw (xdat=X, ydat=Y, bandwidth.compute=TRUE, method="kleinspady",
2011 Jul 20
0
np package, KleinSpady estimator, error when I estimate the bootstrapped standard errors
Dear all, I am using np package in order to estimate a model with Klein and Spady estimator. To estimate the model I use KS <- npindexbw (xdat=X, ydat=Y, bandwidth.compute=TRUE, method="kleinspady", optim.maxit=10^3, ckertype="epanechnikov", ckerorder=2) and to estimate beta hats standard errors I use KSi <- npindex(KS, gradients=T, boot.num=300) vcov(KSi) This is
2011 Jul 25
0
error in optimization when I include constant term in Klein and Spady (np package)
Dear all, I am trying to use the np package for the estimation of a model with Klein and Spady's semiparametric estimator. When though, I include a constant term ( a column with 1s in X) then the following message appear: Multistart 1 of 3...Error in optim(c(beta, h), fn = optim.fn, gr = NULL, method = optim.method, : non-finite value supplied by optim So, how can I include a constant
2012 Mar 28
1
Local linear regression
Dear all, I wrote a code which supposedly should create a function which performs a local linear regression at point x (lower case). The issue is that I have no reference to check if indeed my code performs correctly a local linear regression. Is there any function in R that performs a local linear regression (to give conditional expectation which I am interested in and not graph) in order to
2010 Oct 10
0
rearrange command in quantreg package
Dear all, I want to use the "rearrange" command which is based on Chernozhukov et al paper and is included in the quantreg package. So, I run a quantile regression in which I included dummy variables for state and years in order to estimate the respective fixed effects quantile regression. The problems are the followings: 1. At example that is stated in the help****, I don't