[R] Error in step()

2006-08-02 Thread Cal Stats
Hi..

I pass a lm() object to step() but after a few steps it stops with the 
error message.

say:

x1-lm(y~.,data=z)

x2-step(x1)

i have 516 observations and 299 variables.

after a few steps i get the error message:
  Error in one %*% x : requires numeric matrix/vector arguments


anyone knows why this happens after some steps. its an lm object that is passed 
so i am not sure where the error might be
Thanks.

Harsh


-


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Inverting a large Matrix (14000 x 14000)

2006-06-25 Thread Cal Stats
Hi..
  
I have to invert a 15000 x 15000 matrix  (generalized  inverse). I do run 
the process on a fairly powerful computer. but still  complains indufficient 
memory.
  
  Is there a way one can invert a large matrix in some other efficient manner.
  
  Thanks
  Harsh
  

-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Plotting Upper triangle of Matrix with diagonal as the Base

2006-06-19 Thread Cal Stats
Hi..
  
 I a have a symmetric matrix to plot . I would like to plot  only the Upper 
triangle but with the diagonal as the Base of the  rectangle. Is there an easy 
way to do it.
  
  Thanks.
  
  Harsh
  

-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Math symbols for labels in Perspective plots

2006-06-09 Thread Cal Stats
Hi ..
  
 I would like to have math symbols in perspective plots
  
  i tried :  persp(x,y,z,xlab=expression(phi))
  
  but it plots it as phi.
  
  Thanks.
  
  Harsh
  
 __



[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] LARS error

2006-05-24 Thread Cal Stats
Hi All,
  
  when i run 
  
 cv.lars(x3,y3)
  
  it runs fine. but when i run 
  
  cv.lars(x3,y3,fraction=seq(0,0.1,100))
  
  I get the following error.
  
  Error in apply((y[omit] - fit)^2, 2, mean) : dim(X) must have a positive 
length
  
  Any help/suggestions will be appreciated.
  
  Thanks.
  
  Harsh
  

-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] layout and image.plot

2006-04-24 Thread Cal Stats
Hi..
  
i was using image.plot from the library fields along with layout
  
  i had the follwoing commands:
  
  layout(matrix(c(1,1,2,3,4,5),ncol=2,nrow=3,byrow=TRUE))
  followed by 5 image plots.
  
  i wanted image 1 on the top row followed by the 4 images on the next two rows.
  
  it works with ordinart plot() command but not with image.plot .
  
  Any suggestions.
  
  Harsh
  

-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] lm$effects in lm()

2006-04-09 Thread Cal Stats
Hi ..
  
 lm() returns an effects component in its output. I read the explanation in 
R but was not quite clear.
  
  say my response is Y
  and design matrix is X
  
  say X has QR decomposition X=QR
  
  is effects = Q (Q'Q)^-1 Q' Y  ???
  
  i am sure this is wrong as it did not match the output from lm() . what is 
the actual calculation.
  
  Harsh.
  
  

-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] lm - Generalized Inverse for input to step()

2006-04-04 Thread Cal Stats
I did employ  ginv() to solve my problem earlier.
  
  the problem is i would like to employ step() to do model selection using 
AIC/BIC.
  
  now this needs an lm object to be input. i created an slm object giving  the 
necessary elements in the lm object  and  then input to  step()
  
  but i get an error saying row size changing: remove NAs.
  
  the data does not have NA's
  
  Thanks
  
  Harsh

Doran, Harold [EMAIL PROTECTED] wrote:  You can do this yourself with 
ginv() 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cal Stats
Sent: Monday, April 03, 2006 7:40 PM
To: r-help@stat.math.ethz.ch
Subject: [R] lm - Generalized Inverse

Hi,
  
 is there a  lm  which will implement the moore-pensrose generalized
inverse.
  
  Thanks.
  
  Harsh
  
  
-

 [[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html




-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] lm - Generalized Inverse

2006-04-03 Thread Cal Stats
Hi,
  
 is there a  lm  which will implement the moore-pensrose generalized 
inverse.
  
  Thanks.
  
  Harsh
  

-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] nls formula length : how to accomodate length greater than 502

2006-03-13 Thread Cal Stats
Hi ,
  
I am using nls(formula)
  
  where formula is y~ expression
  
  y  is 1 character
  ~  is 1 character
  
  now i have an expression that is greater tha 502 characters. but R does  not 
recognize anything greater than 502 characters. (Note the  expression itself is 
created using paste and as.formula commands)
  
  Does anyone have a suggestion. (BTW i have checked my formula and its right 
in case you have doubts about its length)
  
  Thanks.
  
  Harsh
  
  
  

-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] nls formula length : how to accomodate length greater than 502

2006-03-13 Thread Cal Stats
Hi ,
  
I am using nls(formula)
  
  where formula is y~ expression
  
  y  is 1 character
  ~  is 1 character
  
  now i have an expression that is greater tha 502 characters. but R does  not 
recognize anything greater than 502 characters. (Note the  expression itself is 
created using paste and as.formula commands)
  
  Does anyone have a suggestion. (BTW i have checked my formula and its right 
in case you have doubts about its length)
  
  Thanks.
  
  Harsh
  
  
  

-

 Find  great deals to the top 10 hottest destinations!
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] nls: formula length greater than 502

2006-03-13 Thread Cal Stats
Hi ,
  
I am using nls(formula)
  
  where formula is y~ _expression
  
  y  is 1 character
  ~  is 1 character
  
  now i have an _expression that is greater tha 502 characters. but R  does not 
recognize anything greater than 502 characters. (Note the  _expression itself 
is created using paste and as.formula commands)
  
  Does anyone have a suggestion. (BTW i have checked my formula and its right 
in case you have doubts about its length)
  
  Thanks.
  
  Harsh

-


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] nls number of explantory variables

2006-03-12 Thread Cal Stats
Hi..
  
 is there a limit on the number of explanatory variables in nls ?
  
  i have a dataframe with the columns names x1,x2..,x300
  when i run nls it gives the error:  x181 not found
  
  thought it does run when i have x1,x2,...,x170 variables.
  
  Thanks
  
  Harsh
  
  
  

-


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Non-linear Regression : Error in eval(expr, envir, enclos)

2006-03-11 Thread Cal Stats
Hi..
  
  i have an expression of the form:
  
  
model1-nls(y~beta1*(x1+(k1*x2)+(k1*k1*x3)+(k2*x4)+(k2*k1*x5)+(k2*k2*x6)+(k3*x7)+(k3*k4*x8)+(k3*k2*x9)+(k3*k3*x10)+
  
(k4*x11)+(k4*k1*x12)+(k4*k2*x13)+(k4*k3*x14)+(k4*k4*x15)+(k5*x16)+(k5*k1*x17)+(k5*k2*x18)+(k5*k3*x19)+
 
(k5*k4*x20)+(k5*k5*x21)+(k6*x22)+(k6*k1*x23)+(k6*k2*x24)+(k6*k3*x25)+(k6*k4*x26)+(k6*k5*x27)+(k6*k6*x28)+
 
(k7*x29)+(k7*k1*x30)+(k7*k2*x31)+(k7*k3*x32)+(k7*k4*x33)+(k7*k5*x34)+(k7*k6*x35)+(k7*k7*x36)),x,
 
start=c(beta1=-0.001480981,k1=0.001,k2=0.001,k3=0.001,k4=0.001,k5=0.001,k6=0.001,k7=0.001),control=c(maxiter=100))
  
  where beta1, k1 -- k7 are the parameters to be estimated and 
  x1---x36 are the columns of the dataframe x 
  
  when i run this expression I get the error 
  
  Error in eval(expr, envir, enclos) : numeric 'envir' arg not of length one
  
  I searched  a couple of previous posting on this error but none of them 
addressed it in detail
  
  Thanks
  
  Harsh
  
  
  

-


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] nls start values

2006-03-11 Thread Cal Stats
Hi,
  
  I have a large number of parameters to estimate in nls say 100: 
beta1--beta100
  lets say i have 100 values in a vector
  
  is there a way where i can create the start vector for nls using a loop 
instead of individually filling the 100 values.
  
  Thanks
  
  Harsh
  

-


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] nls start values

2006-03-11 Thread Cal Stats
Hi..
  
  here is an example
  
  ss-NULL
  vals-1:100
  for(i in 1:100){
  ss-c(ss,paste(beta,i,=,vals[i],sep=))
  }
  sss-paste(ss,collapse=,)
  
  now is there a way i can convert sss  so that i can give the command
  
  nls(formula,start=sss)
  
  Thanks
  
  Harsh

Charles Annis, P.E. [EMAIL PROTECTED] wrote:  Please give us an EXAMPLE of 
the loop you have in mind.  (It's likely that
you can use simpler methods than a loop, but without an example we'd be
guessing.)




Charles Annis, P.E.

[EMAIL PROTECTED]
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cal Stats
Sent: Saturday, March 11, 2006 3:43 PM
To: r-help@stat.math.ethz.ch
Subject: [R] nls start values

Hi,
  
  I have a large number of parameters to estimate in nls say 100:
beta1--beta100
  lets say i have 100 values in a vector
  
  is there a way where i can create the start vector for nls using a loop
instead of individually filling the 100 values.
  
  Thanks
  
  Harsh
  
  
-


 [[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html





-


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Periodic B-spline surface

2006-02-06 Thread Cal Stats
Hi..,
  
 is there any funcrion in R to fit a periodic B-spline Surface
  
  Harsh
  

-
Brings words and photos together (easily) with

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Problem with Integral of Indicator Function

2006-01-06 Thread Cal Stats
 Hi..
  
 i was trying to integrate the indicator funtion but had  problems when 
limits where negative or equal to the indicator condition
  
  my function is 
  
  fun1-function(x){
  as.numeric(x=2) 
  }
  _
  
  which should be   Ind(x=2)*x
  
  seems to work for the following two cases
  
   integrate(fun1,3,5)
  2 with absolute error  2.2e-14
  
   integrate(fun1,5,100)
  95 with absolute error  1.1e-12
  --
   Does not work for the following
  
   integrate(fun1,0,2)
  0 with absolute error  0 ( i was expecting  = 2)
  
   integrate(fun1,-1,5)
  3 with absolute error  3.3e-14   (i was expecting =5)
  
   integrate(fun1,-2,5)
  3 with absolute error  5.3e-15(i was expecting =5)
  
  Any suggestions?
  
  Thanks.
  
  Harsh,
  
  
  


-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Indefinite Integral in R

2006-01-04 Thread Cal Stats
is there  a command in R that would return the expression of an Indefinite 
Integral.
  
  i know there is integrate() command for definite integrals.
  
  Thanks.
  
  Harsh.
   
 
  


-

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Bivariate Splines in R

2005-12-12 Thread Cal Stats
Hi..,

is there a function in R to fit bivariate splines
?
I came across 'polymars' (POLSPLINE) and 'mars' (mda)
packages. Are these the one to use or are there other
specific commands?

Thanks.

Harsh

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html