Search This Blog

Sunday, February 05, 2012

MSE calculation function


msecalc {LMGene}R Documentation

MSE calculation function

Description

Computes the mean square error and gradient for the global anova

Usage

msecalc(eS, lam, alpha, lowessnorm, R)

Arguments

eS Array data. must be exprSet type.
lam A parameter for glog transformation
alpha A parameter for glog transformation
lowessnorm TRUE, if lowess method is going to be used
R The residual matrix, i.e., identity minus the hat matrix

Details

The input argument, eS, must be exprSet type from Biobase package. If you have a matrix data and information about the considered factors, then you can use neweS to conver the data into exprSet. Please see neweS in more detail.

Value

msev A vector which contains MSE and gradient of two parameters

Author(s)

David Rocke and Geun-Cheol Lee

References

B. Durbin and D.M. Rocke, (2003) Estimation of Transformation Parameters for Microarray Data, Bioinformatics, 19, 1360-1367.
http://www.idav.ucdavis.edu/~dmrocke/

See Also

jggrad2, tranest2

Examples

#library
library(Biobase)
library(LMGene)

#data
data(sample.eS)

lmod <- GetLMObj(sample.eS)
X <- lmod$x
U <- svd(X)$u
H = crossprod(t(U), t(U))
n = dim(H)[1]
R = diag(rep(1,n)) - H

msecalc(sample.eS,500,50, FALSE, R)


[Package LMGene version 1.6.0 Index]

weibull fitdistr problem

This works:
x <- c(23,19,37,38,40,36,172,48,113,90,54,104,90,54,157,51,77,78,144,34,29,45,16,15,37,218,170,44,121)
rate <- c(.01,.02,.04,.05,.1,.2,.3,.4,.5,.8,.9)
year <- c(100,50,25,20,10,5,3.3,2.5,2,1.2,1.1)
library(MASS)
x <- sort(x)
tryCatch(
  f<-fitdistr(x, 'weibull'),
  error = function(e) cat(as.character(e))
)
shape = f$estimate["shape"]
scale = f$estimate["scale"]
cat(shape,scale,"\n")

for (i in 1:length(rate)){
  cat(scale*(-log(rate[i]))^(1/shape))
  cat(",")
}

Keyboard shortcuts for Synaptic

Keyboard shortcuts for Synaptic

Command
Key Combination
Update the list of available packages
Ctrl + R
Open the package search dialog
Ctrl + F
Show the Properties window for the selected package
Ctrl + O
Mark the selected package(s) for installation
Ctrl + I
Mark the selected package(s) for upgrade
Ctrl + U
Mark the selected package(s) for removal
Delete
Mark the selected package(s) for complete removal
Shift + Delete
Unmark any changes to packages
Ctrl + N
Mark all possible upgrades
Ctrl + G
Force the installation of a specific version of the package
Ctrl + E
Undo the last change
Ctrl + Z
Redo the last change
Ctrl + Shift + Z
Apply all marked changes
Ctrl + P
Quit Synaptic