[R] Hierarchical log-linear models

Bernardo Rangel tura
2006-03-11T15:56:02Z

Hi R-masters!

I try using package gRbase for fit a Hierarchical log-linear models
and show as graphical model.

I using data about patients of my Hospital (file sm.csv) and my script  is :


setwd("F:/INCL/TURA")
dados<-read.csv("sm.csv")
attach(dados)
tab1<-table(obesidade,HAS,TG,DM,HDL)
require(gRbase)
dados.g <- as.gmData(tab1)
m2 <-hllm(~obesidade*HAS*TG*DM*HDL,dados.g)
m2.f <- fit(m2,engine="loglm")

Well my doubt is why

dynamic.Graph(m2) is the same model of dynamic.Graph(m2.f)

Where I wrong?



Thanks in advance

Bernardo Rangel Tura, MD, MSc
National Institute of Cardiology Laranjeiras
Rio de Janeiro Brazil
-------------- next part --------------
obesidade,HAS,TG,DM,HDL,SM
N,S,S,S,S,N
N,S,N,S,S,N
N,S,N,S,N,N
S,S,S,S,S,S
S,S,S,S,S,S
N,S,N,S,S,N
S,S,S,N,S,S
N,S,N,S,S,N
N,N,N,N,S,N
N,N,N,S,S,N
N,S,N,S,N,N
N,N,S,S,S,N
N,S,S,S,S,N
N,S,N,S,S,N
N,S,N,N,S,N
S,S,N,S,S,S
N,S,N,N,S,N
N,S,S,S,S,N
S,S,N,S,N,S
N,S,N,S,S,N
N,S,N,S,S,N
N,S,N,N,S,N
N,S,N,S,S,N
N,S,N,S,N,N
N,S,N,N,N,N
N,S,N,N,S,N
S,S,N,S,N,S
S,S,N,S,N,S
N,N,S,S,N,N
N,S,S,N,S,N
N,N,N,S,S,N
N,S,N,S,S,N
S,S,N,S,S,S
N,S,N,S,N,N
N,S,N,S,S,N
N,S,N,S,N,N
S,S,S,S,N,S
N,S,N,S,S,N
N,S,N,S,N,N
N,S,N,S,S,N
N,S,S,S,S,N
N,S,N,S,N,N
S,S,N,S,N,S
S,S,S,S,S,S
S,S,S,S,N,S
N,N,N,N,S,N
N,S,N,N,S,N
N,S,N,S,N,N
N,N,S,S,S,N
S,S,N,S,S,S
N,S,S,S,N,N
N,N,S,S,N,N
N,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