[R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread Saurav Pathak
Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example, when I try the following: l- loess(d~x+y, span=span, se=TRUE) p- predict(l, se=TRUE) I get the following error message: Error in vector(double, length) :

Re: [R] cannot calculate standard estimate with predict on loess

2012-05-04 Thread Saurav Pathak
On 05/04/2012 10:39 AM, David Winsemius wrote: On May 3, 2012, at 7:10 PM, Saurav Pathak wrote: Hi, For some reason I have been unable to use the predict function when I desire the standard error to be calculated too. For example, when I try the following: l- loess(d~x+y, span=span, se

[R] loess question

2011-10-07 Thread Saurav Pathak
Hi All, I am trying to use loess to smooth a 2D image, and also obtain the standard error for every pixel. I see that the standard error does not make sense. For example, running the following: library(stats) x - array(c(1:100), dim=c(100,100)) y - t(x) v - exp(-((x-50)^2+(y-50)^2)/30^2) s

[R] the c implementation of loess

2011-06-17 Thread Saurav Pathak
Hi All, I am trying to trace the origin of the current loess implementation in R. The reference mentions that Prof Ripley based it on the 1998 version of dloess. When I look at dloess in http://www.netlib.org/a, the file changes mentions dloess was made available in 1992 and that a memory

[R] 2d loess question

2011-06-14 Thread Saurav Pathak
Hi, We have been trying to use loess on 2D data (basically a matrix) in the following way: x - 1:256 y - 1:256 z - data # input from data z.loess = loess(z ~ x + y) We get a 256 x 1 vector of fitted values with a 256 x 256 array of residuals, but not a 256 x 256 array of fitted values.

Re: [R] How to create MULTILEVELS in a dataset??

2009-10-19 Thread saurav pathak
because Stata is taking days and days to run gllamm Kindly help On Mon, Oct 19, 2009 at 2:19 PM, Ista Zahn istaz...@gmail.com wrote: HI, Please keep r-help copied on the reply -- hopefully someone will pick up this thread and help us out. On Mon, Oct 19, 2009 at 2:17 AM, saurav pathak

[R] How to create MULTILEVELS in a dataset??

2009-10-18 Thread saurav pathak
Dear R users I have a data set which has five variables. One depenedent variable y, and 4 Independent variables (education-level, householdincome, countrygdp and countrygdpsquare). The first two are data corresponding to the individual and the next two coorespond to the country to which the

[R] lmer function and Inverse mills ratio

2009-10-17 Thread saurav pathak
Dear R users I have two questions, I have been on this problem for last 3 months, please help First question: *How can I use the lmer function for a three level probit ( ie please help me with the command syntax)?* The second question is, *how can I then subsequently calculate the Inverse

[R] how to cluster data for use with lmer

2009-10-17 Thread saurav pathak
Dear R users My data set is e names(e) [1] yearctry discent age gender gemeduc gemhhinc ref_groupfearfail_ref knowent_ref nbgoodc_ref [11] nbstatus_ref estbbuso_ref lngdplngdpsq es_gdppcppp sq_gdppcppp estbbo_m es_gdpchg hear I have variables

[R] Inverse Mills in clustered (multilevel) cross-sectional panel data

2009-09-08 Thread saurav pathak
Dear R saviors, kindly address to this problem, I would really appreciate any takers. I am trying to resolve this issue of IMR in clustered (multilevel) cross-sectional panel data for more than two months now,. The characteristics of my dataset are as follows: - some 900 000 individuals -

[R] PROBIT REGRESSION FOR GROUPED/CLUSTERED DATA

2009-07-16 Thread saurav pathak
Hello all I have been working to fix this for weeks now, It should be simple to fix. Please help Let me explain what I am doing, I have a data set for 65 countries over a period of 9 years (2000-2008). Each country has on an average say 2000 interviews, so that the total set has roughly

[R] DECLARING A PANEL VARIABLE???

2009-07-15 Thread saurav pathak
Hi I am working on a panel data, my data are clustered/grouped by the variable yearctry, I am running the regression below, but I cant make the regression recognise yearctry as the panel variable in the regression myProbit- glm(s ~ age + gender + gemedu + gemhinc + es_gdppc + imf_pop +

[R] ERROR message while using -invMillsRatio()

2009-07-12 Thread saurav pathak
Hi I have been trying so many different things to get my Inverse Mills Ratio going for a Two stage Heckman Model, I have tried the following so far (the commands are listed below till teh point where I get an error), I get an error in the last sentence (marked in bold below), if this were

[R] Heckman Selection Model/Inverse Mills Ratio

2009-07-11 Thread saurav pathak
I have so far used the following command glm(formula = s ~ age + gender + gemedu + gemhinc + es_gdppc + imf_pop + estbbo_m, family = binomial(link = probit)) My question is 1. How do i discard the non significant selection variables (one out of the seven variables above is non-significant)

[R] Modifying Data from a Panel for Probit Regression

2009-07-10 Thread saurav pathak
Hi I have two questions 1. I am working on a panel data, the variable *A *has some values as missing denoted by . and others are non-missing values. I wish to create another variable *B *from the variable *A *such that all the missing values are assigned as ZERO (0) and all the non-missing

[R] GLM for Probit for Panel Data

2009-07-10 Thread saurav pathak
Hello I am working on a panel data, my panel variable is the variable yearctry, let me explain what I mean, yearctry is calculated based on the year and the ISD phone code of a country, eg, for the year 2000 say and for country USA say (code = 001), my yearctry variable will then be 201, there

[R] getOptions(max.print) in R

2009-07-01 Thread saurav pathak
I am typing the following on the command prompt: variab = read.csv(file.choose(), header=T) variab It lists 900,000 ( this is the total number of observations in variab ) minus 797124 observations and prompts the following message [ reached getOption(max.print) -- omitted 797124 entries ]] Is

[R] Stata file and R Interaction :File Size Problem in Import

2009-06-30 Thread saurav pathak
Hi I am using Stata 10 and I need to import a data set in stata 10 to R, I have saved the dataset in lower versions of Stata as well by using saveold command in Stata. My RAM is 4gb and the stata file is 600MB, I am getting an error message which says : Error: cannot allocate vector of

[R] Stata file Import and Analysis in R

2009-06-29 Thread saurav pathak
Hi I have a stata data set (.dta file) of size 600 MB, I need to import it in R and do a 2SLS multilevel analysis on the data set. I would eb grateful if help is provided for the first part of how to import this big file from Stata to R and then how to open the imported Stata file in R? Kindly

[R] Large Stata file Import in R

2009-06-29 Thread saurav pathak
Hi I am using Stata 10 and I need to import a data set in stata 10 to R, I have saved the dataset in lower versions of Stata as well by using saveold command in Stata. My RAM is 4gb and the stata file is 600MB, I am getting an error message which says : Error: cannot allocate vector of size 3.4

[R] Stata file Import and Analysis in R

2009-06-29 Thread saurav pathak
Hi I have a stata data set (.dta file) of size 600 MB, I need to import it in R and do a 2SLS multilevel analysis on the data set. I would eb grateful if help is provided for the first part of how to import this big file from Stata to R and then how to open the imported Stata file in R? Kindly

[R] Summing over an index of an array

2008-02-19 Thread Saurav Pathak
Hi, I cannot seem to figure out how to sum over an index of a array. For example, let A be a 3 dimensional array. I want to, say, find the sum over the first dimension. That is S_jk = Sum_i A_ijk where now S is a 2-dim matrix. I dont want to use a loop. Thanks, -- saurav