家族尤度

  • 予定パッケージ名
    • HigashiNopponLikelihood
  • 関数名
    • MakeAlleleProb
  • タイトル
MakeAlleleProb
  • 説明
指定マーカー数のアレルリストとそのアレル頻度リストを適当に作る
プログラムの検証用のシミュレーションデータ作成のため
  • 使用例
MakeAlleleProb(NL)
  • ソース
MakeAlleleProb<-function(NL=15){
	NL<-15

	Alleles<-NULL
	Probs<-NULL
	library(MCMCpack)
	for(i in 1:NL){
		na<-sample(3:8,1)
		st<-sample(10:20,1)
		tmp<-NULL
		for(j in 1:na){
			a<-paste("",st+j,sep="")
			tmp<-c(tmp,a)
		}
		Alleles[[i]]<-tmp
		Probs[[i]]<-c(rdirichlet(1,rep(1,na)))
		#print(sum(Probs[[i]]))
	}
	list(Alleles=Alleles,Probs=Probs)
}
  • Rdファイル
\name{MakeAlleleProb}
\alias{MakeAlleleProb}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
MakeAlleleProb
}
\description{
指定マーカー数のアレルリストとそのアレル頻度リストを適当に作る
プログラムの検証用のシミュレーションデータ作成のため
}
\usage{
MakeAlleleProb(NL)
}
\arguments{
自然数
}
%- maybe also 'usage' for other objects documented here.
\details{
%%  ~~ If necessary, more details than the description above ~~
}
\value{
2要素リスト。
第1要素はマーカー数の長さのアレルの名前のリスト。個々のリストは文字列のベクトル。
第2要素はマーカー数の長さのアレルの頻度リスト。個々のリストは数値のベクトルで、その値は0以上かつ、和が1。
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
%%  ~~who you are~~
}
\note{
%%  ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
}

\examples{
NL<-15
AandP<-MakeAlleleProb(NL=NL)
Alleles<-AandP$Alleles
Probs<-AandP$Probs
}