bob-carpenter / prob-stats Goto Github PK
View Code? Open in Web Editor NEWProbability and Statistics: a simulation-based introduction. An open-access book.
License: BSD 3-Clause "New" or "Revised" License
Probability and Statistics: a simulation-based introduction. An open-access book.
License: BSD 3-Clause "New" or "Revised" License
I'm trying to build the pdf from the command line but I keep on getting this error message:
Quitting from lines 9199-9203 (_main.Rmd)
Error in sample.int(length(x), size, replace, prob) :
object 'corr_trans' not found
Any suggestions?
I think the code for computing the entropy of a Gaussian has a small bug:
estimate_normal_entropy <- function(M, sigma) {
y <- rnorm(M, 0, sigma)
log_p_y <- dnorm(y, 0, sigma, log = TRUE)
-sum(log_p_y)
}
The last line should be -mean(log_p_y)
or -sum(log_p_y)/M
.
Also, the simulated values could be contrasted with the closed formula solution:
gauss_entropy <- function(sigma) 0.5*log(2*pi*exp(1)*sigma^2)
Best,
LS
Tried on both Ubuntu and Mac. Same (unclear) error in _main.log
! Extra alignment tab has been changed to \cr.
\endtemplate
l.1800 &
= &
Here is how much of TeX's memory you used:
13684 strings out of 492649
194607 string characters out of 6129622
303592 words of memory out of 5000000
17170 multiletter control sequences out of 15000+600000
87392 words of font info for 153 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
45i,13n,45p,601b,461s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!
Hi,
this is really a minor cosmetic aspect but since I am German speaker I thought I let you know, before I forget it:
The RMarkdown for the section "7 Statistical Inference and Inverse Problems" contains the following reference:
116 Einstein, Albert. 1907. On the relativity principle and the conclusions drawn from it. Jahrbuch der Radioaktivitfit and Elektronik 4:411–462.
The journal ist actually called
Jahrbuch der Radioaktivität und Elektronik
and the original title of his work was
Über das Relativitätsprinzip und die aus demselben gezogenen Folgerungen
This is just a nice-to-have (pandoc isn't that hard to install), but I'd certainly appreciate being able to just download a mostly up-to-date version of the book by going to this repo.
prob-stats/multiple-random-variables.Rmd
Line 490 in 52ff414
I'm running the command:
Rscript -e "bookdown::render_book('index.Rmd')"
but this fails with the message:
Quitting from lines 5012-5027 (_main.Rmd)
Error in vars(chain) : could not find function "vars"
Calls: ... withVisible -> eval -> eval -> facet_wrap -> ggproto -> as.quoted
Any suggestions as to what's going wrong? Thanks!
I tried to run the command quarto preview quarto-book/
, but it's throwing an error. What do I do?
Preparing to preview
[ 1/10] index.qmd
[ 2/10] intro.qmd
[ 3/10] random-variables.qmd
Starting python3 kernel...Done
Executing 'random-variables.ipynb'
Cell 1/11: ''...Done
Cell 2/11: ''...
An error occurred while executing the following cell:
------------------
model = CmdStanModel(stan_file = "stan/flip.stan")
------------------
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[2], line 1
----> 1 model = CmdStanModel(stan_file = "stan/flip.stan")
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\cmdstanpy\model.py:215, in CmdStanModel.__init__(self, model_name, stan_file, exe_file, force_compile, stanc_options, cpp_options, user_header, compile)
211 if not cmdstan_version_before(
212 2, 27
213 ): # unknown end of version range
214 try:
--> 215 model_info = self.src_info()
216 if 'parameters' in model_info:
217 self._fixed_param |= len(model_info['parameters']) == 0
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\cmdstanpy\model.py:321, in CmdStanModel.src_info(self)
319 if self.stan_file is None or cmdstan_version_before(2, 27):
320 return {}
--> 321 return compilation.src_info(str(self.stan_file), self._compiler_options)
File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\cmdstanpy\compilation.py:348, in src_info(stan_file, compiler_options)
338 def src_info(
339 stan_file: str, compiler_options: CompilerOptions
340 ) -> Dict[str, Any]:
341 """
342 Get source info for Stan program file.
343
344 This function is used in the implementation of
345 :meth:`CmdStanModel.src_info`, and should not be called directly.
346 """
347 cmd = (
--> 348 [os.path.join(cmdstan_path(), 'bin', 'stanc' + EXTENSION)]
349 # handle include-paths, allow-undefined etc
350 + compiler_options.compose_stanc(None)
351 + ['--info', str(stan_file)]
352 )
353 proc = subprocess.run(cmd, capture_output=
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.