Publications by Daniel
Linear mixed model MCMC
Linear mixed model in JAGS for random intercept library(R2jags) ## Loading required package: rjags ## Loading required package: coda ## Linked to JAGS 4.3.1 ## Loaded modules: basemod,bugs ## ## Attaching package: 'R2jags' ## The following object is masked from 'package:coda': ## ## traceplot # create dataset library(nlme) snakes3=Orth...
386 sym R (21153 sym/53 pcs) 1 img
Mixed model and linear model, Join model and Two stages model, MCMC
Join model, Mixed model and linear model Stage 1: A mixed model: Random intercept and slope. Stage.1 = lmer(EFW3 ~ 1+t1 + t2 + t3 + tt1 + tt2 + tt3+(1+t1| Subject_ID) , data = train.data, REML = TRUE) Stage 2: linear regression model Stage.2 =lm(data=data_lm,NDSBWGT_fm024~alpha+beta+EFW35+diff) # Clean 'Global Environment' rm(list = ls()) # Do...
698 sym R (23068 sym/131 pcs)
Linear mixed model MCMC
Linear mixed model in JAGS for random intercept library(R2jags) ## Loading required package: rjags ## Loading required package: coda ## Linked to JAGS 4.3.1 ## Loaded modules: basemod,bugs ## ## Attaching package: 'R2jags' ## The following object is masked from 'package:coda': ## ## traceplot # create dataset library(nlme) snakes3=Orth...
343 sym R (12232 sym/40 pcs) 1 img
Linear regression MCMC
Simple linear regression makes the posterior to be near prior = MCMC stability # Creating data trueA = 5 trueB = 0 trueSd = 10 sampleSize = 31 # create independent x-values x =(-(sampleSize-1)/2):((sampleSize-1)/2) # create dependent values according to ax + b + N(0,sd) y = trueA * x + trueB + rnorm(n=sampleSize,mean=0,sd=trueSd) plot(x,y,...
599 sym R (11064 sym/43 pcs) 6 img
Expectation maximum
Introduction The parameters that maximize the likelihood function, as an algebraic function of the data - difficult or impossible. A common example is missing data; other examples include ‘hidden’ or ‘latent’ variables. See reference Steps: 1 Expectation Step: Given the current estimates of the parameters θ^ , we take the expected val...
937 sym R (2830 sym/17 pcs) 1 img
Linear mixed model MCMC
Linear mixed model in JAGS for random intercept library(R2jags) ## Loading required package: rjags ## Loading required package: coda ## Linked to JAGS 4.3.1 ## Loaded modules: basemod,bugs ## ## Attaching package: 'R2jags' ## The following object is masked from 'package:coda': ## ## traceplot # create dataset library(nlme) snakes3=Orth...
226 sym R (8393 sym/29 pcs) 1 img
Linear regression MCMC
Simple linear regression # Creating data trueA = 5 trueB = 0 trueSd = 10 sampleSize = 31 # create independent x-values x =(-(sampleSize-1)/2):((sampleSize-1)/2) # create dependent values according to ax + b + N(0,sd) y = trueA * x + trueB + rnorm(n=sampleSize,mean=0,sd=trueSd) plot(x,y, main="Test Data") # For estimating parameters in a B...
391 sym R (11075 sym/43 pcs) 6 img
ANOVA IMDB
library(readxl) ## Warning: package 'readxl' was built under R version 4.3.3 library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(ggplot2) ## Warning: packa...
4244 sym R (2321 sym/19 pcs) 3 img
Document
2VA - CPAD VADeaths barplot(VADeaths, main = "Número de mortes a cada 1000 habitantes na Virginia", xlab="Grupos", ylab="Mortes", col=rainbow(5), beside=F, legend.text=T) ClassificaçãoDoença estagios <- c("moderado", "leve", "leve", "severo", "leve", "moderado", "moderado", "moderado", "leve", "leve", "severo","leve", "moderado", "moderado", ...
67 sym 4 img
2VA CPAD - Daniel Rosa
Introdução ao Dataset Introdução ao Dataset O Yelp dataset é uma base de dados composta por várias informações de diversos estabelecimentos espalhados em 8 regiões metropolitanas distintas nos Estados Unidos e no Canadá das mais variadas categorias de serviços: shoppings, restaurantes, lojas, concessionárias, templos religiosos ent...
4247 sym 3 tbl