search for: ydat

Displaying 14 results from an estimated 14 matches for "ydat".

Did you mean: dat
2008 Jun 07
2
Using lm with a matrix?
I'm trying to do a linear regression between the columns of matrices. In example below I want to regress column 1 of matrix xdat with column1 of ydat and do a separate regression between the column 2s of each matrix. But the output I get seems to give correct slopes but incorrect intercepts and another set of slopes with value NA. How do I do this correctly? I'm after the slope and intercept of each columns regression > xdat <- mat...
1999 Jan 28
1
NAs spoil lowess smoothing
Can anyone explain to me what this error message means, why I'm getting it, and how to fix it? lines(lowess(xdat, ydat, f=.5), col=3) Error: NAs in foreign function call (arg 1) ______________________________________________________________________ Stuart Luppescu -=-=- University of Chicago ºÍʸ ¤ÈÃÒÆàÈþ¤ÎÉã(EUC) -=-=- s-luppescu at uchicago.edu http://www.consortium-chicago.org/people/sl/sl.html ICQ #2...
2011 Dec 01
0
Error message: object 'A' not found
...# same for bad habitat hist(Pellet$Distance,freq=F,xlim=c(0,7)) # plots a histogram, or frequency distribution of the data # Part 2 # Create formated distance response matrix cp <- c(0,0.50,2,3.50,5.00,6.50) # Distance cut points defining distance intervals yDat <- formatDistData(Pellet, "Distance", "Line", cp) # This creates a formatted data matrix for number of observations at each distance interval for each transect yDat # Prepare habitat covariates for each transect based on the stratum they reside in hab <- matrix(c("C&q...
2012 Sep 21
3
Return level plots
...Map with return level by location.) Here is some code I tried, following similar structure to languages I'm more familiar with, but it isn't working. Y = as.matrix(time,lat,lon) for (t in 1:67) + for (j in 1:106) + for (i in 1:193) + fit(t,j,i)<-gpd.fit(speed(t,j,i), threshold=17,ydat = Y) I receive errors at this point, and cant figure out how to get individual fits at each grid point. Thanks, Michelle -- View this message in context: http://r.789695.n4.nabble.com/Return-level-plots-tp4643847.html Sent from the R help mailing list archive at Nabble.com.
2009 May 04
3
GEV para datos no estacionarios
Hola a todos, Soy nuevo en R y estoy intentando modelizar una serie de datos no estacionarios usand la distribucion Generalizada de Valores Extremos GEV. ¿Podriais indicarme como se modeliza una tendencia polinómica (cuadrática, por ejemplo) en alguno de los 3 parámetros (situación, escala o forma)? He encontrado documentación a cerca de modelización linear o exponencial, pero no acabo de
2005 Jan 23
5
How to use "identify"
I can't get identify to work, using R 2.0.1 under windows xp pro, service pack 2. Here's what I enter, and the result: > plot((our.frame2$c1),(our.frame2$c9)) # Produces desired plot > identify(our.frame2$c1) # Plot comes to forefront, so I select a point warning: no point with 0.25 inches numeric(0) Is my call to identify correct? The help page for indentify (from
2009 Feb 13
0
npindex: specifying manual bandwiths
...'t manage so far; could you help ? For instance, #Simulation n <- 200 x1 <- runif(n, min=-1, max=1) x2 <- runif(n, min=-1, max=1) y <- ifelse(x1 + x2 + rnorm(n) > 0, 1, 0) #Klein and Spady estimation, letting np compute the bandwidth npindexbw(bws=c(1,1,.5),xdat=cbind(x1,x2),ydat=y,bandwidth.compute=TRUE,method="kleinspady") #Works fine! #Klein and Spady estimation, attempting to constrain the bandwidth to .5 npindexbw(bws=c(1,1,.5),xdat=cbind(x1,x2),ydat=y,bandwidth.compute=FALSE,method="kleinspady") #Returns a result with the starting values: no estim...
2006 Oct 11
4
Help on direction of axis in R needed
Hi! I'd like to plot things with axes going from the highest to the lowest value, so that e.g. high values on the xaxis are plotted to the left and low values to the right. Could anyone tell me how this is done? I couldn't find anything in the documentation. Thanks a lot! Silli
2007 May 10
4
Value at Risk
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: https://stat.ethz.ch/pipermail/r-help/attachments/20070510/b26482f4/attachment.pl
2010 Jan 31
0
Package ismev, gpd.fit, and interpretation for statistics of extreme values
...gt; th <- 100 > ra <- gpd.fit(xa, threshold=th) # stationary $threshold [1] 100 $nexc [1] 1036 $conv [1] 0 $nllh [1] 5971.029 $mle [1] 77.8220222 0.4094496 $rate [1] 0.01480423 $se [1] 3.71784848 0.03845162 > rb <- gpd.fit(xa, threshold=th, ydat=ta, sigl=1) # nonstationary $threshold [1] 100 $nexc [1] 1036 $conv [1] 0 $nllh [1] 5966.575 $mle [1] 61.60260272 0.00473462 0.40523571 $rate [1] 0.01480423 $se [1] 5.902059762 0.001556933 0.037975847 > lla <- -1*as.numeric(ra$nllh) > llb <- -1...
2011 Jul 18
0
np package, estimating the standard errors of Klein and Spady's estimator
...mate 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", ckertype="epanechnikov" ) KSi <- npindex(KS, errors=TRUE) se(KSi) But then I get as a result a vector Nx1, which I do not understand what it is, and if I let errors=FALSE then I get a NA as a result. So, how can I get the sta...
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 fine so far, but if I want to estimate the bootstrapped s...
2011 Jul 25
0
error in optimization when I include constant term in Klein and Spady (np package)
...eady tried all the possible optimization methods) The code that I run is: library(np) N<-250 q<-2 BETA<-matrix(1,3,1) X<-matrix(c(rnorm(N,0,1), rnorm(N,1,1)), ncol=q) X<-cbind(X,1) 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", optim.maxit=10^3, ckertype="epanechnikov", ckerorder=2) Thank you Dimitris -- View this message in context: http://r.789695.n4.nabble.com/error-in-optimization-when-I-include-constant-term-in-Klein-and-Spady-np-package-tp369272...
2012 Jul 19
1
npindex: fitted values of the function itself?
Dear list, I am using the np package. With the npindex function I estimate a semiparametric single index model using the method of Klein-Spady. P(Z=1|X) = G(X?b) I don?t have any problems to calculated the fitted values and standard errors X?b: bw = npindexbw(xdat=x, ydat=y_bi, method="kleinspady", nmulti=2) model = npindex(bws= bw3, gradients= TRUE, residuals = TRUE, boot.num = 50) x_fit = predict(model, se.fit = TRUE) x_fit_bi= x_fit$fit x_fit_bi_se = x_fit$se.fit However, I also would like to obtain an estimate of G(X?b). For example, after estimating...