Displaying 7 results from an estimated 7 matches for "betahat".
2012 Dec 27
2
Bootstrap
Hola, buenas tardes
estoy intentando hacer un bootstrap de un modelo, pero me da el siguiente
error:
"Error in FUN(newX[, i], ...) :
unused argument(s) (list(age = c(33, 47, 49, 56, 60, 64, 64, 66, 68, 69,
71, 71, 72, 73, 74, 75, 75, 76, 78, 81, 83, 83, 36, 43, 46, 47, 49, 49, 51,
51, 52, 52, 53, 54, 54, 54, 55, 56, 56, 57, 57, 58, 58, 58, 58, 59, 59, 60,
61, 62, 63, 64, 65, 65, 66, 66,
2007 May 02
0
KS test pvalue estimation using mctest (library truncgof)
...imated a generalized pareto
distribution parameters (xi, beta, threshold) (I've used fExtremes pkg).
I'm in doubt on what of the following command is the most appropriate:
Let:
x<-sample
t<-threshold
xt<-x[x>t]
xihat<-gpdFit(x, threshold=t, type = "pwm")$par.ests[1]
betahat<-gpdFit(x, threshold=t, type = "pwm")$par.ests[2]
(1)
ks.test(xt,"pgpd",list(xi=xihat,beta=betahat),H=t,estfun =
"as.list(gpdFit(x, 0)$par.ests)", tol = 1e-02)
(2)
ks.test(xt,"pgpd",list(xi=xihat,beta=betahat),H=t,estfun =
"as.list(gpdFit(x, t)$par.es...
2003 Oct 30
3
Change in 'solve' for r-patched
...hows that in most cases the calculation involved was something
like
solve(t(X) %*% X)
This is not good numerical linear algebra. Admittedly we all learn
that, for example, least squares estimates can be written as
(X'X)^{-1} X'y and it is seems reasonable to code this calculation as
betahat <- solve(t(X) %*% X) %*% t(X) %*% y
but you shouldn't do that.
In terms of numerical stability and also in terms of efficiency, that
is an remarkably bad way of determining least squares estimates.
To begin with, you don't invert a matrix just to solve a system of
equations. If A is a...
2012 Jan 25
4
formula error inside function
...,T,C)
event <- ifelse(T<=C,1,0)
mean(event)
phmmd <- data.frame(Z)
phmmd$cluster <- clusters
phmmd$time <- time
phmmd$event <- event
fmla <- as.formula("Surv(time, event) ~ Z1 + Z2")
BaseFun <- function(x){
start.coxph <- coxph(x, phmmd)
print(start.coxph)
betahat <- start.coxph$coefficient
print(betahat)
print(333)
print(survfit(start.coxph))...
2005 Feb 05
1
Labelling and formatting of graphics
In the output of the code below, I want to do the following:
- get hats over some of the betas
- get the polygons stippled, not coloured grey
- remove the tick marks at the ends of the axes. If I put tick =
false, the whole axis disappears.
betahat <- c(0.04*0:150)
betahatdens <- dnorm(betahat, 3, 1)
plot(betahat, betahatdens, xlim = c(-0.2, 6.2), ylim = c(-0.09, 1),
type = "l", lwd = 2, xlab = NA, ylab = NA, axes = FALSE)
axis(1, pos = 0, labels = FALSE, tick = TRUE, at = c(0, 2, 3, 4, 6))
axis(2, pos = 0, labels = F...
2005 Feb 16
2
R: ridge regression
hi all
a technical question for those bright statisticians.
my question involves ridge regression.
definition:
n=sample size of a data set
X is the matrix of data with , say p variables
Y is the y matrix i.e the response variable
Z(i,j) = ( X(i,j)- xbar(j) / [ (n-1)^0.5* std(x(j))]
Y_new(i)=( Y(i)- ybar(j) ) / [ (n-1)^0.5* std(Y(i))] (note that i have
scaled the Y matrix as well)
k is
2001 Apr 03
3
single-pass algorithm for quantile calculation
Dear R users, I am looking for a reference to an algorithm for estimation of
sample quantiles which does not require bringing the whole data into memory
(more precisely its memory complexity should be much less than linear,
ideally constant). I realize that such an algorithm can only be approximate
and actually quite wrong for some samples, but that's fine with me.
Thank you,
Vadim