Displaying 4 results from an estimated 4 matches for "wtvec".
Did you mean:
wtec
2013 Apr 04
5
Help for bootstrapping‏
...-1)+1):(12*horizon*(x-1)+12*horizon),col])-1 USReturn[x]<-prod(data[(12*horizon*(x-1)+1):(12*horizon*(x-1)+12*horizon),2])-1}Return<-cbind(TbillReturn,USReturn)MeanVec<-c(mean(TbillReturn),mean(USReturn))VCovMat<-cov(Return)#return(MeanVec, VCovMat)
a<-c(1,1)a<-cbind(a, diag(1,2))
WtVec<-solve.QP(Dmat=VCovMat*2, dvec= MeanVec*lamda,Amat=a,bvec=c(1,0,0),meq=1)
#return(MeanVec, VCovMat, WtVec$solution)return(WtVec$solution)}
#Opt(OriData+1, 1, 5, 0)
##############################set.seed(4114)bs=1000 ###number of bootstrap samplesRegion<-5 ###Region indecies, check a...
2008 Nov 07
1
Problems with packages fda and splines (PR#13263)
...this email.
Can you help on this ?
Thanks,
David
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
R SCRIPT for Data2fd with NAs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> library(fda)
> y=runif(10)
> x=Data2fd(1:10,y) # creates functional object in B-spline basis
Warning message:
In smooth.basis(argvals, y, fdP, wtvec = w, fdnames = fdnames) :
The number of basis functions = 12 exceeds 10 = the number of points to be
smoothed. With no smoothing (lambda = 0), this will produce a perfect fit to
data that typically has wild excursions between data points.
> x$coefs # here it works because no NAs
[...
2005 Oct 07
6
Applying a function to each element of an array
Hi,
I have a 7000x7000 matrix, and each element is an integer. For each element, I want to apply the function :
wt <- 0
for(q in 1:count){
wt <- wt + 0.5^(q-1)
}
I get the value of 'count' from the elements in the matrix , and want to store the corresponding 'wt' value for that element.
I suppose I could loop through the matrix, and apply the function to each
2010 Mar 26
0
fda Data2fd
...lt;-Data2fd(argvals=domain, y=range)
#Error in create.bspline.basis(argvals) :
# rangeval is not a vector; class(rangeval) = matrix
mybasis<-create.bspline.basis(rangeval=c(0.5,5.2), nbasis=6)
myfd<-Data2fd(argvals=domain, y=range,basisobj=mybasis)
#Error in smooth.basis(argvals, y, fdP, wtvec = w, fdnames = fdnames) :
# 'y' is not the same length as 'argvals'.
thank you
eal