search for: f_y

Displaying 20 results from an estimated 22 matches for "f_y".

Did you mean: f_
2011 Jan 25
3
Integration of two lines
Hello, I need to integrate the absolute difference between two lines measured on different points. # For example : x <- seq(0, 1, 1/100) f_x <- runif(101) + x y <- seq(0, 1, 1/23) f_y <- runif(24) + (1 - y) plot(x, f_x, type="l") lines(y, f_y) Then I would like to compute Integral( | f_x - f_y | )dx. (This is not the same as | Integral(f_x)dx - Integral(f_y)dx |.) Computing this integral looks non trivial. I guess I should interpolate the points of f_y over x an...
2008 Jun 03
3
How to solve a non-linear system of equations using R
Dear R-list members, I've had a hard time trying to solve a non-linear system (nls) of equations which structure for the equation i, i=1,...,4, is as follows: f_i(d_1,d_2,d_3,d_4)-k_i(l,m,s) = 0 (1) In the expression above, both f_i and k_i are known functions and l, m and s are known constants. I would like to estimate the vector d=(d_1,d_2,d_3,d_4) which is solution
2011 Feb 16
0
Constraints in projection pursuit regression
Hi, I am solving a projection pursuit regression problem, of the form y = \sum_i f_i (a_i^T x), where a_i are unknown directions, while f_i are unknown univariate link functions. The following is known about each f_i: 1. f_i (0) = 0  (that is, each f_i passes through the origin) 2. f_i is monotonic. Is there a way to ensure that the function ppr() in R produces solutions that respect the
2003 Oct 23
1
Variance-covariance matrix for beta hat and b hat from lme
Dear all, Given a LME model (following the notation of Pinheiro and Bates 2000) y_i = X_i*beta + Z_i*b_i + e_i, is it possible to extract the variance-covariance matrix for the estimated beta_i hat and b_i hat from the lme fitted object? The reason for needing this is because I want to have interval prediction on the predicted values (at level = 0:1). The "predict.lme" seems to
2006 Jan 12
1
Problem with NLSYSTEMFIT()
Hello, I want to solve a nonlinear 3SLS problem with "nlsystemfit()". The equations are of the form y_it = f_i(x,t,theta) The functions f_i(.) have to be formulated as R-functions. When invoking "nlsystemfit()" I get the error Error in deriv.formula(eqns[[i]], names(parmnames)) : Function 'f1' is not in the derivatives table
2024 Jan 23
0
Quantiles of sums of independent discrete random variables
...), the computation of such a convolution is quite fast. (B) Characteristic function: X will be approximated with Y=X+Z, where Z is normal N(0,sigma) with small sigma. Y has a density (which it is impossible to compute directly) but the characteristic function (_continuous_ Fourier transform) cf_Y of Y can easily be computed analytically (without knowing the density of Y) Now let s be a numeric vector. I want to get the density f_Y(s) of Y evaluated along s. The proper way of doing this would be to apply the inverse continuous Fourier transform to the function cf_Y at each point in s. Thi...
2008 Jul 31
1
clustering and data-mining...
Hi all, I am doing some experiment studies... It seems to me that with different combination of 5 parameters, the end results ultimately converged to two scalars. That's to say, some combinations of the 5 parameters lead to one end result and some other combinations of the 5 parameters lead to the other end result (scalar). I am thinking of this is sort of something like clustering or
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
...){ mat <- rbind(like.mat(score,items, (prof_cut-gauss_numer$nodes)), dnorm(prof_cut-gauss_numer$nodes, mean=mu, sd=sigma)) } else { mat <- rbind(like.mat(score,items, (gauss_numer$nodes+prof_cut)), dnorm(gauss_numer$nodes+prof_cut, mean=mu, sd=sigma)) } f_y <- rbind(apply(mat, 2, prod), exp(gauss_numer$nodes), gauss_numer$weights) sum(apply(f_y,2,prod)) } class.denom <- function(score,items, mu=0, sigma=1){ gauss_denom <- gauss.quad.prob(49, dist='normal', mu=mu, sigma=sigma) mat <- rbind(like.mat(score,items,gauss_den...
2006 Jan 14
1
Different length of objects
Hello, i got an warning message in the following code: f<-1:100 t<-1:100 b<-100 ll2 <- function(b,f,t) { t<-cumsum(t) tn<-t[length(t)] i<-seq(along=f) s1<-(tn*exp(-b*tn)*sum(f[i]))/(1-exp(-b*tn)) s2<-sum((f[i]*(t[i]*exp(-b*t[i])-t[i-1]*exp(b*t[i-1])))/(exp(-b*t[i-1])-exp(-b*t[i]))) s1-s2 } ll2(b,f,t) i think, the problem here is, that t[0] doesn't
2009 Aug 06
1
solving system of equations involving non-linearities
Hi, I would appreciate if someone could help me on track with this problem. I want to compute some parameters from a system of equations given a number of sample observations. The system looks like this: sum_i( A+b_i>0 & A+b_i>C+d_i) = x sum_i( C+d_i>0 & C+d_i>A+b_i) = y sum_i( exp(E+f_i) * ( A+b_i>0 & A+b_i>C+d_i) = z A, C, E are free variables while the other
2004 Jul 10
1
Exact Maximum Likelihood Package
Dear R users, I am a mathematics postdoc at UC Berkeley. I have written a package in a Computational Algebra System named Singular http://www.singular.uni-kl.de to compute the Maximum Likelihood of a given probability distribution over several discrete random variables. This package gives exact answers to the problem. But more importantly, it gives All MLE solutions. My understanding is that
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
...(aboveQ==FALSE){ mat <- rbind(like.mat(x,b, (prof_cut-gauss_numer$nodes)), dnorm(prof_cut-gauss_numer$nodes, mean=mu, sd=sigma)) } else { mat <- rbind(like.mat(x,b, (gauss_numer$nodes+prof_cut)), dnorm(gauss_numer$nodes+prof_cut, mean=mu, sd=sigma)) } f_y <- rbind(apply(mat, 2, prod), exp(gauss_numer$nodes), gauss_numer$weights) sum(apply(f_y,2,prod)) } class.denom <- function(x,b, mu=0, sigma=1){ gauss_denom <- gauss.quad.prob(49, dist='normal', mu=mu, sigma=sigma) mat <- rbind(like.mat(x,b,gauss_denom$nodes),gauss_...
2010 Nov 16
1
Re : interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors
Thanks for sharing the questions and responses! Is it possible to appreciate how much the coefficients matter in one or the other model? Say, using Biau's example, using coxph, as.factor(grade2 == "high")TRUE gives hazard ratio 1.27 (rounded). As clinician I can grasp this HR as 27% relative increase. I can relate with other published results. With survreg the Weibull model gives a
2005 Feb 24
0
KalmanXXXX and deJong-Penzer statistic?
A question about: Kalman in R, time series and deJong-Penzer statistic - how to compute it using available artefacts of KalmanXXXXX? Background. in the paper http://www.lse.ac.uk/collections/statistics/documents/researchreport34.pdf 'Diagnosing Shocks in TIme Series', de Jong and Penzer construct a statistic (tau) which can be used to locate potential shocks. [p15, Theorem 6.1 and
2010 Mar 16
0
How can I calculate the error of a fit parameter, when the data set has an error itself?
Hi out there, imagine you have a dataset (x,y) with errors f, so that each y_i is y_i +- f_i. This is the normal case for almost all measurements, that one quantity y can only be measured with a certain accuracy. > x<-c(1,2,3) > y<-c(1.1,0.8,1.3) > f<-c(0.2,0.2,0.2) > plot(x,y) #whereas every y has the uncertainty of f If I now perform a nls-fit (and force the data
2010 Mar 29
0
Error of a fit parameter, of the data set has errors itself?
Hi out there, imagine you have a dataset (x,y) with errors f, so that each y_i is y_i +- f_i. This is the normal case for almost all measurements, since one quantity y can only be measured with a certain accuracy f. > x<-c(1,2,3) > y<-c(1.1,0.8,1.3) > f<-c(0.2,0.2,0.2) > plot(x,y) #whereas every y has the uncertainty of f If I now perform a nls-fit (and force the data
2011 Jul 01
0
How to filter XY pairs of inacurate gps position along track, taking into account the time index to not mix track from different days in one average track
...39;Lat') plot(Raw$Lon,Raw$Lat,type="l",main = "lowess(cars)") # data should be or filtared or ...? #expected answer: # ver 1 ------------------------------------------------------------------------------ #Raw$Lon_v2<- f_x (x=Raw$Lon, y=Raw$Lat) #Raw$Lat_v2 <- f_y (x=Raw$Lon, y=Raw$Lat) #lines(Raw$Lon_v2,Raw$Lat_v2,col=2) # ver 2 ------------------------------------------------------------------------------ op <- par(mfrow = c(2,1), mgp = c(2,.8,0), mar = .1+c(3,3,3,1)) plot(Raw$Lon,Raw$Lat,type="l",main = "lowess()") f_k...
2011 Feb 20
8
Generating uniformly distributed correlated data.
I wish to generate a vector of uniformly distributed data with a defined correlation to another vector The only function I have been able to find doing something similar is corgen from the library ecodist. The following code generates data with the desired correlation to the vector x but the resulting vector y is normal and not uniform distributed library(ecodist) x <- runif(10^5) y
2006 Apr 20
0
Major internal changes, TI DSP build change
>> You found it. The SHL32 (not SHR32) line fixes the problem. It must be >> doing a 16-bit shift, then extending the result (which is reasonable). >> As >> it happens, that it the same macro which gave us trouble last May >> (25th/26th), when the C55 build was more subtlely broken. > > Yes, that's what I finally remembered. I think I've fixed all
2010 Nov 13
2
interpretation of coefficients in survreg AND obtaining the hazard function for an individual given a set of predictors
Dear R help list, I am modeling some survival data with coxph and survreg (dist='weibull') using package survival. I have 2 problems: 1) I do not understand how to interpret the regression coefficients in the survreg output and it is not clear, for me, from ?survreg.objects how to. Here is an example of the codes that points out my problem: - data is stc1 - the factor is dichotomous