Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with NAs as separate class in transition matrix #146

Open
winanddj opened this issue Jan 9, 2018 · 2 comments
Open

Problem with NAs as separate class in transition matrix #146

winanddj opened this issue Jan 9, 2018 · 2 comments
Assignees

Comments

@winanddj
Copy link

winanddj commented Jan 9, 2018

Hi,

I try to estimate a transition matrix for a specific matrix.
The matrix has some rows that have missing values , they are correctly specified as NA.
Now in the transition matrix I want four classes: (a,b,c,d).
The problem is that the commands:
dataframe <- read.table("C:Downloads/test.txt", header =F)
testdata<-as.matrix(dataframe)
transitionmatrix <-markovchainFit(data=testdata, method = "mle")
produces a 5-dimensional transition matrix, with the NAs as a seperate class.
I only want to consider the four classes a,b,c,d

How can I exclude the NAs from the estimated transition matrix.
The command na.Remove that is mentioned here: #122
does not work.

Thanks in advance for any suggestions and help.

@spedygiorgio
Copy link
Owner

Hi @winanddj , in order to investigate further Is it possible for you to upload the data?
Best

@winanddj
Copy link
Author

winanddj commented Jan 10, 2018

Hi @spedygiorgio.
Yes this is the dataset:
test.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants