Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 221384

Use this tag for any *on-topic* question that (a) involves `R` either as a critical part of the question or expected answer, & (b) is not *just* about how to use `R`.

2 votes

R - How to use sex in linear regression

In example 2, R takes $m$ as the reference. As a result, R reports sex(f). P/S: Choosing the reference, in general, does not affect your analysis. …
TrungDung's user avatar
  • 862
0 votes
0 answers
98 views

Random vector with a fixed sum: Distribution for its components

I have used function RandVec in R to generated one million vectors. Histograms for each $p_i$ can be seen here (for case $n=8$). …
TrungDung's user avatar
  • 862
0 votes
Accepted

How to built Gibbs sampler of Mixture Bayesian regression in R?

Note: This is just a comment but to quote a long code, I put it here. for (ite in 2:NSim){ #Full conditional for pi pi[ite]=rbeta(1, sum(delta[ite-1,])+0.5, sum(1-delta[ite-1,])+0.5) #Full condit …
TrungDung's user avatar
  • 862
0 votes

Bayesian approach for getting the distribution of sum of predicted values

I do not know why day is negative in your data and not in sequence from 1, 2, ... I guess those values are obtained after transformation. For simplicity, assume that we are day in whole number sequenc …
TrungDung's user avatar
  • 862