Displaying 5 results from an estimated 5 matches for "medaesq".
2018 May 21
2
Bootstrap and average median squared error
...34,45,56,25,34,47,44,35,24,53,44,55,46,36,67)
bmi <-c(34,32,12,76,54,34,21,18,92,32,11,13,45,46,56,57,67,87,12,13)
glucose <-c(23,54,11,12,13,21,32,12,45,54,65,87,21,23,12,12,23,23,43,54)
# Create a list to store the results
lst<-list()
# Numbers of bootstrap samples
nboot=100
bootstrap.MedAESQ =rep(NA,nboot)
for(i in 1?:nboot)
{
fit <- rq( crp ~ bmi+glucose, tau = 0.5)
ypred=predict(fit)
y=new$crp
bootstrap.MedAESQ [i]=median(y-ypred)^2
lst[i]<-bootstrap.MedAESQ
}
mean(unlist(lst))
###################################
?
2018 May 08
4
Average of results coming from B=100 repetitions (looping)
Dear R-experts,
Here below the reproducible example. I am trying to get the average of the 100 results coming from the "lst" function. I have tried lst$mean and mean(lst). It does not work.
Any help would be highly appreciated.
####################
?## R script for getting MedAe and MedAeSQ from HBR model on Testing data
install.packages("robustbase")
install.packages( "MASS" )
install.packages( "quantreg" )
install.packages( "RobPer")
install.packages("devtools")
library("devtools")
install_github("kloke/hbrfit")...
2018 May 22
0
Bootstrap and average median squared error
...)
> bmi <-c(34,32,12,76,54,34,21,18,92,32,11,13,45,46,56,57,67,87,12,13)
> glucose <-c(23,54,11,12,13,21,32,12,45,54,65,87,21,23,12,12,23,23,43,54)
>
> # Create a list to store the results
> lst<-list()
>
> # Numbers of bootstrap samples
> nboot=100
> bootstrap.MedAESQ =rep(NA,nboot)
>
> for(i in 1?:nboot)
> {
>
> fit <- rq( crp ~ bmi+glucose, tau = 0.5)
> ypred=predict(fit)
> y=new$crp
> bootstrap.MedAESQ [i]=median(y-ypred)^2
> lst[i]<-bootstrap.MedAESQ
>
> }
> mean(unlist(lst))
> #################################...
2018 May 22
2
Bootstrap and average median squared error
...54,34,21,18,92,32,11,13,45,46,56,57,67,87,12,13)
>> glucose <-c(23,54,11,12,13,21,32,12,45,54,65,87,21,23,12,12,23,23,43,54)
>>
>> # Create a list to store the results
>> lst<-list()
>>
>> # Numbers of bootstrap samples
>> nboot=100
>> bootstrap.MedAESQ =rep(NA,nboot)
>>
>> for(i in 1?:nboot)
>> {
>>
>> fit <- rq( crp ~ bmi+glucose, tau = 0.5)
>> ypred=predict(fit)
>> y=new$crp
>> bootstrap.MedAESQ [i]=median(y-ypred)^2
>> lst[i]<-bootstrap.MedAESQ
>>
>> }
>> mean(unlist...
2018 May 08
0
Average of results coming from B=100 repetitions (looping)
...below the reproducible example. I am trying to get the average of the 100 results coming from the "lst" function. I have tried lst$mean and mean(lst). It does not work.
> Any help would be highly appreciated >
> ####################
>
> ?## R script for getting MedAe and MedAeSQ from HBR model on Testing data
> install.packages("robustbase")
> install.packages( "MASS" )
> install.packages( "quantreg" )
> install.packages( "RobPer")
> install.packages("devtools")
> library("devtools")
> install...