?bugs
?summary
heisenberg <- read.csv(file="/Users/rrtucci/Desktop/R-lessons/kellyBlackRTutorial/simple.cvs",head=TRUE,sep=",")
heisenberg
summary()
summary(heisenberg)
heisenberg$trial
heis$trial
heis
tree <- read.csv(file="/Users/rrtucci/Desktop/R-lessons/kellyBlackRTutorial/trees91.csv",header=TRUE,sep=",")
attributes(heisenberg)
help(read)
ls()
tree$C
x <- seq(-20,20,by=.1)
x
y <- dnorm(x) ;plot(x,y)
y<-probit(x);plot(x,y)
help(probit)
y=pnorm(x); plot(x,y)
help(logit)
y=log(x/(1-x));plot(x,y)
x=seq(-2000,2000,by=100); plot(x,y)
y
x
y=log(x/(1-x))
y
x=seq(0,1,.05);
y=log(x/(1-x))
y
plot(x,y)
stripchart(tree$N)
stripchart(tree$C)
stripchart(x)
stipchart(tree$C, method="stack")
stripchart(tree$C, method="stack")
stripchart(tree$C, method="jitter")
title('Leaf BioMass in High CO2 Environment',xlab='BioMass of Leaves')
hist(tree$C)
tree$C
hist(tree$C, xlim(0,4))
 hist(tree$C, xlim=c(0,4))
boxplot(heisenberg$mass)
plot(tree$STBM,tree$LFBM)
?plot
getwd()
library("R2WinBUGS")
 library("R2WinBUGS")
#define distributions of categorical nodes#
#varying in-states first#
data = list(#
	p_A = structure(.Data = c(#
		0.5,	0.1,	#
		0.2,	0.45,	#
		0.3,	0.45#
	), .Dim = c(2,3)),#
	p_B = c(#
		0.2,	#
		0.8#
	)#
)#
#
parameters = list(#
	"A",#
	"B"#
)#
#
#random inits#
#runif = random uniform (num samples, min, max)#
inits = function() list(#
	A = 1 + trunc(runif(1, 0, 3)),#
	B = 1 + trunc(runif(1, 0, 2))#
)
simu = bugs(#
	data, inits, parameters,#
	"2nodes_BUGS.txt",#
	n.chains=3,#
	n.iter=1000,#
	debug=TRUE,#
	DIC=FALSE)
